summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2019-07-18 09:54:11 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-07-19 18:09:28 -0400
commit257d1fd86e6e5e7d145d71707904d8fe54024041 (patch)
tree1c4d2807d15d363c2d9a30ef39949333dd62bd9c /ghc.mk
parentbec17997c40cd0a68004a5a9fb4d3cf2a39711ad (diff)
downloadhaskell-257d1fd86e6e5e7d145d71707904d8fe54024041.tar.gz
Don't maintainer-clean libraries/ghc-boot/ghc.mk (#16953)
This makes the `maintainer-clean` rule in `ghc.mk` slightly more sophisticated so that it does not remove the version-controlled file `libraries/ghc-boot/ghc.mk`, which was checked into version control in commit 24782b89907ab36fb5aef3a17584f4c10f1e2690. Fixes #16953.
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/ghc.mk b/ghc.mk
index 6db08c965f..84687fd08f 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -1418,12 +1418,16 @@ distclean : clean
$(call removeFiles,libraries/base/include/fs.h)
$(call removeFiles,libraries/base/cbits/fs.c)
+CLEAN_LIBRARY_GHC_MK_FILES += $(patsubst %, libraries/%/ghc.mk, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2))
+# Don't clean `libraries/ghc-boot/ghc.mk`, since it's intended to be version-controlled (#16953)
+CLEAN_LIBRARY_GHC_MK_FILES := $(filter-out libraries/ghc-boot/ghc.mk,$(CLEAN_LIBRARY_GHC_MK_FILES))
+
maintainer-clean : distclean
$(call removeFiles,configure mk/config.h.in)
$(call removeTrees,autom4te.cache $(wildcard libraries/*/autom4te.cache))
$(call removeFiles,$(patsubst %, libraries/%/GNUmakefile, \
$(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
- $(call removeFiles,$(patsubst %, libraries/%/ghc.mk, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
+ $(call removeFiles,$(CLEAN_LIBRARY_GHC_MK_FILES))
$(call removeFiles,$(patsubst %, libraries/%/configure, \
$(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
$(call removeFiles,libraries/base/include/HsBaseConfig.h.in)