summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-03-22 11:44:06 +0000
committerMatthew Sackman <matthew@lshift.net>2010-03-22 11:44:06 +0000
commit41be81600ddb1433199fee4344cd61ddc9cae1b6 (patch)
treebcd82c599b199f937c19da81be43d0559001b5ca
parentd4894895bff41762397dad3b3eae95d58143962a (diff)
downloadrabbitmq-server-git-41be81600ddb1433199fee4344cd61ddc9cae1b6.tar.gz
The previous logic was saying 'if we can't find 'clean' in there, load the deps file'. This is wrong - eg make cleandb run. The new logic says 'if removing all targets which have 'clean' in them doesn't result in the empty string, load the deps file'. This means make cleandb run does load the deps file, whilst make clean cleandb doesn't.
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8b60c8c4ed..e308f0f181 100644
--- a/Makefile
+++ b/Makefile
@@ -250,6 +250,9 @@ install_dirs:
# name. Also any target that doesn't depend on clean should not have
# clean in its name, unless you know that you don't need any of the
# automatic dependency generation for that target (eg cleandb).
-ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
+
+# We want to load the dep file if *any* target *doesn't* contain
+# "clean" - i.e. if removing all clean-like targets leaves something
+ifneq "$(strip $(patsubst clean%,,$(patsubst %clean,,$(MAKECMDGOALS))))" ""
-include $(DEPS_FILE)
endif