diff --git a/Makefile.in b/Makefile.in index 0575f48c4c4..ecccddb0cfa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -574,19 +574,10 @@ ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \ $(foreach host,$(CFG_HOST_TRIPLES), \ all-target-$(target)-host-$(host))) -all: rustllvm/llvm-auto-clean-stamp \ - $(ALL_TARGET_RULES) $(GENERATED) docs +all: $(ALL_TARGET_RULES) $(GENERATED) docs endif -# This is used to independently force an LLVM clean rebuild -# when we changed something not otherwise captured by builtin -# dependencies. In these cases, commit a change that touches -# the stamp in the source dir. -rustllvm/llvm-auto-clean-stamp: $(S)src/rustllvm/llvm-auto-clean-trigger - $(Q)$(MAKE) clean-llvm - touch $@ - ###################################################################### # Re-configuration diff --git a/mk/llvm.mk b/mk/llvm.mk index 12ccc55d4fa..9e024ffa9f4 100644 --- a/mk/llvm.mk +++ b/mk/llvm.mk @@ -24,12 +24,22 @@ define DEF_LLVM_RULES # If CFG_LLVM_ROOT is defined then we don't build LLVM ourselves ifeq ($(CFG_LLVM_ROOT),) -$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) +LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp + +$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1)) @$$(call E, make: llvm) $$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV) $$(Q)touch $$(LLVM_CONFIG_$(1)) endif +# This is used to independently force an LLVM clean rebuild +# when we changed something not otherwise captured by builtin +# dependencies. In these cases, commit a change that touches +# the stamp in the source dir. +$$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger + $(Q)$(MAKE) clean-llvm + touch $$@ + endef $(foreach host,$(CFG_HOST_TRIPLES), \