summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-06-09 20:14:40 +0100
committerIan Lynagh <ian@well-typed.com>2013-06-09 20:14:40 +0100
commit4c49772492f9703403d60dbb7a95bb29b5125fda (patch)
treedb433612475b2db7f7bed18cdc5ed4aeb737c1e9
parent96eca81ab1da4a23d138bbed73700c4e8ac7812b (diff)
downloadhaskell-4c49772492f9703403d60dbb7a95bb29b5125fda.tar.gz
Rarrange the distclean list; part of #7941
-rw-r--r--ghc.mk48
1 files changed, 41 insertions, 7 deletions
diff --git a/ghc.mk b/ghc.mk
index c604a9adeb..f635ca3b61 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -1220,21 +1220,55 @@ clean_bindistprep:
$(call removeTrees,bindistprep/)
distclean : clean
- $(call removeFiles,config.cache config.status config.log mk/config.h mk/stamp-h)
- $(call removeFiles,mk/config.mk mk/are-validating.mk mk/project.mk)
- $(call removeFiles,mk/config.mk.old mk/project.mk.old)
- $(call removeFiles,settings docs/users_guide/ug-book.xml)
- $(call removeFiles,compiler/ghc.cabal compiler/ghc.cabal.old)
+# Clean the files that ./validate creates.
+ $(call removeFiles,mk/are-validating.mk)
+
+# Clean the files that we ask ./configure to create.
+ $(call removeFiles,mk/config.mk)
+ $(call removeFiles,mk/install.mk)
+ $(call removeFiles,mk/project.mk)
+ $(call removeFiles,compiler/ghc.cabal)
$(call removeFiles,ghc/ghc-bin.cabal)
+ $(call removeFiles,utils/runghc/runghc.cabal)
+ $(call removeFiles,settings)
+ $(call removeFiles,docs/users_guide/ug-book.xml)
+ $(call removeFiles,docs/users_guide/ug-ent.xml)
+ $(call removeFiles,docs/index.html)
+ $(call removeFiles,libraries/prologue.txt)
+ $(call removeFiles,distrib/configure.ac)
+
+# ./configure also makes these.
+ $(call removeFiles,mk/stamp-h)
+ $(call removeFiles,mk/config.h)
+
+# Internal files generated by ./configure for itself.
+ $(call removeFiles,config.cache config.status config.log)
+
+# ./configure build ghc-pwd in utils/ghc-pwd/dist-boot, so clean it up.
+ $(call removeTrees,utils/ghc-pwd/dist-boot)
+
+# The root Makefile makes .old versions of some files that configure
+# generates, so we clean those too.
+ $(call removeFiles,mk/config.mk.old)
+ $(call removeFiles,mk/project.mk.old)
+ $(call removeFiles,compiler/ghc.cabal.old)
+
+# Clean the *Config.h files generated by library configure scripts
$(call removeFiles,libraries/base/include/HsBaseConfig.h)
$(call removeFiles,libraries/directory/include/HsDirectoryConfig.h)
$(call removeFiles,libraries/process/include/HsProcessConfig.h)
$(call removeFiles,libraries/unix/include/HsUnixConfig.h)
$(call removeFiles,libraries/old-time/include/HsTimeConfig.h)
- $(call removeTrees,utils/ghc-pwd/dist-boot)
+
+# The library configure scripts also like creating autom4te.cache
+# directories, so clean them all up.
+ $(call removeTrees,$(patsubst %, libraries/%/autom4te.cache, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
+
+# Not sure why this is being cleaned here.
$(call removeTrees,includes/dist-derivedconstants)
+
+# Finally, clean the inplace tree.
$(call removeTrees,inplace)
- $(call removeTrees,$(patsubst %, libraries/%/autom4te.cache, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
maintainer-clean : distclean
$(call removeFiles,configure mk/config.h.in)