summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile24
-rw-r--r--Makefile.common4
-rw-r--r--ocamltest/Makefile6
-rw-r--r--ocamltest/ocamltest_config.ml.in2
-rw-r--r--utils/Makefile4
5 files changed, 20 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 052d4ea54b..d472231727 100644
--- a/Makefile
+++ b/Makefile
@@ -83,12 +83,8 @@ TOPINCLUDES=$(addprefix -I otherlibs/,$(filter-out %threads,$(OTHERLIBRARIES)))
ifeq "$(BOOTSTRAPPING_FLEXDLL)" "false"
COLDSTART_DEPS =
- BOOT_FLEXLINK_CMD =
else
COLDSTART_DEPS = boot/ocamlruns$(EXE)
- BOOT_FLEXLINK_CMD = \
- FLEXLINK_CMD='$$(ROOTDIR)/boot/ocamlruns$(EXE) \
- $$(ROOTDIR)/boot/flexlink.byte$(EXE)'
endif
expunge := expunge$(EXE)
@@ -184,7 +180,7 @@ else
$(MAKE) -C stdlib OCAMLRUN='$$(ROOTDIR)/boot/ocamlruns$(EXE)' \
CAMLC='$$(BOOT_OCAMLC)' all
$(MAKE) boot/flexlink.byte$(EXE)
- $(MAKE) $(BOOT_FLEXLINK_CMD) runtime-all
+ $(MAKE) runtime-all
endif # ifeq "$(BOOTSTRAPPING_FLEXDLL)" "false"
cp runtime/ocamlrun$(EXE) boot/ocamlrun$(EXE)
cd boot; rm -f $(LIBFILES)
@@ -1021,8 +1017,7 @@ stdlib/flexdll:
endif
.PHONY: makeruntime
-makeruntime:
- $(MAKE) $(BOOT_FLEXLINK_CMD) runtime-all
+makeruntime: runtime-all
stdlib/libcamlrun.$(A): runtime-all
cd stdlib; $(LN) ../runtime/libcamlrun.$(A) .
clean::
@@ -1040,8 +1035,7 @@ clean::
runtimeopt: stdlib/libasmrun.$(A)
.PHONY: makeruntimeopt
-makeruntimeopt:
- $(MAKE) $(BOOT_FLEXLINK_CMD) runtime-allopt
+makeruntimeopt: runtime-allopt
stdlib/libasmrun.$(A): runtime-allopt
cd stdlib; $(LN) ../runtime/libasmrun.$(A) .
@@ -1063,16 +1057,15 @@ alldepend: depend
.PHONY: library
library: ocamlc
- $(MAKE) -C stdlib $(BOOT_FLEXLINK_CMD) all
+ $(MAKE) -C stdlib all
.PHONY: library-cross
library-cross:
- $(MAKE) -C stdlib \
- $(BOOT_FLEXLINK_CMD) OCAMLRUN=../runtime/ocamlrun$(EXE) all
+ $(MAKE) -C stdlib OCAMLRUN=../runtime/ocamlrun$(EXE) all
.PHONY: libraryopt
libraryopt:
- $(MAKE) -C stdlib $(BOOT_FLEXLINK_CMD) allopt
+ $(MAKE) -C stdlib allopt
partialclean::
$(MAKE) -C stdlib clean
@@ -1101,8 +1094,7 @@ ocamlyacc_MODULES = $(ocamlyacc_WSTR_MODULE) $(ocamlyacc_OTHER_MODULES)
ocamlyacc_OBJECTS = $(ocamlyacc_MODULES:=.$(O))
.PHONY: ocamlyacc
-ocamlyacc:
- $(MAKE) $(BOOT_FLEXLINK_CMD) $(ocamlyacc_PROGRAM)$(EXE)
+ocamlyacc: $(ocamlyacc_PROGRAM)$(EXE)
$(ocamlyacc_PROGRAM)$(EXE): $(ocamlyacc_OBJECTS)
$(MKEXE) -o $@ $^
@@ -1245,7 +1237,7 @@ checkstack: tools/checkstack$(EXE)
.INTERMEDIATE: tools/checkstack$(EXE) tools/checkstack.$(O)
tools/checkstack$(EXE): tools/checkstack.$(O)
- $(MAKE) -C tools $(BOOT_FLEXLINK_CMD) checkstack$(EXE)
+ $(MAKE) -C tools checkstack$(EXE)
else
checkstack:
@
diff --git a/Makefile.common b/Makefile.common
index b47c0dd83f..06b48d9ac0 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -69,7 +69,6 @@ endif
BOOT_OCAMLDEP = $(BOOT_OCAMLC) -depend
-FLEXLINK_CMD=flexlink
ifeq "$(BOOTSTRAPPING_FLEXDLL)" "false"
FLEXLINK_ENV =
CAMLOPT_CMD = $(CAMLOPT)
@@ -77,6 +76,7 @@ ifeq "$(BOOTSTRAPPING_FLEXDLL)" "false"
MKLIB_CMD = $(MKLIB)
ocamlc_cmd = $(ocamlc)
ocamlopt_cmd = $(ocamlopt)
+ FLEXLINK_CMD=flexlink
else
ifeq "$(wildcard $(ROOTDIR)/flexlink.opt$(EXE))" ""
FLEXLINK_ENV = \
@@ -91,6 +91,8 @@ endif # ifeq "$(wildcard $(ROOTDIR)/flexlink.opt$(EXE))" ""
MKLIB_CMD = $(FLEXLINK_ENV) $(MKLIB)
ocamlc_cmd = $(FLEXLINK_ENV) $(ocamlc)
ocamlopt_cmd = $(FLEXLINK_ENV) $(ocamlopt)
+ FLEXLINK_CMD=$(ROOTDIR)/boot/ocamlruns$(EXE) \
+ $(ROOTDIR)/boot/flexlink.byte$(EXE)
endif # ifeq "$(BOOTSTRAPPING_FLEXDLL)" "false"
# List of other libraries
diff --git a/ocamltest/Makefile b/ocamltest/Makefile
index 6dcc5b73e5..1f8abec508 100644
--- a/ocamltest/Makefile
+++ b/ocamltest/Makefile
@@ -69,7 +69,6 @@ else
CSC :=
CSCFLAGS :=
endif
-mkexe := $(MKEXE)
ifeq "$(TOOLCHAIN)" "msvc"
CPP := $(CPP) 2> nul
@@ -236,6 +235,9 @@ ocamltest_unix.ml: ocamltest_unix_$(ocamltest_unix).ml
echo '# 1 "$^"' > $@
cat $^ >> $@
+# This value should stay the same, regardless of bootstrapping, to cause
+# MKEXE, MKDLL and MKMAINDLL to be written correctly.
+ocamltest_config.ml: FLEXLINK_CMD=flexlink
ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config
sed $(call SUBST,AFL_INSTRUMENT) \
$(call SUBST,INSTRUMENTED_RUNTIME) \
@@ -262,7 +264,7 @@ ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config
$(call SUBST_STRING,CSCFLAGS) \
$(call SUBST_STRING,EXE) \
$(call SUBST_STRING,MKDLL) \
- $(call SUBST_STRING,mkexe) \
+ $(call SUBST_STRING,MKEXE) \
$(call SUBST_STRING,BYTECCLIBS) \
$(call SUBST_STRING,NATIVECCLIBS) \
$(call SUBST_STRING,ASM) \
diff --git a/ocamltest/ocamltest_config.ml.in b/ocamltest/ocamltest_config.ml.in
index 399d3c3cef..8dc96c88d3 100644
--- a/ocamltest/ocamltest_config.ml.in
+++ b/ocamltest/ocamltest_config.ml.in
@@ -76,7 +76,7 @@ let csc_flags = "%%CSCFLAGS%%"
let exe = "%%EXE%%"
let mkdll = "%%MKDLL%%"
-let mkexe = "%%mkexe%%"
+let mkexe = "%%MKEXE%%"
let bytecc_libs = "%%BYTECCLIBS%%"
diff --git a/utils/Makefile b/utils/Makefile
index 3afb6468ce..158f70e262 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -19,6 +19,10 @@ ROOTDIR = ..
include $(ROOTDIR)/Makefile.common
+# This value should stay the same, regardless of bootstrapping, to cause
+# MKEXE, MKDLL and MKMAINDLL to be written correctly.
+FLEXLINK_CMD=flexlink
+
ifeq "$(BOOTSTRAPPING_FLEXDLL)" "false"
FLEXDLL_DIR =
else