Disable suffix rules when cleaning
authorIan Lynagh <igloo@earth.li>
Fri, 15 May 2009 23:19:47 +0000 (23:19 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 15 May 2009 23:19:47 +0000 (23:19 +0000)
ghc.mk

diff --git a/ghc.mk b/ghc.mk
index f77f9eb..b857e7b 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -211,6 +211,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 +231,8 @@ $(foreach way,$(ALL_WAYS),\
 
 include rules/c-suffix-rules.mk
 
+endif
+
 # -----------------------------------------------------------------------------
 # Building package-data.mk files from .cabal files