diff options
author | Ian Lynagh <igloo@earth.li> | 2010-04-24 18:18:23 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-04-24 18:18:23 +0000 |
commit | 85f096f8051d4a5c20ac36c1b8866007ad4146c3 (patch) | |
tree | 9e31482f67a0f28827edfb2b81784747352dae7a /rules/build-prog.mk | |
parent | 5a6c2ce786ec8daf2e63f08513d17496414c18f2 (diff) | |
download | haskell-85f096f8051d4a5c20ac36c1b8866007ad4146c3.tar.gz |
Make sure all the clean rules are always included
In particular, this fixes a problem where stage3 bits weren't being cleaned
Diffstat (limited to 'rules/build-prog.mk')
-rw-r--r-- | rules/build-prog.mk | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk index b88a2bb557..ebc899052f 100644 --- a/rules/build-prog.mk +++ b/rules/build-prog.mk @@ -34,10 +34,21 @@ ifeq "$$(findstring $3,0 1 2)" "" $$(error $1/$2: stage argument to build-prog should be 0, 1, or 2) endif -$(call all-target,$1,all_$1_$2) - $(call clean-target,$1,$2,$1/$2) +ifneq "$$($1_$2_NOT_NEEDED)" "YES" +$$(eval $$(call build-prog-helper,$1,$2,$3)) +endif +endef + + +define build-prog-helper +# $1 = dir +# $2 = distdir +# $3 = GHC stage to use (0 == bootstrapping compiler) + +$(call all-target,$1,all_$1_$2) + $(call package-config,$1,$2,$3) ifeq "$$($1_USES_CABAL)" "YES" |