diff --git a/camlp4/Makefile b/camlp4/Makefile index 9bed3d8ed..bf65d735c 100644 --- a/camlp4/Makefile +++ b/camlp4/Makefile @@ -13,7 +13,7 @@ all: boot/camlp4$(EXE) opt: cd lib; $(MAKE) opt -bullshit: +optp4: set -e; for i in $(OPTDIRS); do cd $$i; $(MAKE) opt; cd ..; done boot/camlp4$(EXE): diff --git a/camlp4/camlp4/Makefile b/camlp4/camlp4/Makefile index 0f161b30e..cc15830c9 100644 --- a/camlp4/camlp4/Makefile +++ b/camlp4/camlp4/Makefile @@ -10,7 +10,7 @@ LINKFLAGS=$(INCLUDES) INTERFACES=-I $(OLIBDIR) Arg Array Buffer Callback Char Digest Filename Format Gc Genlex Hashtbl Lazy Lexing List Map Marshal Obj Oo Parsing Pervasives Printexc Printf Queue Random Set Sort Stack Stream String Sys Weak -I ../boot Extfun Fstream Gramext Grammar Plexer Stdpp Token -I $(OTOP)/utils Config Warnings -I $(OTOP)/parsing Asttypes Location Longident Parsetree -I . Ast2pt MLast Pcaml Quotation Spretty CAMLP4_INTF=$(OTOP)/utils/config.cmi $(OTOP)/utils/warnings.cmi $(OTOP)/parsing/asttypes.cmi $(OTOP)/parsing/location.cmi $(OTOP)/parsing/longident.cmi $(OTOP)/parsing/parsetree.cmi ast2pt.cmi mLast.cmi pcaml.cmi spretty.cmi quotation.cmi CAMLP4_OBJS=../boot/stdpp.cmo ../boot/token.cmo ../boot/plexer.cmo ../boot/gramext.cmo ../boot/grammar.cmo ../boot/extfun.cmo ../boot/fstream.cmo $(OTOP)/utils/config.cmo quotation.cmo ast2pt.cmo spretty.cmo reloc.cmo pcaml.cmo argl.cmo crc.cmo -CAMLP4_XOBJS=../lib/stdpp.cmx ../lib/token.cmx ../lib/plexer.cmx ../lib/gramext.cmx ../lib/grammar.cmx config.cmx quotation.cmx ast2pt.cmx spretty.cmx reloc.cmx pcaml.cmx argl.cmx +CAMLP4_XOBJS=../lib/stdpp.cmx ../lib/token.cmx ../lib/plexer.cmx ../lib/gramext.cmx ../lib/grammar.cmx ../lib/extfun.cmx ../lib/fstream.cmx $(OTOP)/utils/config.cmx quotation.cmx ast2pt.cmx spretty.cmx reloc.cmx pcaml.cmx argl.cmx OBJS=../odyl/odyl.cma camlp4.cma CAMLP4M= @@ -18,9 +18,8 @@ CAMLP4=camlp4$(EXE) CAMLP4OPT=phony all: $(CAMLP4) -opt: $(CAMLP4OPT) - -$(CAMLP4OPT): $(OBJS:.cma=.cmxa) ../odyl/odyl.cmx +opt: $(OBJS:.cma=.cmxa) +optp4: $(CAMLP4OPT) $(CAMLP4): $(OBJS) ../odyl/odyl.cmo $(OCAMLC) $(OBJS) $(CAMLP4M) ../odyl/odyl.cmo -linkall -o $(CAMLP4) @@ -40,7 +39,7 @@ crc.cmo: $(CAMLP4_INTF) $(OCAMLC) $(OCAMLCFLAGS) -c crc.ml clean:: - rm -f *.cm* *.pp[io] *.o *.bak .*.bak *.out *.opt phony + rm -f *.cm* *.pp[io] *.o *.bak .*.bak *.out *.opt rm -f $(CAMLP4) crc.ml depend: diff --git a/camlp4/etc/Makefile b/camlp4/etc/Makefile index d0c002c1c..d97d71dd9 100644 --- a/camlp4/etc/Makefile +++ b/camlp4/etc/Makefile @@ -21,7 +21,7 @@ camlp4o$(EXE): ../camlp4/camlp4$(EXE) $(CAMLP4OM) camlp4o.opt: $(CAMLP4OMX) rm -f camlp4o.opt - cd ../camlp4; $(MAKE) opt CAMLP4OPT=../etc/camlp4o.opt CAMLP4M="-I ../etc $(CAMLP4OMX)" + cd ../camlp4; $(MAKE) optp4 CAMLP4OPT=../etc/camlp4o.opt CAMLP4M="-I ../etc $(CAMLP4OMX)" mkcamlp4.sh: mkcamlp4.sh.tpl sed -e "s'OLIBDIR'$(OLIBDIR)'g" -e "s'LIBDIR'$(LIBDIR)'g" mkcamlp4.sh.tpl > mkcamlp4.sh diff --git a/camlp4/meta/Makefile b/camlp4/meta/Makefile index 707cdbb2d..02e7ba54e 100644 --- a/camlp4/meta/Makefile +++ b/camlp4/meta/Makefile @@ -20,7 +20,7 @@ camlp4r$(EXE): ../camlp4/camlp4$(EXE) $(CAMLP4RM) camlp4r.opt: $(CAMLP4RMX) rm -f camlp4r.opt - cd ../camlp4; $(MAKE) opt OTOP=$(OTOP) CAMLP4OPT=../meta/camlp4r.opt CAMLP4M="-I ../meta $(CAMLP4RMX)" + cd ../camlp4; $(MAKE) optp4 OTOP=$(OTOP) CAMLP4OPT=../meta/camlp4r.opt CAMLP4M="-I ../meta $(CAMLP4RMX)" clean:: rm -f *.cm* *.pp[io] *.o *.bak .*.bak $(COUT) $(COPT) diff --git a/camlp4/odyl/Makefile b/camlp4/odyl/Makefile index 62adb1e15..0153f9e97 100644 --- a/camlp4/odyl/Makefile +++ b/camlp4/odyl/Makefile @@ -23,10 +23,10 @@ odyl.cma: $(OBJS) odyl.cmxa: $(OBJS:.cmo=.cmx) $(OCAMLOPT) $(LINKFLAGS) $(OBJS:.cmo=.cmx) -a -o odyl.cmxa -odyl.cmx: odyl.ml - ../boot/camlp4r -nolib -I ../boot pa_ifdef.cmo -DOPT -o odyl.ppo odyl.ml - $(OCAMLOPT) -c -impl odyl.ppo - rm -f odyl.ppo +odyl_main.cmx: odyl_main.ml + $(CAMLP4_COMM) -nolib -DOPT -o odyl_main.ppo odyl_main.ml + $(OCAMLOPT) -c -impl odyl_main.ppo + rm -f odyl_main.ppo odyl_config.cmo: echo "let standard_library =" > odyl_config.ml diff --git a/camlp4/odyl/odyl_main.ml b/camlp4/odyl/odyl_main.ml index 9e3a39d65..b7633994a 100644 --- a/camlp4/odyl/odyl_main.ml +++ b/camlp4/odyl/odyl_main.ml @@ -52,7 +52,7 @@ exception Error of string and string; value nolib = ref False; value initialized = ref False; -value path = ref []; +value path = ref ([] : list string); value loadfile file = ifdef OPT then diff --git a/camlp4/top/.depend b/camlp4/top/.depend index ac29ce2dc..7e424d1eb 100644 --- a/camlp4/top/.depend +++ b/camlp4/top/.depend @@ -1,4 +1,2 @@ -camlp4_top.cmo: ../camlp4/ast2pt.cmo ../camlp4/mLast.cmi \ - ../camlp4/pcaml.cmi -camlp4_top.cmx: ../camlp4/ast2pt.cmx ../camlp4/mLast.cmi \ - ../camlp4/pcaml.cmx +camlp4_top.cmo: ../camlp4/ast2pt.cmo ../camlp4/mLast.cmi ../camlp4/pcaml.cmi +camlp4_top.cmx: ../camlp4/ast2pt.cmx ../camlp4/mLast.cmi ../camlp4/pcaml.cmx