diff --git a/lex/Makefile b/lex/Makefile index a8ac9a7ed..ea6f2be2a 100644 --- a/lex/Makefile +++ b/lex/Makefile @@ -18,6 +18,8 @@ include ../config/Makefile CAMLRUN ?= ../boot/ocamlrun CAMLYACC ?= ../boot/ocamlyacc +ROOTDIR=.. + ifeq "$(wildcard $(ROOTDIR)/flexdll/Makefile)" "" export OCAML_FLEXLINK:= else @@ -47,7 +49,7 @@ ocamllex.opt: $(OBJS:.cmo=.cmx) clean:: rm -f ocamllex ocamllex.opt - rm -f *.cmo *.cmi *.cmx *.cmt *.cmti *.o *~ + rm -f *.cmo *.cmi *.cmx *.cmt *.cmti *.$(O) *~ parser.ml parser.mli: parser.mly $(CAMLYACC) $(YACCFLAGS) parser.mly diff --git a/tools/Makefile.shared b/tools/Makefile.shared index 90096cb33..e86d8273e 100644 --- a/tools/Makefile.shared +++ b/tools/Makefile.shared @@ -17,6 +17,14 @@ include ../config/Makefile CAMLRUN ?= ../boot/ocamlrun CAMLYACC ?= ../boot/ocamlyacc +ROOTDIR=.. + +ifeq "$(wildcard $(ROOTDIR)/flexdll/Makefile)" "" +export OCAML_FLEXLINK:= +else +export OCAML_FLEXLINK:=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/flexdll/flexlink.exe +endif + CAMLC=$(CAMLRUN) ../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives CAMLOPT=$(CAMLRUN) ../ocamlopt -nostdlib -I ../stdlib CAMLLEX=$(CAMLRUN) ../boot/ocamllex