diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-05-26 16:07:40 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-05-30 16:49:08 +0200 |
commit | 4de8028d702abbf74cc2abf0c2bfe0c1ec29c26d (patch) | |
tree | 914fcdf46ddc2694d48ec34223d38f996623d131 | |
parent | 51aacde6f0eab264099330b8d69aa2deb9810917 (diff) | |
download | haskell-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]
-rw-r--r-- | ghc.mk | 8 | ||||
-rw-r--r-- | libraries/integer-gmp/gmp/ghc.mk | 2 | ||||
-rw-r--r-- | rules/build-perl.mk | 2 | ||||
-rw-r--r-- | rules/build-prog.mk | 6 | ||||
-rw-r--r-- | testsuite/mk/boilerplate.mk | 1 |
5 files changed, 10 insertions, 9 deletions
@@ -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 diff --git a/libraries/integer-gmp/gmp/ghc.mk b/libraries/integer-gmp/gmp/ghc.mk index 78a7cf03c7..9c7a2a3ad2 100644 --- a/libraries/integer-gmp/gmp/ghc.mk +++ b/libraries/integer-gmp/gmp/ghc.mk @@ -46,7 +46,7 @@ endif ifeq "$(phase)" "final" -ifeq "$(findstring clean,$(MAKECMDGOALS))" "" +ifneq "$(CLEANING)" "YES" include libraries/integer-gmp/gmp/config.mk endif 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 $$< $$@ diff --git a/testsuite/mk/boilerplate.mk b/testsuite/mk/boilerplate.mk index 43bc4dfb08..f8b1dcb1df 100644 --- a/testsuite/mk/boilerplate.mk +++ b/testsuite/mk/boilerplate.mk @@ -187,6 +187,7 @@ $(ghc-config-mk) : $(TOP)/mk/ghc-config $(TOP)/mk/ghc-config "$(TEST_HC)" >"$@"; if [ $$? != 0 ]; then $(RM) "$@"; exit 1; fi # If the ghc-config fails, remove $@, and fail +# Note: $(CLEANING) is not defined in the testsuite. ifeq "$(findstring clean,$(MAKECMDGOALS))" "" include $(ghc-config-mk) endif |