summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTony Garnock-Jones <tonygarnockjones@gmail.com>2010-03-23 08:17:51 -0700
committerTony Garnock-Jones <tonygarnockjones@gmail.com>2010-03-23 08:17:51 -0700
commit1f913f8e27fdd59373b072bb7bc7f219dd461f71 (patch)
tree936f1abe9be2d68011510a636e9dff59f4636b4d /Makefile
parentb23697669c2d9bb527f9580e0e14c9d5ed15698a (diff)
parent7cdcee25bca9c548daf3873a74436353d66101bb (diff)
downloadrabbitmq-server-1f913f8e27fdd59373b072bb7bc7f219dd461f71.tar.gz
Merge bug22457 into default
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 93c69e7f..c93d8085 100644
--- a/Makefile
+++ b/Makefile
@@ -246,4 +246,20 @@ install_dirs:
mkdir -p $(SBIN_DIR)
mkdir -p $(TARGET_DIR)/sbin
+# Note that all targets which depend on clean must have clean in their
+# 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).
+
+# We want to load the dep file if *any* target *doesn't* contain
+# "clean" - i.e. if removing all clean-like targets leaves something
+
+ifeq "$(MAKECMDGOALS)" ""
+TESTABLEGOALS:=$(.DEFAULT_GOAL)
+else
+TESTABLEGOALS:=$(MAKECMDGOALS)
+endif
+
+ifneq "$(strip $(patsubst clean%,,$(patsubst %clean,,$(TESTABLEGOALS))))" ""
-include $(DEPS_FILE)
+endif