summaryrefslogtreecommitdiff
path: root/rules/hs-suffix-rules-srcdir.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-05-03 19:05:08 +0000
committerIan Lynagh <igloo@earth.li>2009-05-03 19:05:08 +0000
commitcd7593af81c290085eb857d5b2d05aeaf9cb2cf0 (patch)
treede712726a7dc09ee554c87e8f0c9a63e107e2f22 /rules/hs-suffix-rules-srcdir.mk
parent588ca4b501d3d9581a19d786d1294a69375e2d3d (diff)
downloadhaskell-cd7593af81c290085eb857d5b2d05aeaf9cb2cf0.tar.gz
Add a .hc building rules for bootstrapping
Diffstat (limited to 'rules/hs-suffix-rules-srcdir.mk')
-rw-r--r--rules/hs-suffix-rules-srcdir.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/rules/hs-suffix-rules-srcdir.mk b/rules/hs-suffix-rules-srcdir.mk
index 8c8e381a06..e2b8c39f1b 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,14 @@ $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
+ $$(CC) $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@
+
# $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)hc
# $$($1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@
#