Be more forceful when cleaning in compiler/ and ghc/
[ghc-hetmet.git] / compiler / Makefile
index 592498f..69b2903 100644 (file)
@@ -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