Improve makefile to try to avoid wedging on failure-to-dep lib/std.rc
This commit is contained in:
parent
023e5af639
commit
3bc263f102
15
src/Makefile
15
src/Makefile
|
@ -631,17 +631,17 @@ test/run-fail/%.bc: test/run-fail/%.rs $(REQ)
|
||||||
ML_DEPFILES := $(BOOT_MLS:%.ml=%.d)
|
ML_DEPFILES := $(BOOT_MLS:%.ml=%.d)
|
||||||
C_DEPFILES := $(RUNTIME_CS:%.cpp=%.d)
|
C_DEPFILES := $(RUNTIME_CS:%.cpp=%.d)
|
||||||
|
|
||||||
%.d: %.cpp $(MKFILES)
|
%.d.tmp: %.cpp $(MKFILES)
|
||||||
@$(call CFG_ECHO, dep: $<)
|
@$(call CFG_ECHO, dep: $<)
|
||||||
$(CFG_QUIET)$(call CFG_DEPEND_C, $@ \
|
$(CFG_QUIET)$(call CFG_DEPEND_C, $@ \
|
||||||
$(patsubst %.cpp, %$(CFG_OBJ_SUFFIX), $<), \
|
$(patsubst %.cpp, %$(CFG_OBJ_SUFFIX), $<), \
|
||||||
$(RUNTIME_INCS)) $< $(CFG_PATH_MUNGE) >$@
|
$(RUNTIME_INCS)) $< $(CFG_PATH_MUNGE) >$@
|
||||||
|
|
||||||
%.d: %.ml $(MKFILES)
|
%.d.tmp: %.ml $(MKFILES)
|
||||||
@$(call CFG_ECHO, dep: $<)
|
@$(call CFG_ECHO, dep: $<)
|
||||||
$(CFG_QUIET)ocamldep$(OPT) $(ML_INCS) $< $(CFG_PATH_MUNGE) >$@
|
$(CFG_QUIET)ocamldep$(OPT) $(ML_INCS) $< $(CFG_PATH_MUNGE) >$@
|
||||||
|
|
||||||
%.d: %.mli $(MKFILES)
|
%.d.tmp: %.mli $(MKFILES)
|
||||||
@$(call CFG_ECHO, dep: $<)
|
@$(call CFG_ECHO, dep: $<)
|
||||||
$(CFG_QUIET)ocamldep$(OPT) $(ML_INCS) $< $(CFG_PATH_MUNGE) >$@
|
$(CFG_QUIET)ocamldep$(OPT) $(ML_INCS) $< $(CFG_PATH_MUNGE) >$@
|
||||||
|
|
||||||
|
@ -656,18 +656,21 @@ CFG_INFO := $(info cfg: using built $(CFG_BOOT) for rust deps)
|
||||||
STDLIB_DEPFILE := $(CFG_STDLIB).d
|
STDLIB_DEPFILE := $(CFG_STDLIB).d
|
||||||
CRATE_DEPFILES := $(ALL_TEST_CRATES:%.rc=%.d) $(STDLIB_DEPFILE)
|
CRATE_DEPFILES := $(ALL_TEST_CRATES:%.rc=%.d) $(STDLIB_DEPFILE)
|
||||||
|
|
||||||
$(STDLIB_DEPFILE): $(STDLIB_CRATE) $(MKFILES) $(CFG_BOOT)
|
$(STDLIB_DEPFILE).tmp: $(STDLIB_CRATE) $(MKFILES) $(CFG_BOOT)
|
||||||
@$(call CFG_ECHO, dep: $<)
|
@$(call CFG_ECHO, dep: $<)
|
||||||
$(BOOT) -shared -rdeps $< $(CFG_PATH_MUNGE) >$@
|
$(BOOT) -shared -rdeps $< $(CFG_PATH_MUNGE) >$@
|
||||||
|
|
||||||
%.d: %.rc $(MKFILES) $(CFG_BOOT)
|
%.d.tmp: %.rc $(MKFILES) $(CFG_BOOT)
|
||||||
@$(call CFG_ECHO, dep: $<)
|
@$(call CFG_ECHO, dep: $<)
|
||||||
$(BOOT) -rdeps $< $(CFG_PATH_MUNGE) >$@
|
$(BOOT) -rdeps $< $(CFG_PATH_MUNGE) >$@
|
||||||
|
|
||||||
%.d: %.rs $(MKFILES) $(CFG_BOOT)
|
%.d.tmp: %.rs $(MKFILES) $(CFG_BOOT)
|
||||||
@$(call CFG_ECHO, dep: $<)
|
@$(call CFG_ECHO, dep: $<)
|
||||||
$(BOOT) -rdeps $< $(CFG_PATH_MUNGE) >$@
|
$(BOOT) -rdeps $< $(CFG_PATH_MUNGE) >$@
|
||||||
|
|
||||||
|
%.d: %.d.tmp
|
||||||
|
$(CFG_QUIET)mv $< $@
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include $(CRATE_DEPFILES)
|
-include $(CRATE_DEPFILES)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue