diff options
| author | Gabriel Scherer <gabriel.scherer@gmail.com> | 2019-06-20 11:26:24 +0200 |
|---|---|---|
| committer | Gabriel Scherer <gabriel.scherer@gmail.com> | 2019-06-24 08:17:58 +0200 |
| commit | ee156d72cecd6bb9cfc273f7ed5f299926f14a5e (patch) | |
| tree | 5bc2ab0ded68e709e1788cf84c4ae8083dee5324 | |
| parent | 8ba174facf37b087e1974d986b877a0f1f94358a (diff) | |
| download | ocaml-ee156d72cecd6bb9cfc273f7ed5f299926f14a5e.tar.gz | |
fix dynlink/Makefile 'depend' target to work from non-built trees
Dynlink does a weird dance of copying compiler files from various
places. The 'depend' target does not perform this copying, and instead
just 'touch'es the files that should be present to run -- defined in
DEPEND_DUMMY_FILES: if you run 'depend' after a build, you get the
real content of the files, but if you run without building you get
empty files.
This is (dubious but apparently) correct for most of those files which
should not generate dependencies anyway, but not for
dynlink_platform_intf.mli which contains important dependencies (as
in: removing them breaks the parallel build) and should be properly
built before 'depend' runs.
| -rw-r--r-- | otherlibs/dynlink/Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/otherlibs/dynlink/Makefile b/otherlibs/dynlink/Makefile index 2a59ad5bfc..efe6179976 100644 --- a/otherlibs/dynlink/Makefile +++ b/otherlibs/dynlink/Makefile @@ -260,6 +260,9 @@ clean: partialclean $(LOCAL_SRC)/*.ml $(LOCAL_SRC)/*.mli $(LOCAL_SRC)/Makefile \ $(LOCAL_SRC)/.depend byte/dynlink.mli native/dynlink.mli +.PHONY: beforedepend +beforedepend: dynlink_platform_intf.mli + .PHONY: depend ifeq "$(TOOLCHAIN)" "msvc" depend: @@ -269,15 +272,14 @@ DEPEND_DUMMY_FILES=\ native/dynlink_compilerlibs.ml \ byte/dynlink_compilerlibs.mli \ byte/dynlink.mli \ - native/dynlink.mli \ - dynlink_platform_intf.mli + native/dynlink.mli -depend: +depend: beforedepend touch $(DEPEND_DUMMY_FILES) $(CAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash \ - -I byte -bytecode *.mli *.ml byte/dynlink.ml > .depend + -I byte -bytecode *.mli *.ml byte/dynlink.ml > .depend $(CAMLRUN) $(ROOTDIR)/boot/ocamlc -depend -slash \ - -I native -native *.ml native/dynlink.ml >> .depend + -I native -native *.ml native/dynlink.ml >> .depend rm -f $(DEPEND_DUMMY_FILES) endif |
