summaryrefslogtreecommitdiff
path: root/rules
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 /rules
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 'rules')
-rw-r--r--rules/build-perl.mk2
-rw-r--r--rules/build-prog.mk6
2 files changed, 4 insertions, 4 deletions
diff --git a/rules/build-perl.mk b/rules/build-perl.mk
index 3f7a0269d1..51e92f738f 100644
--- a/rules/build-perl.mk
+++ b/rules/build-perl.mk
@@ -52,7 +52,7 @@ $(call clean-target,$1,$2,$1/$2 $$($1_$2_INPLACE))
clean_$1 : clean_$1_$2
# INPLACE_BIN etc. might be empty if we're cleaning
-ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
+ifneq "$$(CLEANING)" "YES"
ifneq "$$(BINDIST)" "YES"
$1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$$$(unlit_INPLACE) | $$$$(dir $$$$@)/.
"$$(unlit_INPLACE)" $$(UNLIT_OPTS) $$< $$@
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 88f1b53960..939570423a 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -81,13 +81,13 @@ endif
$1_$2_depfile_base = $1/$2/build/.depend
ifeq "$$($1_$2_INSTALL_INPLACE)" "NO"
-ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
+ifneq "$$(CLEANING)" "YES"
$1_$2_INPLACE = $$(error $1_$2 should not be installed inplace, but INPLACE var evaluated)
else
$1_$2_INPLACE =
endif
else
-ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
+ifneq "$$(CLEANING)" "YES"
ifneq "$$($$($1_$2_PROGNAME)_INPLACE)" ""
$$(error $$($1_$2_PROGNAME)_INPLACE defined twice)
endif
@@ -279,7 +279,7 @@ endif
endif
# INPLACE_BIN might be empty if we're distcleaning
-ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
+ifneq "$$(CLEANING)" "YES"
ifeq "$$($1_$2_INSTALL_INPLACE)" "YES"
$$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG_INPLACE) | $$$$(dir $$$$@)/.
$$(INSTALL) -m 755 $$< $$@