diff options
Diffstat (limited to 'rules')
-rw-r--r-- | rules/build-dependencies.mk | 3 | ||||
-rw-r--r-- | rules/hi-rule.mk | 14 | ||||
-rw-r--r-- | rules/hs-suffix-way-rules.mk | 5 |
3 files changed, 4 insertions, 18 deletions
diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk index 4a4f5638e2..346ee10148 100644 --- a/rules/build-dependencies.mk +++ b/rules/build-dependencies.mk @@ -48,7 +48,8 @@ endif # Some packages are from the bootstrapping compiler, so are not # within the build tree. On Windows this causes a problem as they look # like bad rules, due to the two colons, so we filter them out. - grep -v ' : [a-zA-Z]:/' $$@.tmp > $$@ + grep -v ' : [a-zA-Z]:/' $$@.tmp > $$@.tmp2 + sed '/hs$$$$/ { p; s/o /hi /g; s/:/ : %hi: %o /; s/^/$$$$(eval $$$$(call hi-rule,/; s/$$$$/))/ }; /hs-boot$$$$/ { p; s/o-boot /hi-boot /g; s/:/ : %hi-boot: %o-boot /; s/^/$$$$(eval $$$$(call hi-rule,/; s/$$$$/))/ }' $$@.tmp2 > $$@ # Some of the C files (directly or indirectly) include the generated # includes files. diff --git a/rules/hi-rule.mk b/rules/hi-rule.mk index e478c17aea..a343389967 100644 --- a/rules/hi-rule.mk +++ b/rules/hi-rule.mk @@ -71,25 +71,15 @@ # # a/%.hi : a/%.o b/%.hs ; -define hi-rule # $1 = source directory, $2 = object directory, $3 = way - -$(call hi-rule-helper,$2/%.$$($3_hisuf) : $2/%.$$($3_osuf) $1/%.hs) -$(call hi-rule-helper,$2/%.$$($3_hisuf) : $2/%.$$($3_osuf) $1/%.lhs) - -$(call hi-rule-helper,$2/%.$$($3_way_)hi-boot : $2/%.$$($3_way_)o-boot $1/%.hs) -$(call hi-rule-helper,$2/%.$$($3_way_)hi-boot : $2/%.$$($3_way_)o-boot $1/%.lhs) - -endef - ifeq "$(ExtraMakefileSanityChecks)" "NO" -define hi-rule-helper # $1 = rule header +define hi-rule # $1 = rule header $1 ; endef else -define hi-rule-helper # $1 = rule header +define hi-rule # $1 = rule header $1 @if [ ! -f $$@ ] ; then \ echo "Panic! $$< exists, but $$@ does not."; \ diff --git a/rules/hs-suffix-way-rules.mk b/rules/hs-suffix-way-rules.mk index bfab91227d..884ed7009f 100644 --- a/rules/hs-suffix-way-rules.mk +++ b/rules/hs-suffix-way-rules.mk @@ -32,10 +32,5 @@ endif $$(foreach dir,$$($1_$2_HS_SRC_DIRS),\ $$(eval $$(call hs-suffix-way-rules-srcdir,$1,$2,$3,$$(dir)))) -$(call hi-rule,$1/$2/build,$1/$2/build,$3) -$(call hi-rule,$1/$2/build/autogen,$1/$2/build,$3) -$$(foreach dir,$$($1_$2_HS_SRC_DIRS),\ - $$(eval $$(call hi-rule,$1/$$(dir),$1/$2/build,$3))) - endef # hs-suffix-way-rules |