summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-05-26 16:07:40 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-05-30 16:49:08 +0200
commit4de8028d702abbf74cc2abf0c2bfe0c1ec29c26d (patch)
tree914fcdf46ddc2694d48ec34223d38f996623d131 /ghc.mk
parent51aacde6f0eab264099330b8d69aa2deb9810917 (diff)
downloadhaskell-4de8028d702abbf74cc2abf0c2bfe0c1ec29c26d.tar.gz
Build system: check $CLEANING instead of $MAKECMDGOALS
To check if we're cleaning, always check the $CLEANING variable, instead of sometimes $CLEANING, sometimes $MAKECMDGOALS. [skip ci]
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/ghc.mk b/ghc.mk
index 2f37be8bac..8ce26d2e75 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -140,7 +140,7 @@ echo:
include mk/tree.mk
-ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
+ifneq "$(CLEANING)" "YES"
include mk/config.mk
ifeq "$(ProjectVersion)" ""
$(error Please run ./configure first)
@@ -155,7 +155,7 @@ include mk/custom-settings.mk
SRC_CC_OPTS += $(WERROR)
SRC_HC_OPTS += $(WERROR)
-ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
+ifneq "$(CLEANING)" "YES"
ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
ifeq "$(findstring dyn,$(GhcLibWays))" ""
$(error dyn is not in $$(GhcLibWays), but $$(DYNAMIC_GHC_PROGRAMS) is YES)
@@ -203,7 +203,7 @@ $(eval $(call clean-target,root,inplace,inplace/bin inplace/lib))
# When we're just doing 'make clean' or 'make show', then we don't need
# to build dependencies.
-ifneq "$(findstring clean,$(MAKECMDGOALS))" ""
+ifeq "$(CLEANING)" "YES"
NO_INCLUDE_DEPS = YES
NO_INCLUDE_PKGDATA = YES
endif
@@ -650,7 +650,7 @@ endif
ifeq "$(INTEGER_LIBRARY)" "integer-gmp"
BUILD_DIRS += libraries/integer-gmp/gmp
-else ifneq "$(findstring clean,$(MAKECMDGOALS))" ""
+else ifeq "$(CLEANING)" "YES"
BUILD_DIRS += libraries/integer-gmp/gmp
endif