diff options
author | Ian Lynagh <igloo@earth.li> | 2008-08-10 14:24:09 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-08-10 14:24:09 +0000 |
commit | 40b2f7ad5fa53842ffa8e3f701926c373ea9a9ad (patch) | |
tree | 0032c8f29b27edfb09a017ac42df6c9dba565051 /ghc/Makefile | |
parent | 5a82864902fc01cf8eee847fcf4ee88e74aa535d (diff) | |
download | haskell-40b2f7ad5fa53842ffa8e3f701926c373ea9a9ad.tar.gz |
Make "make clean" in ghc/ only clean the stage we want to clean
Diffstat (limited to 'ghc/Makefile')
-rw-r--r-- | ghc/Makefile | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ghc/Makefile b/ghc/Makefile index cb122413ec..4160cdc6d4 100644 --- a/ghc/Makefile +++ b/ghc/Makefile @@ -34,13 +34,15 @@ stage2 :: stage3 :: $(MAKE) stage=3 -clean distclean:: - -$(CABAL) clean --distpref dist-stage1 - -$(CABAL) clean --distpref dist-stage2 - -$(CABAL) clean --distpref dist-stage3 - $(RM) -rf stage1-inplace - $(RM) -rf stage2-inplace - $(RM) -rf stage3-inplace +ifeq "$(CLEAN_ALL_STAGES)" "YES" +clean distclean:: clean.stage.1 clean.stage.2 clean.stage.3 +else +clean distclean:: clean.stage.$(stage) +endif + +clean.stage.%: + -$(CABAL) clean --distpref dist-stage$* + $(RM) -rf stage$*-inplace # XXX This should be defined somewhere more central INPLACE_DATA_DIR = $(FPTOOLS_TOP_ABS)/inplace-datadir |