Tweak bindist creation
[ghc-hetmet.git] / ghc.mk
diff --git a/ghc.mk b/ghc.mk
index f77f9eb..3271dc4 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -134,6 +134,8 @@ show:
 # -----------------------------------------------------------------------------
 # Include subsidiary build-system bits
 
+include mk/tree.mk
+
 ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
 include mk/config.mk
 ifeq "$(ProjectVersion)" ""
@@ -211,6 +213,10 @@ include rules/c-objs.mk
 # -----------------------------------------------------------------------------
 # Suffix rules
 
+# Suffix rules cause "make clean" to fail on Windows (trac #3233)
+# so we don't make any when cleaning.
+ifneq "$(CLEANING)" "YES"
+
 include rules/hs-suffix-rules-srcdir.mk
 include rules/hs-suffix-rules.mk
 
@@ -227,6 +233,8 @@ $(foreach way,$(ALL_WAYS),\
 
 include rules/c-suffix-rules.mk
 
+endif
+
 # -----------------------------------------------------------------------------
 # Building package-data.mk files from .cabal files