Clean more files in "make clean"
authorIan Lynagh <igloo@earth.li>
Wed, 11 Jan 2012 15:54:30 +0000 (15:54 +0000)
committerIan Lynagh <igloo@earth.li>
Wed, 11 Jan 2012 15:54:30 +0000 (15:54 +0000)
The libraries get configured during "make", so plain old "make clean"
should clean up the configure droppings.

Also fixed another wildcard/patsubst problem.

ghc.mk

diff --git a/ghc.mk b/ghc.mk
index adb8242..1bd8976 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -1152,6 +1152,9 @@ clean_libraries: $(patsubst %,clean_libraries/%_dist-boot,$(PACKAGES_STAGE0))
 clean_libraries:
        $(call removeTrees,$(patsubst %, libraries/%/dist, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
        $(call removeFiles,$(wildcard $(patsubst %, libraries/%/*.buildinfo, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2))))
+       $(call removeFiles,$(patsubst %, libraries/%/config.log, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
+       $(call removeFiles,$(patsubst %, libraries/%/config.status, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
+       $(call removeFiles,$(wildcard $(patsubst %, libraries/%/include/Hs*Config.h, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2))))
 
 # We have to define a clean target for each library manually, because the
 # libraries/*/ghc.mk files are not included when we're cleaning.
@@ -1186,10 +1189,6 @@ distclean : clean
        $(call removeFiles,libraries/old-time/include/HsTimeConfig.h)
        $(call removeTrees,utils/ghc-pwd/dist)
        $(call removeTrees,inplace)
-
-       $(call removeFiles,$(patsubst %, libraries/%/config.log, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
-       $(call removeFiles,$(patsubst %, libraries/%/config.status, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
-       $(call removeFiles,$(patsubst %, $(wildcard,libraries/%/include/Hs*Config.h), $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
        $(call removeTrees,$(patsubst %, libraries/%/autom4te.cache, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
 
 maintainer-clean : distclean