Skip to content

Commit baa89a8

Browse files
committed
---
yaml --- r: 1802 b: refs/heads/master c: 6e1f52e h: refs/heads/master v: v3
1 parent c042dbe commit baa89a8

File tree

2 files changed

+81
-2
lines changed

2 files changed

+81
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 804771510e21c7c9ecfc7fec50084102fcdbb5ca
2+
refs/heads/master: 6e1f52e79e331748429bb3765bfe9e1aabdece7a

trunk/Makefile.in

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ ifdef CFG_WINDOWSY
7373
CFG_RUN_TEST=PATH="$(CFG_LDPATH)" $(1)
7474
CFG_RUN_TARG=PATH="$(CFG_LDPATH)" $(1)
7575

76-
CFG_PATH_MUNGE := $(strip | perl -p \
76+
CFG_PATH_MUNGE := $(strip perl -i -p \
7777
-e 's@\\(.)@/\1@go;' \
7878
-e 's@^/([a-zA-Z])/@\1:/@o;')
7979
ifdef CFG_FLEXLINK
@@ -86,6 +86,7 @@ endif
8686
ifdef CFG_UNIXY
8787
CFG_INFO := $(info cfg: unix-y environment)
8888

89+
CFG_PATH_MUNGE := /bin/true
8990
CFG_EXE_SUFFIX :=
9091
CFG_LDPATH :=$(CFG_LDPATH):$(CFG_LLVM_LIBDIR)
9192
CFG_RUN_TARG=\
@@ -924,6 +925,84 @@ test/compile-fail/%.stage0.out.tmp: test/compile-fail/%.rs $(SREQ0)
924925
$(Q)grep --text --quiet \
925926
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@
926927

928+
929+
######################################################################
930+
# Auto-dependency
931+
######################################################################
932+
933+
ML_DEPFILES := $(BOOT_MLS:%.ml=%.d)
934+
C_DEPFILES := $(RUNTIME_CS:%.cpp=%.d) $(RUSTLLVM_CS:%.cpp=%.d)
935+
936+
rt/%.d: rt/%.cpp $(MKFILES)
937+
@$(call E, dep: $@)
938+
$(Q)$(call CFG_DEPEND_C, $@ \
939+
$(subst $(S)src/,,$(patsubst %.cpp, %.o, $<)), \
940+
$(RUNTIME_INCS)) $< >[email protected]
941+
$(Q)$(CFG_PATH_MUNGE) [email protected]
942+
943+
944+
rustllvm/%.d: rustllvm/%.cpp $(MKFILES)
945+
@$(call E, dep: $@)
946+
$(Q)$(call CFG_DEPEND_C, $@ \
947+
$(subst $(S)src/,,$(patsubst %.cpp, %.o, $<)), \
948+
$(CFG_LLVM_CXXFLAGS) $(RUSTLLVM_INCS)) $< >[email protected]
949+
$(Q)$(CFG_PATH_MUNGE) [email protected]
950+
951+
952+
%.d: %.ml $(MKFILES)
953+
@$(call E, dep: $@)
954+
$(Q)ocamldep$(OPT) -slash $(BOOT_ML_DEP_INCS) $< >$@.tmp
955+
$(Q)$(CFG_PATH_MUNGE) $@.tmp
956+
$(Q)perl -i -pe "s@$(S)src/@@go" $@.tmp
957+
$(Q)mv $@.tmp $@
958+
959+
%.d: %.mli $(MKFILES)
960+
@$(call E, dep: $@)
961+
$(Q)ocamldep$(OPT) -slash $(BOOT_ML_DEP_INCS) $< >$@.tmp
962+
$(Q)$(CFG_PATH_MUNGE) $@.tmp
963+
$(Q)perl -i -pe "s@$(S)src/@@go" $@.tmp
964+
$(Q)mv $@.tmp $@
965+
966+
ifneq ($(MAKECMDGOALS),clean)
967+
-include $(ML_DEPFILES) $(C_DEPFILES)
968+
endif
969+
970+
RUSTBOOT_PROBE := $(wildcard boot/rustboot$(X))
971+
972+
ifneq ($(RUSTBOOT_PROBE),)
973+
CFG_INFO := $(info cfg: using built boot/rustboot$(X) for rust deps)
974+
CRATE_DEPFILES := $(subst $(S)src/,,$(ALL_TEST_CRATES:%.rc=%.d)) \
975+
boot/$(CFG_STDLIB).d \
976+
stage0/rustc$(X).d \
977+
stage0/$(CFG_STDLIB).d
978+
979+
boot/$(CFG_STDLIB).d: $(STDLIB_CRATE) $(STDLIB_INPUTS) \
980+
$(MKFILES) boot/rustboot$(X)
981+
@$(call E, dep: $@)
982+
$(BOOT) -o $(patsubst %.d,%,$@) -shared -rdeps $< >[email protected]
983+
$(Q)$(CFG_PATH_MUNGE) [email protected]
984+
985+
986+
stage0/rustc$(X).d: $(COMPILER_CRATE) $(COMPILER_INPUTS) \
987+
$(STDLIB_CRATE) $(MKFILES) boot/rustboot$(X)
988+
@$(call E, dep: $@)
989+
$(BOOT) -o $(patsubst %.d,%,$@) -shared -rdeps $< >[email protected]
990+
$(Q)$(CFG_PATH_MUNGE) [email protected]
991+
992+
993+
%.d: %.rc $(MKFILES) boot/rustboot$(X)
994+
@$(call E, dep: $@)
995+
$(BOOT) -o $(patsubst %.d,%,$@) -rdeps $< >$@.tmp
996+
$(Q)$(CFG_PATH_MUNGE) $@.tmp
997+
$(Q)mv $@.tmp $@
998+
999+
ifneq ($(MAKECMDGOALS),clean)
1000+
-include $(CRATE_DEPFILES)
1001+
endif
1002+
endif
1003+
1004+
depend: boot/rustboot$(X) $(CRATE_DEPFILES) $(ML_DEPFILES) $(C_DEPFILES)
1005+
9271006
######################################################################
9281007
# Distribution
9291008
######################################################################

0 commit comments

Comments
 (0)