From cd729b2510a62697a6b461fff48aebbd5c13b868 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Wed, 6 Apr 2016 19:26:25 +0100 Subject: [PATCH] Fix faults arising from merging Makefile{,.nt} Bootstrapping FlexDLL broken for lex and tools. --- lex/Makefile | 4 +++- tools/Makefile.shared | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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