Makefiles: require only the bootstrap compiler for BEST_OCAMLDEP

master
Gabriel Scherer 2020-05-01 09:54:31 +02:00 committed by David Allsopp
parent acbe348228
commit a5b6fd198a
1 changed files with 11 additions and 1 deletions

View File

@ -43,4 +43,14 @@ BEST_OCAMLC := $(call choose_best,ocamlc)
BEST_OCAMLOPT := $(call choose_best,ocamlopt)
BEST_OCAMLLEX := $(call choose_best,lex/ocamllex)
BEST_OCAMLDEP := $(BEST_OCAMLC) -depend
# We want to be able to compute dependencies even if the bytecode compiler
# 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
# produces text output.
BEST_OCAMLDEP := $(strip $(if \
$(and $(wildcard $(ROOTDIR)/ocamlc.opt),$(strip \
$(call check_not_stale,boot/ocamlc,ocamlc.opt))), \
$(ROOTDIR)/ocamlc.opt -depend, \
$(BOOT_OCAMLC) -depend))