Improve depfile generation for rustc.

This commit is contained in:
Graydon Hoare 2011-03-15 12:24:18 -07:00
parent 6cfeac8373
commit 400df70643

View File

@ -848,14 +848,17 @@ ifneq ($(RUSTBOOT_PROBE),)
CFG_INFO := $(info cfg: using built $(CFG_BOOT) for rust deps)
STDLIB_DEPFILE := $(CFG_STDLIB).d
RUSTC_DEPFILE := $(CFG_RUSTC).d
CRATE_DEPFILES := $(ALL_TEST_CRATES:%.rc=%.d) $(STDLIB_DEPFILE)
CRATE_DEPFILES := $(ALL_TEST_CRATES:%.rc=%.d) \
$(STDLIB_DEPFILE) \
$(RUSTC_DEPFILE)
$(STDLIB_DEPFILE): $(STDLIB_CRATE) $(MKFILES) $(CFG_BOOT) $(STDLIB_INPUTS)
@$(call CFG_ECHO, dep: $<)
$(BOOT) -shared -rdeps $< $(CFG_PATH_MUNGE) >$@.tmp \
&& mv $@.tmp $@
$(RUSTC_DEPFILE): $(STDLIB_CRATE) $(MKFILES) $(CFG_BOOT) $(COMPILER_INPUTS)
$(RUSTC_DEPFILE): $(COMPILER_CRATE) $(COMPILER_INPUTS) \
$(STDLIB_CRATE) $(MKFILES) $(CFG_BOOT)
@$(call CFG_ECHO, dep: $<)
$(BOOT) -shared -rdeps $< $(CFG_PATH_MUNGE) >$@.tmp \
&& mv $@.tmp $@