summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-05-14 10:56:45 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-05-14 10:56:45 +0000
commitcd12c32de77ac18a69ed1733a558095567ec5ba8 (patch)
treed67caa869c9f03da14992868f072a6b8eb40763d /ghc.mk
parente4b74d50df90bfdd78e279e4d29232648ca22180 (diff)
downloadhaskell-cd12c32de77ac18a69ed1733a558095567ec5ba8.tar.gz
make repeated 'make distclean' not fail
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/ghc.mk b/ghc.mk
index fa286089f1..3d5ead2642 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -134,18 +134,23 @@ show:
# -----------------------------------------------------------------------------
# Include subsidiary build-system bits
+ifneq "$(findstring clean,$(MAKECMDGOALS))" ""
+-include mk/config.mk
+else
include mk/config.mk
-
ifeq "$(ProjectVersion)" ""
$(error Please run ./configure first)
endif
+endif
# (Optional) build-specific configuration
include mk/custom-settings.mk
+ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
ifeq "$(GhcLibWays)" ""
$(error $$(GhcLibWays) is empty, it must contain at least one way)
endif
+endif
# -----------------------------------------------------------------------------
# Macros for standard targets
@@ -559,9 +564,11 @@ libraries/base3-compat_dist-install_HC_OPTS += -XPackageImports
ifneq "$(BINDIST)" "YES"
+ifneq "$(BOOTSTRAPPING_CONF)" ""
ifeq "$(wildcard $(BOOTSTRAPPING_CONF))" ""
$(shell echo "[]" >$(BOOTSTRAPPING_CONF))
endif
+endif
$(eval $(call clean-target,$(BOOTSTRAPPING_CONF),,$(BOOTSTRAPPING_CONF)))