diff options
author | Sébastien Hinderer <seb@tarides.com> | 2022-12-08 10:11:56 +0100 |
---|---|---|
committer | Sébastien Hinderer <seb@tarides.com> | 2022-12-12 10:30:29 +0100 |
commit | 355ca2c4632249c1408c014548e8df12fa6cff47 (patch) | |
tree | 29528a68b6283ef6b66843c982805aa43714140f /tools | |
parent | b45639afcc2d175efe15060778ee039f8762e644 (diff) | |
download | ocaml-355ca2c4632249c1408c014548e8df12fa6cff47.tar.gz |
tools/Makefile: compile make_opcodes in two steps rather than one
Before this commit, make_opcodes was compiled and linked by the same command.
This commit dissociates the link stage from the compile stage, so that
the compilation can use the patern-rules and thus all the default
compile flags.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/.depend | 7 | ||||
-rw-r--r-- | tools/Makefile | 6 | ||||
-rw-r--r-- | tools/make_opcodes.mli | 16 |
3 files changed, 24 insertions, 5 deletions
diff --git a/tools/.depend b/tools/.depend index 01a5a5a5ea..e722ecc5da 100644 --- a/tools/.depend +++ b/tools/.depend @@ -67,8 +67,11 @@ lintapidiff.cmx : \ ../utils/misc.cmx \ ../parsing/location.cmx \ ../typing/ident.cmx -make_opcodes.cmo : -make_opcodes.cmx : +make_opcodes.cmo : \ + make_opcodes.cmi +make_opcodes.cmx : \ + make_opcodes.cmi +make_opcodes.cmi : objinfo.cmo : \ ../bytecomp/symtable.cmi \ ../middle_end/symbol.cmi \ diff --git a/tools/Makefile b/tools/Makefile index b0c0c4242d..4979cf2491 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -217,8 +217,8 @@ make_opcodes := make_opcodes$(EXE) $(eval $(call PROGRAM_SYNONYM,make_opcodes)) -$(make_opcodes): make_opcodes.ml - $(CAMLC) -g $< -o $@ +$(make_opcodes): make_opcodes.cmo + $(CAMLC) $(LINKFLAGS) $< -o $@ opnames.ml: $(ROOTDIR)/runtime/caml/instruct.h $(make_opcodes) $(NEW_OCAMLRUN) $(make_opcodes) -opnames < $< > $@ @@ -226,7 +226,7 @@ opnames.ml: $(ROOTDIR)/runtime/caml/instruct.h $(make_opcodes) clean:: rm -f opnames.ml make_opcodes make_opcodes.exe make_opcodes.ml -beforedepend:: opnames.ml +beforedepend:: opnames.ml make_opcodes.ml # Display info on compiled files diff --git a/tools/make_opcodes.mli b/tools/make_opcodes.mli new file mode 100644 index 0000000000..26b5aac33e --- /dev/null +++ b/tools/make_opcodes.mli @@ -0,0 +1,16 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Sebastien Hinderer, Tarides, Paris *) +(* *) +(* Copyright 2022 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* make_opcodes.mll exports no definition so here is an empty interface *) |