From 894775f034d278ff5493eeaf8587914626e8df21 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 18 Sep 2008 13:44:43 +0000 Subject: [PATCH] Be more forceful when cleaning in compiler/ and ghc/ Now that the Cabal file is generated by configure, it would be nice if clean worked even if the cabal file is missing. So now we just rm -rf the dist directory. --- compiler/Makefile | 6 +++++- ghc/Makefile | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/compiler/Makefile b/compiler/Makefile index 592498f..69b2903 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -77,8 +77,12 @@ distclean:: endif clean.stage.%: - -$(CABAL) clean --distpref dist-stage$* $(RM) -f Makefile-stage$* +# This is a bit naughty. We ought to use: +# -$(CABAL) clean --distpref dist-stage$* +# but that won't work if the Cabal file (a generated file) doesn't +# exist. So we do this instead: + $(RM) -rf dist-stage$* CONFIGURE_FLAGS_STAGE1 += --flags=stage1 CONFIGURE_FLAGS_STAGE2 += --flags=-stage1 diff --git a/ghc/Makefile b/ghc/Makefile index c0664df..23a5384 100644 --- a/ghc/Makefile +++ b/ghc/Makefile @@ -47,8 +47,12 @@ distclean:: endif clean.stage.%: - -$(CABAL) clean --distpref dist-stage$* $(RM) -rf stage$*-inplace +# This is a bit naughty. We ought to use: +# -$(CABAL) clean --distpref dist-stage$* +# but that won't work if the Cabal file (a generated file) doesn't +# exist. So we do this instead: + $(RM) -rf dist-stage$* CONFIGURE_FLAGS_STAGE1 += --flags=-ghci -- 1.7.10.4