Index: stdlib/Makefile.shared
===================================================================
--- stdlib/Makefile.shared	(révision 12128)
+++ stdlib/Makefile.shared	(copie de travail)
@@ -16,7 +16,7 @@
 include ../config/Makefile
 RUNTIME=../boot/ocamlrun
 COMPILER=../ocamlc
-CAMLC=$(RUNTIME) $(COMPILER)
+CAMLC=ocp-wrapper -save-types -no-wrap-camlp4 -with-ocamlc "$(RUNTIME) $(COMPILER)" ocamlc
 COMPFLAGS=-strict-sequence -g -warn-error A -nostdlib
 OPTCOMPILER=../ocamlopt
 CAMLOPT=$(RUNTIME) $(OPTCOMPILER)
Index: tools/Makefile.shared
===================================================================
--- tools/Makefile.shared	(révision 12128)
+++ tools/Makefile.shared	(copie de travail)
@@ -15,7 +15,7 @@
 include ../config/Makefile
 
 CAMLRUN=../boot/ocamlrun
-CAMLC=$(CAMLRUN) ../boot/ocamlc -strict-sequence -nostdlib -I ../boot
+CAMLC=ocp-wrapper -save-types -no-wrap-camlp4 -with-ocamlc "$(CAMLRUN) ../boot/ocamlc" ocamlc -strict-sequence -nostdlib -I ../boot
 CAMLOPT=$(CAMLRUN) ../ocamlopt -nostdlib -I ../stdlib
 CAMLLEX=$(CAMLRUN) ../boot/ocamllex
 INCLUDES=-I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../asmcomp \
Index: Makefile
===================================================================
--- Makefile	(révision 12128)
+++ Makefile	(copie de travail)
@@ -17,7 +17,7 @@
 include config/Makefile
 include stdlib/StdlibModules
 
-CAMLC=boot/ocamlrun boot/ocamlc -nostdlib -I boot
+CAMLC=ocp-wrapper -save-types -no-wrap-camlp4 -with-ocamlc "boot/ocamlrun boot/ocamlc" ocamlc -nostdlib -I boot
 CAMLOPT=boot/ocamlrun ./ocamlopt -nostdlib -I stdlib -I otherlibs/dynlink
 COMPFLAGS=-strict-sequence -warn-error A $(INCLUDES)
 LINKFLAGS=
@@ -186,7 +186,7 @@
 	$(MAKE) all
 	$(MAKE) compare
 
-LIBFILES=stdlib.cma std_exit.cmo *.cmi camlheader
+LIBFILES=stdlib.cma std_exit.cmo *.cmi *.cmt *.cmti camlheader
 
 # Start up the system from the distribution compiler
 coldstart:
@@ -331,7 +331,7 @@
 
 ocamlc: $(COMPOBJS)
 	$(CAMLC) $(LINKFLAGS) -o ocamlc $(COMPOBJS)
-	@sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlc|' \
+	@sed -e 's|@compiler@|ocp-wrapper -save-types -no-wrap-camlp4 -with-ocamlc \"$$topdir/boot/ocamlrun $$topdir/ocamlc\" ocamlc|' \
 	  driver/ocamlcomp.sh.in > ocamlcomp.sh
 	@chmod +x ocamlcomp.sh
 
@@ -435,7 +435,7 @@
 	$(CAMLOPT) $(LINKFLAGS) -ccopt "$(BYTECCLINKOPTS)" -o ocamlc.opt \
 	  $(COMPOBJS:.cmo=.cmx) \
 	  asmrun/meta.o asmrun/dynlink.o -cclib "$(BYTECCLIBS)"
-	@sed -e 's|@compiler@|$$topdir/ocamlc.opt|' \
+	@sed -e 's|@compiler@|ocp-wrapper -save-types -no-wrap-camlp4 -with-ocamlc $$topdir/ocamlc.opt| ocamlc' \
 	  driver/ocamlcomp.sh.in > ocamlcomp.sh
 	@chmod +x ocamlcomp.sh
 
Index: .typerex
===================================================================
--- .typerex	(révision 0)
+++ .typerex	(révision 0)
@@ -0,0 +1,46 @@
+# Typerex project file for:
+#   + OCaml compilers, toplevel
+#   + stdlib, otherlibs
+#   + ocamldoc, ocamldebug, ocamlbuild
+#   + ocamllex, tools/* (ocamldep, dumpobj, objinfo, ...)
+# But not:
+#   - camlp4
+#
+# It is possible to remove irrelevant parts (provided no global refactoring
+# is intended), by commenting the appropriate directories.
+
+# Don't try to access an installed standard library:
+NOSTDLIB
+
+stdlib
+otherlibs/bigarray
+otherlibs/dynlink
+otherlibs/graph
+otherlibs/labltk
+otherlibs/num
+otherlibs/str
+otherlibs/systhreads
+otherlibs/threads
+otherlibs/unix
+
+utils parsing typing bytecomp asmcomp driver toplevel lex tools ocamldoc debugger
+
+# If ocamlbuild is included, then 'CMT .' is required because of _build
+# otherwise, you may also comment the CMT line (which simplify cmt assignement)
+ocamlbuild
+CMT .
+
+# Have not tried under Windows
+#otherlibs/win32graph
+#otherlibs/win32unix
+
+# Omitted files:
+- parsing/linenum
+- typing/untypeast
+- asmcomp/codegen
+- otherlibs/dynlink/natdynlink
+- toplevel/opttopdirs toplevel/opttopstart toplevel/opttopmain toplevel/opttoploop
+- tools/addlabels tools/scrapelabels tools/cvt_emit
+- tools/lexer299 tools/lexer301 tools/ocaml299to3 tools/ocamlmktop tools/primreq
+- debugger/pattern_matching
+- ocamlbuild/ppcache
Index: lex/Makefile
===================================================================
--- lex/Makefile	(révision 12128)
+++ lex/Makefile	(copie de travail)
@@ -13,7 +13,7 @@
 # $Id$
 
 # The lexer generator
-CAMLC=../boot/ocamlrun ../boot/ocamlc -strict-sequence -nostdlib -I ../boot
+CAMLC=ocp-wrapper -save-types -no-wrap-camlp4 -with-ocamlc "../boot/ocamlrun ../boot/ocamlc" ocamlc -strict-sequence -nostdlib -I ../boot
 CAMLOPT=../boot/ocamlrun ../ocamlopt -nostdlib -I ../stdlib
 COMPFLAGS=-warn-error A
 CAMLYACC=../boot/ocamlyacc
Index: myocamlbuild.ml
===================================================================
--- myocamlbuild.ml	(révision 12128)
+++ myocamlbuild.ml	(copie de travail)
@@ -147,6 +147,10 @@
 Command.setup_virtual_command_solver "OCAMLOPT" ocamlopt_solver;;
 Command.setup_virtual_command_solver "OCAMLOPTWIN" (convert_for_windows_shell ocamlopt_solver);;
 
+(* Useless until packs are supported by ocp-type (and TypeRex)
+let ocamlc   =
+  S [A"ocp-wrapper"; A"-save-types"; A"-with-ocamlc"; V"OCAMLC"; A"ocamlc"];;
+*)
 let ocamlc   = V"OCAMLC";;
 let ocamlopt = V"OCAMLOPT";;
 
Index: otherlibs/dynlink/Makefile
===================================================================
--- otherlibs/dynlink/Makefile	(révision 12128)
+++ otherlibs/dynlink/Makefile	(copie de travail)
@@ -17,7 +17,7 @@
 
 include ../../config/Makefile
 
-CAMLC=../../boot/ocamlrun ../../ocamlc
+CAMLC=ocp-wrapper -save-types -no-wrap-camlp4 -with-ocamlc "../../boot/ocamlrun ../../ocamlc" ocamlc
 CAMLOPT=../../ocamlcompopt.sh
 INCLUDES=-I ../../utils -I ../../typing -I ../../bytecomp -I ../../asmcomp
 COMPFLAGS=-warn-error A -I ../../stdlib $(INCLUDES)
Index: otherlibs/threads/Makefile
===================================================================
--- otherlibs/threads/Makefile	(révision 12128)
+++ otherlibs/threads/Makefile	(copie de travail)
@@ -73,6 +73,7 @@
 
 pervasives.cmi: $(LIB)/pervasives.cmi
 	ln -s $(LIB)/pervasives.cmi pervasives.cmi
+	-ln -s $(LIB)/pervasives.cmti pervasives.cmti
 
 marshal.cmo: marshal.mli marshal.cmi marshal.ml
 	$(CAMLC) ${COMPFLAGS} -c marshal.ml
@@ -82,12 +83,14 @@
 
 marshal.cmi: $(LIB)/marshal.cmi
 	ln -s $(LIB)/marshal.cmi marshal.cmi
+	-ln -s $(LIB)/marshal.cmti marshal.cmti
 
 unix.mli: $(UNIXLIB)/unix.mli
 	ln -s -f $(UNIXLIB)/unix.mli unix.mli
 
 unix.cmi: $(UNIXLIB)/unix.cmi
 	ln -s -f $(UNIXLIB)/unix.cmi unix.cmi
+	-ln -s -f $(UNIXLIB)/unix.cmti unix.cmti
 
 unix.cmo: unix.mli unix.cmi $(UNIXLIB)/unixLabels.cmo
 	$(CAMLC) ${COMPFLAGS} -c unix.ml
Index: ocamlbuild/ocamlbuild_Myocamlbuild_config.mli
===================================================================
--- ocamlbuild/ocamlbuild_Myocamlbuild_config.mli	(révision 0)
+++ ocamlbuild/ocamlbuild_Myocamlbuild_config.mli	(révision 0)
@@ -0,0 +1,71 @@
+(*************************************************************************)
+(*                                                                       *)
+(*                                 OCaml                                 *)
+(*                                                                       *)
+(*         Nicolas Pouillard, projet Gallium, INRIA Rocquencourt         *)
+(*                                                                       *)
+(*   Copyright 2007 Institut National de Recherche en Informatique et    *)
+(*   en Automatique.  All rights reserved.  This file is distributed     *)
+(*   under the terms of the Q Public License version 1.0.                *)
+(*                                                                       *)
+(*************************************************************************)
+
+val prefix : string
+val bindir : string
+val libdir : string
+val manext : string
+val ranlib : string
+val ranlibcmd : string
+val arcmd : string
+val sharpbangscripts : bool
+val bng_arch : string
+val bng_asm_level : string
+val pthread_link : string
+val x11_includes : string
+val x11_link : string
+val tk_link : string
+val bytecc : string
+val bytecccompopts : string
+val bytecclinkopts : string
+val bytecclibs : string
+val byteccrpath : string
+val exe : string
+val supports_shared_libraries : bool
+val sharedcccompopts : string
+val mksharedlibrpath : string
+val arch : string
+val model : string
+val system : string
+val nativecc : string
+val nativecccompopts : string
+val nativeccprofopts : string
+val nativecclinkopts : string
+val nativeccrpath : string
+val nativecclibs : string
+val packld : string
+val dllcccompopts : string
+val asm : string
+val aspp : string
+val asppprofflags : string
+val profiling : string
+val dynlinkopts : string
+val otherlibraries : string
+val debugger : string
+val cc_profile : string
+val systhread_support : bool
+val syslib : string -> string
+val mkexe : string
+val mkdll : string
+val mkmaindll : string
+val mklib : string -> string -> string -> string
+val ext_lib : string
+val ext_obj : string
+val ext_asm : string
+val ext_dll : string
+val o : string
+val a : string
+val so : string
+val toolchain : string
+val ccomptype : string
+val extralibs : string
+val tk_defs : string
