darcs patch: Some rules for booting from hc files
Simon Marlow
marlowsd at gmail.com
Mon Nov 9 05:58:24 EST 2009
On 08/11/2009 18:30, Matthias Kilian wrote:
> Sun Nov 8 12:08:27 CET 2009 Matthias Kilian<kili at outback.escape.de>
> * Some rules for booting from hc files
[Some rules for booting from hc files
Matthias Kilian <kili at outback.escape.de>**20091108110827
Ignore-this: bf6a3f7db25010b2de013f98377cbd92
] hunk ./rules/cmm-suffix-rules.mk 51
endif
+## For booting from .hc files.
+$1/$2/build/%.$$($3_osuf) : $1/%.hc
+ "$$(MKDIRHIER)" $$(dir $$@)
+ "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -Iincludes -x c -c $$< -o $$@
+
+## And why is this sprinkled all across the tree? Grrr.
+$1/$2/build/%.$$($3_osuf) : $1/$2/build/%.hc
+ "$$(MKDIRHIER)" $$(dir $$@)
+ "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -Iincludes -x c -c $$< -o $$@
+
endif
I'm sure this isn't right. cmm-suffix-rules.mk is for rules for
building .cmm files. Also, in hs-suffix-rules-srcdir.mk we already have:
$1/$2/build/%.$$($3_osuf) : $1/$4/%.hc includes/ghcautoconf.h
includes/ghcplatform.h | $$$$(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 $$@
#
# $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.hc
# "$$($1_$2_HC)" $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@
#
# $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.$$($3_way_)hc
# "$$($1_$2_HC)" $$($1_$2_$3_ALL_HC_OPTS) -S $$< -o $$@
There are already some problems with these rules:
(1) hard-coded dependencies on ghcautoconf.h and ghcplatform.h
(2) hard-coded -Iincludes
and the second commented-out rule appears to be a duplicate of the
second uncommented rule.
This all needs cleaning up.
Cheers,
Simon
More information about the Cvs-ghc
mailing list