X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fhs-suffix-rules-srcdir.mk;h=30dd6c50eb61fad51bcc5a1d87a2dd6161d457e6;hb=ebb3712252c4328f5e79ad7d2c3ba986a907631b;hp=8c8e381a064f5e2f4fb9dd2d985ee00d468ff3f7;hpb=c59c053f0b8613dd128297ee0b6eef31f001c498;p=ghc-hetmet.git diff --git a/rules/hs-suffix-rules-srcdir.mk b/rules/hs-suffix-rules-srcdir.mk index 8c8e381..30dd6c5 100644 --- a/rules/hs-suffix-rules-srcdir.mk +++ b/rules/hs-suffix-rules-srcdir.mk @@ -16,6 +16,8 @@ define hs-suffix-rules-srcdir # Preprocessing Haskell source +ifneq "$$(BootingFromHc)" "YES" + $1/$2/build/%.hs : $1/$4/%.ly $$(MKDIRHIER) $$(MKDIRHIER) $$(dir $$@) $$(HAPPY) $$($1_$2_$3_ALL_HAPPY_OPTS) $$< -o $$@ @@ -47,9 +49,18 @@ $1/$2/build/%.$$($3_hcsuf) : $1/$4/%.hs $$($1_$2_HC_DEP) $1/$2/build/%.$$($3_hcsuf) : $1/$4/%.lhs $$($1_$2_HC_DEP) $$($1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -C $$< -o $$@ +endif + # XXX: for some reason these get used in preference to the direct # .hs->.o rule, I don't know why --SDM +$1/$2/build/%.$$($3_osuf) : $1/$4/%.hc includes/ghcautoconf.h includes/ghcplatform.h + $$(MKDIRHIER) $$(dir $$@) + $$(CC) $$($1_$2_$3_ALL_CC_OPTS) -Iincludes -x c -c $$< -o $$@ + +$1/$2/build/%.$$($3_osuf) : $1/$2/build/%.hc includes/ghcautoconf.h includes/ghcplatform.h + $$(CC) $$($1_$2_$3_ALL_CC_OPTS) -Iincludes -x c -c $$< -o $$@ + # $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)hc # $$($1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@ #