From: Ian Lynagh Date: Sun, 23 Jan 2011 00:10:45 +0000 (+0000) Subject: Tweak some deps to avoid multiple $(wildcard ...)s X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=032dd778604f80378823af026a99850141ad6cd3 Tweak some deps to avoid multiple $(wildcard ...)s Note that some things depending on the rts/includes header files now depend on more files: They used to include depend on includes/*.h, but now they also depend on header files in subdirectories. As far as I can see this was a bug. --- diff --git a/includes/ghc.mk b/includes/ghc.mk index 3746493..8411a26 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -135,7 +135,7 @@ includes_dist-derivedconstants_PROG = mkDerivedConstants$(exeext) $(eval $(call build-prog,includes,dist-derivedconstants,0)) -$(includes_dist-derivedconstants_depfile_c_asm) : $(includes_H_CONFIG) $(includes_H_PLATFORM) $(wildcard includes/*.h) $(wildcard rts/*.h) +$(includes_dist-derivedconstants_depfile_c_asm) : $(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_H_FILES) $$(rts_H_FILES) includes/dist-derivedconstants/build/mkDerivedConstants.o : $(includes_H_CONFIG) $(includes_H_PLATFORM) ifneq "$(BINDIST)" "YES" @@ -165,7 +165,7 @@ includes_dist-ghcconstants_CC_OPTS = -DGEN_HASKELL $(eval $(call build-prog,includes,dist-ghcconstants,0)) ifneq "$(BINDIST)" "YES" -$(includes_dist-ghcconstants_depfile_c_asm) : $(includes_H_CONFIG) $(includes_H_PLATFORM) $(wildcard includes/*.h) $(wildcard rts/*.h) +$(includes_dist-ghcconstants_depfile_c_asm) : $(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_H_FILES) $$(rts_H_FILES) includes/dist-ghcconstants/build/mkDerivedConstants.o : $(includes_H_CONFIG) $(includes_H_PLATFORM) diff --git a/rts/ghc.mk b/rts/ghc.mk index 4303656..7e32454 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -68,7 +68,7 @@ rts/dist/build/sm/Evac_thr.c : rts/sm/Evac.c | $$(dir $$@)/. rts/dist/build/sm/Scav_thr.c : rts/sm/Scav.c | $$(dir $$@)/. cp $< $@ -rts_H_FILES := $(wildcard includes/*.h) $(wildcard rts/*.h) +rts_H_FILES := $(wildcard rts/*.h) ifeq "$(USE_DTRACE)" "YES" DTRACEPROBES_H = rts/dist/build/RtsProbes.h diff --git a/rules/cmm-suffix-rules.mk b/rules/cmm-suffix-rules.mk index 40fc7d1..03f1bc5 100644 --- a/rules/cmm-suffix-rules.mk +++ b/rules/cmm-suffix-rules.mk @@ -22,16 +22,16 @@ ifneq "$$(CLEANING)" "YES" ifneq "$$(BootingFromHc)" "YES" -$1/$2/build/%.$$($3_way_)o : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. +$1/$2/build/%.$$($3_way_)o : $1/%.cmm $$(rts_H_FILES) $$(includes_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -c $$< -o $$@ -$1/$2/build/%.$$($3_way_)o : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. +$1/$2/build/%.$$($3_way_)o : $1/$2/build/%.cmm $$(rts_H_FILES) $$(includes_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -c $$< -o $$@ -$1/$2/build/%.$$($3_way_)hc : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. +$1/$2/build/%.$$($3_way_)hc : $1/%.cmm $$(rts_H_FILES) $$(includes_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -C $$< -o $$@ -$1/$2/build/%.$$($3_way_)hc : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. +$1/$2/build/%.$$($3_way_)hc : $1/$2/build/%.cmm $$(rts_H_FILES) $$(includes_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -C $$< -o $$@ # XXX @@ -42,10 +42,10 @@ $1/$2/build/%.$$($3_way_)hc : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) # so for now they're commented out. They aren't needed, as we can always # go directly to .o files. # -# $1/$2/build/%.$$($3_way_)s : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. +# $1/$2/build/%.$$($3_way_)s : $1/%.cmm $$(rts_H_FILES) $$(includes_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. # "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -S $$< -o $$@ # -# $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. +# $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.cmm $$(rts_H_FILES) $$(includes_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. # "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -S $$< -o $$@ endif