From: Ian Lynagh Date: Sun, 10 Aug 2008 14:24:09 +0000 (+0000) Subject: Make "make clean" in ghc/ only clean the stage we want to clean X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=40b2f7ad5fa53842ffa8e3f701926c373ea9a9ad;hp=5a82864902fc01cf8eee847fcf4ee88e74aa535d;p=ghc-hetmet.git Make "make clean" in ghc/ only clean the stage we want to clean --- diff --git a/ghc/Makefile b/ghc/Makefile index cb12241..4160cdc 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