summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Hinderer <Sebastien.Hinderer@inria.fr>2021-04-21 15:56:01 +0200
committerSébastien Hinderer <Sebastien.Hinderer@inria.fr>2021-04-27 19:39:46 +0200
commit2a9c7b61c8c30ae269e88c44383fecaf7e265f80 (patch)
tree7e6d436c0ed3dc9190fb4d878ff56ee8d604e124
parentff32380dd6a8837dfef811d871a8cf5907321ee3 (diff)
downloadocaml-2a9c7b61c8c30ae269e88c44383fecaf7e265f80.tar.gz
Build system: rename the CAMLRUN variable to OCAMLRUN
Since ocamldoc/Makefile.best_ocamldoc was already using OCAMLRUN (rather than CAMLRUN), it was possible to remove its definition in that file, because the value is now initialised globally in Makefile.common.
-rw-r--r--Makefile16
-rw-r--r--Makefile.best_binaries4
-rw-r--r--Makefile.common6
-rw-r--r--Makefile.dev2
-rw-r--r--lex/Makefile2
-rw-r--r--manual/src/cmds/Makefile6
-rw-r--r--manual/src/refman/Makefile6
-rw-r--r--manual/src/tutorials/Makefile6
-rw-r--r--manual/tests/Makefile2
-rw-r--r--ocamldoc/Makefile.best_ocamldoc2
-rw-r--r--otherlibs/Makefile.otherlibs.common2
-rw-r--r--otherlibs/bigarray/Makefile2
-rw-r--r--otherlibs/dynlink/Makefile4
-rw-r--r--otherlibs/str/Makefile2
-rw-r--r--otherlibs/systhreads/Makefile4
-rw-r--r--otherlibs/unix/Makefile2
-rw-r--r--otherlibs/win32unix/Makefile2
-rw-r--r--stdlib/Makefile6
-rw-r--r--tools/Makefile3
19 files changed, 39 insertions, 40 deletions
diff --git a/Makefile b/Makefile
index 0805fe0f93..0679d93d9f 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ endif
include stdlib/StdlibModules
CAMLC=$(BOOT_OCAMLC) -g -nostdlib -I boot -use-prims runtime/primitives
-CAMLOPT=$(CAMLRUN) ./ocamlopt$(EXE) -g -nostdlib -I stdlib -I otherlibs/dynlink
+CAMLOPT=$(OCAMLRUN) ./ocamlopt$(EXE) -g -nostdlib -I stdlib -I otherlibs/dynlink
ARCHES=amd64 i386 arm arm64 power s390x riscv
INCLUDES=-I utils -I parsing -I typing -I bytecomp -I file_formats \
-I lambda -I middle_end -I middle_end/closure \
@@ -58,7 +58,7 @@ else
OCAML_NATDYNLINKOPTS = -ccopt "$(NATDYNLINKOPTS)"
endif
-CAMLDEP=$(CAMLRUN) boot/ocamlc -depend
+CAMLDEP=$(OCAMLRUN) boot/ocamlc -depend
DEPFLAGS=-slash
DEPINCLUDES=$(INCLUDES)
@@ -165,7 +165,7 @@ core: coldstart
# Check if fixpoint reached
-CMPBYT := $(CAMLRUN) tools/cmpbyt$(EXE)
+CMPBYT := $(OCAMLRUN) tools/cmpbyt$(EXE)
.PHONY: compare
compare:
@@ -195,7 +195,7 @@ promote-cross: promote-common
# Promote the newly compiled system to the rank of bootstrap compiler
# (Runs on the new runtime, produces code for the new runtime)
.PHONY: promote
-promote: PROMOTE = $(CAMLRUN) tools/stripdebug
+promote: PROMOTE = $(OCAMLRUN) tools/stripdebug
promote: promote-common
cp runtime/ocamlrun$(EXE) boot/ocamlrun$(EXE)
@@ -243,7 +243,7 @@ coreboot:
# Rebuild the library (using runtime/ocamlrun ./ocamlc)
$(MAKE) library-cross
# Promote the new compiler and the new runtime
- $(MAKE) CAMLRUN=runtime/ocamlrun$(EXE) promote
+ $(MAKE) OCAMLRUN=runtime/ocamlrun$(EXE) promote
# Rebuild the core system
$(MAKE) partialclean
$(MAKE) core
@@ -621,7 +621,7 @@ ocaml.tmp: $(ocaml_dependencies)
$(CAMLC) $(LINKFLAGS) -I toplevel/byte -linkall -o $@ $^
ocaml$(EXE): $(expunge) ocaml.tmp
- - $(CAMLRUN) $^ $@ $(PERVASIVES)
+ - $(OCAMLRUN) $^ $@ $(PERVASIVES)
partialclean::
rm -f ocaml$(EXE)
@@ -713,7 +713,7 @@ cvt_emit := tools/cvt_emit$(EXE)
asmcomp/emit.ml: asmcomp/$(ARCH)/emit.mlp $(cvt_emit)
echo \# 1 \"$(ARCH)/emit.mlp\" > $@
- $(CAMLRUN) $(cvt_emit) < $< >> $@ \
+ $(OCAMLRUN) $(cvt_emit) < $< >> $@ \
|| { rm -f $@; exit 2; }
partialclean::
@@ -782,7 +782,7 @@ library: ocamlc
.PHONY: library-cross
library-cross:
$(MAKE) -C stdlib \
- $(BOOT_FLEXLINK_CMD) CAMLRUN=../runtime/ocamlrun$(EXE) all
+ $(BOOT_FLEXLINK_CMD) OCAMLRUN=../runtime/ocamlrun$(EXE) all
.PHONY: libraryopt
libraryopt:
diff --git a/Makefile.best_binaries b/Makefile.best_binaries
index fb3402b295..4f05f698d1 100644
--- a/Makefile.best_binaries
+++ b/Makefile.best_binaries
@@ -40,7 +40,7 @@ choose_best = $(strip $(if \
$(and $(USE_BEST_BINARIES),$(wildcard $(ROOTDIR)/$1.opt$(EXE)),$(strip \
$(call check_not_stale,$1$(EXE),$1.opt$(EXE)))), \
$(ROOTDIR)/$1.opt$(EXE), \
- $(CAMLRUN) $(ROOTDIR)/$1$(EXE)))
+ $(OCAMLRUN) $(ROOTDIR)/$1$(EXE)))
BEST_OCAMLC := $(call choose_best,ocamlc)
BEST_OCAMLOPT := $(call choose_best,ocamlopt)
@@ -50,7 +50,7 @@ BEST_OCAMLLEX := $(call choose_best,lex/ocamllex)
# is not built yet, using the bootstrap compiler.
# Unlike other tools, there is no risk of mixing incompatible
-# bootrap-compiler and host-compiler object files, as ocamldep only
+# bootstrap-compiler and host-compiler object files, as ocamldep only
# produces text output.
BEST_OCAMLDEP := $(strip $(if \
$(and $(USE_BEST_BINARIES),$(wildcard $(ROOTDIR)/ocamlc.opt$(EXE)),$(strip \
diff --git a/Makefile.common b/Makefile.common
index 3e3f0b099e..a04780e538 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -41,13 +41,13 @@ FLEXDLL_SUBMODULE_PRESENT =
endif
# Use boot/ocamlc.opt if available
-CAMLRUN ?= $(ROOTDIR)/boot/ocamlrun$(EXE)
+OCAMLRUN ?= $(ROOTDIR)/boot/ocamlrun$(EXE)
ifeq (0,$(shell \
test $(ROOTDIR)/boot/ocamlc.opt -nt $(ROOTDIR)/boot/ocamlc; \
echo $$?))
BOOT_OCAMLC = $(ROOTDIR)/boot/ocamlc.opt
else
- BOOT_OCAMLC = $(CAMLRUN) $(ROOTDIR)/boot/ocamlc
+ BOOT_OCAMLC = $(OCAMLRUN) $(ROOTDIR)/boot/ocamlc
endif
ifeq "$(FLEXDLL_SUBMODULE_PRESENT)" ""
@@ -126,7 +126,7 @@ endef # PROGRAM_SYNONYM
# Lexer generation
-BOOT_OCAMLLEX ?= $(CAMLRUN) $(ROOTDIR)/boot/ocamllex
+BOOT_OCAMLLEX ?= $(OCAMLRUN) $(ROOTDIR)/boot/ocamllex
# Default value for OCAMLLEX
# In those directories where this needs to be overriden, the overriding
diff --git a/Makefile.dev b/Makefile.dev
index 90a69dece1..9ad90a572e 100644
--- a/Makefile.dev
+++ b/Makefile.dev
@@ -27,7 +27,7 @@ build-all-asts:
@$(MAKE) --no-print-directory $(AST_FILES)
CAMLC_DPARSETREE := \
- $(CAMLRUN) ./ocamlc -nostdlib -nopervasives \
+ $(OCAMLRUN) ./ocamlc -nostdlib -nopervasives \
-stop-after parsing -dparsetree
%.ml.ast: %.ml ocamlc
diff --git a/lex/Makefile b/lex/Makefile
index 9880334d17..210d4ccb0b 100644
--- a/lex/Makefile
+++ b/lex/Makefile
@@ -28,7 +28,7 @@ OCAMLYACCFLAGS = -v
CAMLC = $(BOOT_OCAMLC) -strict-sequence -nostdlib \
-I $(ROOTDIR)/boot -use-prims $(ROOTDIR)/runtime/primitives
-CAMLOPT = $(CAMLRUN) $(ROOTDIR)/ocamlopt$(EXE) -nostdlib -I $(ROOTDIR)/stdlib
+CAMLOPT = $(OCAMLRUN) $(ROOTDIR)/ocamlopt$(EXE) -nostdlib -I $(ROOTDIR)/stdlib
COMPFLAGS = -absname -w +a-4-9-41-42-44-45-48-70 -warn-error +A \
-safe-string -strict-sequence -strict-formats -bin-annot
LINKFLAGS =
diff --git a/manual/src/cmds/Makefile b/manual/src/cmds/Makefile
index 066921e460..fff0f2189a 100644
--- a/manual/src/cmds/Makefile
+++ b/manual/src/cmds/Makefile
@@ -5,10 +5,10 @@ LD_PATH = "$(ROOTDIR)/otherlibs/str:$(ROOTDIR)/otherlibs/unix"
TOOLS = ../../tools
CAMLLATEX = $(SET_LD_PATH) \
- $(CAMLRUN) $(ROOTDIR)/tools/caml-tex \
+ $(OCAMLRUN) $(ROOTDIR)/tools/caml-tex \
-repo-root $(ROOTDIR) -n 80 -v false
-TEXQUOTE = $(CAMLRUN) $(TOOLS)/texquote2
-TRANSF = $(SET_LD_PATH) $(CAMLRUN) $(TOOLS)/transf
+TEXQUOTE = $(OCAMLRUN) $(TOOLS)/texquote2
+TRANSF = $(SET_LD_PATH) $(OCAMLRUN) $(TOOLS)/transf
FILES = comp.tex top.tex runtime.tex native.tex lexyacc.tex intf-c.tex \
ocamldep.tex profil.tex debugger.tex ocamldoc.tex \
diff --git a/manual/src/refman/Makefile b/manual/src/refman/Makefile
index e8dbfb1abb..7b03ad0c92 100644
--- a/manual/src/refman/Makefile
+++ b/manual/src/refman/Makefile
@@ -5,10 +5,10 @@ LD_PATH = "$(ROOTDIR)/otherlibs/str:$(ROOTDIR)/otherlibs/unix"
TOOLS = ../../tools
CAMLLATEX = $(SET_LD_PATH) \
- $(CAMLRUN) $(ROOTDIR)/tools/caml-tex \
+ $(OCAMLRUN) $(ROOTDIR)/tools/caml-tex \
-repo-root $(ROOTDIR) -n 80 -v false
-TEXQUOTE = $(CAMLRUN) $(TOOLS)/texquote2
-TRANSF = $(SET_LD_PATH) $(CAMLRUN) $(TOOLS)/transf
+TEXQUOTE = $(OCAMLRUN) $(TOOLS)/texquote2
+TRANSF = $(SET_LD_PATH) $(OCAMLRUN) $(TOOLS)/transf
EXTENSION_FILES = letrecvalues.tex recursivemodules.tex locallyabstract.tex \
firstclassmodules.tex moduletypeof.tex signaturesubstitution.tex \
diff --git a/manual/src/tutorials/Makefile b/manual/src/tutorials/Makefile
index 5ce1fefd2d..1061b9e159 100644
--- a/manual/src/tutorials/Makefile
+++ b/manual/src/tutorials/Makefile
@@ -5,10 +5,10 @@ LD_PATH = "$(ROOTDIR)/otherlibs/str:$(ROOTDIR)/otherlibs/unix"
TOOLS = ../../tools
CAMLLATEX = $(SET_LD_PATH) \
- $(CAMLRUN) $(ROOTDIR)/tools/caml-tex \
+ $(OCAMLRUN) $(ROOTDIR)/tools/caml-tex \
-repo-root $(ROOTDIR) -n 80 -v false
-TEXQUOTE = $(CAMLRUN) $(TOOLS)/texquote2
-TRANSF = $(SET_LD_PATH) $(CAMLRUN) $(TOOLS)/transf
+TEXQUOTE = $(OCAMLRUN) $(TOOLS)/texquote2
+TRANSF = $(SET_LD_PATH) $(OCAMLRUN) $(TOOLS)/transf
FILES = coreexamples.tex lablexamples.tex objectexamples.tex \
diff --git a/manual/tests/Makefile b/manual/tests/Makefile
index 435cd3fc74..ec3cd499c8 100644
--- a/manual/tests/Makefile
+++ b/manual/tests/Makefile
@@ -23,7 +23,7 @@ cross-reference-checker: cross_reference_checker.ml
.PHONY: check-cross-references
check-cross-references: cross-reference-checker
$(SET_LD_PATH) \
- $(CAMLRUN) ./cross-reference-checker \
+ $(OCAMLRUN) ./cross-reference-checker \
-auxfile $(MANUAL)/texstuff/manual.aux \
$(ROOTDIR)/utils/warnings.ml \
$(ROOTDIR)/driver/main_args.ml \
diff --git a/ocamldoc/Makefile.best_ocamldoc b/ocamldoc/Makefile.best_ocamldoc
index 08066efa22..c2557ac4f2 100644
--- a/ocamldoc/Makefile.best_ocamldoc
+++ b/ocamldoc/Makefile.best_ocamldoc
@@ -13,8 +13,6 @@
#* *
#**************************************************************************
-
-OCAMLRUN ?= $(ROOTDIR)/boot/ocamlrun$(EXE)
OCAMLDOC=$(ROOTDIR)/ocamldoc/ocamldoc$(EXE)
OCAMLDOC_OPT=$(ROOTDIR)/ocamldoc/ocamldoc.opt$(EXE)
diff --git a/otherlibs/Makefile.otherlibs.common b/otherlibs/Makefile.otherlibs.common
index 7de8ecf86b..95ff4d58fe 100644
--- a/otherlibs/Makefile.otherlibs.common
+++ b/otherlibs/Makefile.otherlibs.common
@@ -35,7 +35,7 @@ COMPFLAGS=-absname -w +a-4-9-41-42-44-45-48 -warn-error +A -bin-annot -g \
ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS += -O3
endif
-MKLIB=$(CAMLRUN) $(ROOTDIR)/tools/ocamlmklib
+MKLIB=$(OCAMLRUN) $(ROOTDIR)/tools/ocamlmklib
# Variables that must be defined by individual libraries:
# LIBNAME
diff --git a/otherlibs/bigarray/Makefile b/otherlibs/bigarray/Makefile
index 577b4f1bff..02130dfd6f 100644
--- a/otherlibs/bigarray/Makefile
+++ b/otherlibs/bigarray/Makefile
@@ -21,6 +21,6 @@ include ../Makefile.otherlibs.common
.PHONY: depend
depend:
- $(CAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash *.mli *.ml > .depend
+ $(OCAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash *.mli *.ml > .depend
include .depend
diff --git a/otherlibs/dynlink/Makefile b/otherlibs/dynlink/Makefile
index bd0e5693b3..41e33d5449 100644
--- a/otherlibs/dynlink/Makefile
+++ b/otherlibs/dynlink/Makefile
@@ -281,9 +281,9 @@ DEPEND_DUMMY_FILES=\
depend: beforedepend
touch $(DEPEND_DUMMY_FILES)
- $(CAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash \
+ $(OCAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash \
-I byte -bytecode *.mli *.ml byte/dynlink.ml > .depend
- $(CAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash \
+ $(OCAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash \
-I native -native *.ml native/dynlink.ml >> .depend
rm -f $(DEPEND_DUMMY_FILES)
diff --git a/otherlibs/str/Makefile b/otherlibs/str/Makefile
index ef8aca1091..e49e9f6ec3 100644
--- a/otherlibs/str/Makefile
+++ b/otherlibs/str/Makefile
@@ -26,6 +26,6 @@ str.cmx: str.cmi
.PHONY: depend
depend:
- $(CAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash *.mli *.ml > .depend
+ $(OCAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash *.mli *.ml > .depend
include .depend
diff --git a/otherlibs/systhreads/Makefile b/otherlibs/systhreads/Makefile
index ec58b8b89b..8fc1bdb926 100644
--- a/otherlibs/systhreads/Makefile
+++ b/otherlibs/systhreads/Makefile
@@ -34,7 +34,7 @@ LIBS = -nostdlib -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/$(UNIXLIB)
CAMLC=$(BEST_OCAMLC) $(LIBS)
CAMLOPT=$(BEST_OCAMLOPT) $(LIBS)
-MKLIB=$(CAMLRUN) $(ROOTDIR)/tools/ocamlmklib$(EXE)
+MKLIB=$(OCAMLRUN) $(ROOTDIR)/tools/ocamlmklib$(EXE)
COMPFLAGS=-w +33..39 -warn-error +A -g -bin-annot -safe-string
ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS += -O3
@@ -172,6 +172,6 @@ $(foreach object_type, b n, $(eval $(call GEN_RULE,$(object_type))))
.PHONY: depend
depend:
- $(CAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash *.mli *.ml > .depend
+ $(OCAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash *.mli *.ml > .depend
include .depend
diff --git a/otherlibs/unix/Makefile b/otherlibs/unix/Makefile
index 8a1a70fba9..408c3c4f8d 100644
--- a/otherlibs/unix/Makefile
+++ b/otherlibs/unix/Makefile
@@ -51,6 +51,6 @@ include ../Makefile.otherlibs.common
.PHONY: depend
depend:
- $(CAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash *.mli *.ml > .depend
+ $(OCAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash *.mli *.ml > .depend
include .depend
diff --git a/otherlibs/win32unix/Makefile b/otherlibs/win32unix/Makefile
index 0cdb770b1f..6ed21a782c 100644
--- a/otherlibs/win32unix/Makefile
+++ b/otherlibs/win32unix/Makefile
@@ -64,7 +64,7 @@ $(UNIX_FILES) $(UNIX_CAML_FILES): %: ../unix/%
.PHONY: depend
depend: $(ALL_FILES) $(UNIX_CAML_FILES) unix.ml
- $(CAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash $(UNIX_CAML_FILES) \
+ $(OCAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash $(UNIX_CAML_FILES) \
unix.ml > .depend
include .depend
diff --git a/stdlib/Makefile b/stdlib/Makefile
index e87208eb6a..195511d41c 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -20,7 +20,7 @@ include $(ROOTDIR)/Makefile.common
TARGET_BINDIR ?= $(BINDIR)
COMPILER=$(ROOTDIR)/ocamlc$(EXE)
-CAMLC=$(CAMLRUN) $(COMPILER)
+CAMLC=$(OCAMLRUN) $(COMPILER)
COMPFLAGS=-strict-sequence -absname -w +a-4-9-41-42-44-45-48-70 \
-g -warn-error +A -bin-annot -nostdlib -principal \
-safe-string -strict-formats
@@ -28,7 +28,7 @@ ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS += -O3
endif
OPTCOMPILER=$(ROOTDIR)/ocamlopt
-CAMLOPT=$(CAMLRUN) $(OPTCOMPILER)
+CAMLOPT=$(OCAMLRUN) $(OPTCOMPILER)
CAMLDEP=$(BOOT_OCAMLC) -depend
DEPFLAGS=-slash
@@ -240,7 +240,7 @@ stdlib__%.cmx:
-o $@ -c $(filter %.ml, $^)
# Dependencies on the compiler
-COMPILER_DEPS=$(filter-out -use-prims $(CAMLRUN), $(CAMLC))
+COMPILER_DEPS=$(filter-out -use-prims $(OCAMLRUN), $(CAMLC))
$(OBJS) std_exit.cmo: $(COMPILER_DEPS)
$(OBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER_DEPS)
$(OBJS:.cmo=.cmx) std_exit.cmx: $(OPTCOMPILER)
diff --git a/tools/Makefile b/tools/Makefile
index cc9eb592e3..a159e10a2f 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -73,7 +73,8 @@ endef
CAMLC = $(BOOT_OCAMLC) -g -nostdlib -I $(ROOTDIR)/boot \
-use-prims $(ROOTDIR)/runtime/primitives -I $(ROOTDIR)
-CAMLOPT = $(CAMLRUN) $(ROOTDIR)/ocamlopt$(EXE) -g -nostdlib -I $(ROOTDIR)/stdlib
+CAMLOPT = $(OCAMLRUN) $(ROOTDIR)/ocamlopt$(EXE) \
+ -g -nostdlib -I $(ROOTDIR)/stdlib
INCLUDES = $(addprefix -I $(ROOTDIR)/,utils parsing typing bytecomp \
middle_end middle_end/closure middle_end/flambda \
middle_end/flambda/base_types driver toplevel \