X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fc-suffix-rules.mk;h=5134b6ab281c6f6edf8b7a9457e70fbf2c373f77;hb=c34d7dd7c5d01910e5a73b1da3a72ad1a20fa692;hp=6dfed8768017556a1c0dabd3cf9459c7e487fbd1;hpb=34cc75e1a62638f2833815746ebce0a9114dc26b;p=ghc-hetmet.git diff --git a/rules/c-suffix-rules.mk b/rules/c-suffix-rules.mk index 6dfed87..5134b6a 100644 --- a/rules/c-suffix-rules.mk +++ b/rules/c-suffix-rules.mk @@ -1,3 +1,15 @@ +# ----------------------------------------------------------------------------- +# +# (c) 2009 The University of Glasgow +# +# This file is part of the GHC build system. +# +# To understand how the build system works and how to modify it, see +# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture +# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying +# +# ----------------------------------------------------------------------------- + define c-suffix-rules # $1 = dir @@ -6,7 +18,7 @@ define c-suffix-rules # $4 = use GHC (YES/NO) # UseGhcForCc is only relevant when not booting from HC files. -ifeq "$4" "YES" +ifeq "$4 $$(BootingFromHc)" "YES NO" $1/$2/build/%.$$($3_osuf) : $1/%.c $$(MKDIRHIER) $$($1_$2_HC_DEP) $$(RM) $$@ @@ -30,6 +42,10 @@ $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.c $$($1_$2_HC_DEP) $$(RM) $$@ $$($1_$2_HC) $$($1_$2_$3_GHC_CC_OPTS) -S $$< -o $$@ +$1/$2/build/%.$$($3_way_)s : $1/%.c $$($1_$2_HC_DEP) + $$(RM) $$@ + $$($1_$2_HC) $$($1_$2_$3_GHC_CC_OPTS) -S $$< -o $$@ + else $1/$2/build/%.$$($3_osuf) : $1/%.c $$(MKDIRHIER)