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
commit9f471584afc3cf312529d9b0682609162e179d7d (patch)
treebcd82c599b199f937c19da81be43d0559001b5ca
parente9b9cbd3642c1fde11cde99185853a3696d5551d (diff)
downloadrabbitmq-server-9f471584afc3cf312529d9b0682609162e179d7d.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 8b60c8c4..e308f0f1 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