summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-06-25 12:14:30 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-06-25 12:14:30 +0100
commit316912564f15dbbfbfc995bf177bb721b7539137 (patch)
tree3250ad68ecb22da8ec2a1c5900842e53190e5288
parentbcebe216aed566ede2e95a3642220f85574b1480 (diff)
downloadrabbitmq-server-bug22879.tar.gz
Simplify logic, plus cosmetics. Both conditionals can now be read as: if we find the eldest of our requirements and the current version, and if that eldest thing is not our requirement then we must have something older, so we take some actionbug22879
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index fc1aea8f..3f270783 100644
--- a/Makefile
+++ b/Makefile
@@ -62,9 +62,6 @@ ERL_CALL=erl_call -sname $(RABBITMQ_NODENAME) -e
ERL_EBIN=erl -noinput -pa $(EBIN_DIR)
-# Versions prior to this are not supported
-NEED_MAKE := 3.80
-
define usage_xml_to_erl
$(subst __,_,$(patsubst $(DOCS_DIR)/rabbitmq%.1.xml, $(SOURCE_DIR)/rabbit_%_usage.erl, $(subst -,_,$(1))))
endef
@@ -79,11 +76,16 @@ SCRIPTS_REL_PATH=$(shell ./calculate-relative $(TARGET_DIR)/sbin $(SBIN_DIR))
endif
endif
-ifeq ($(filter $(NEED_MAKE),$(firstword $(sort $(NEED_MAKE) $(MAKE_VERSION)))),)
+# Versions prior to this are not supported
+NEED_MAKE := 3.80
+ifneq "$(NEED_MAKE)" "$(firstword $(sort $(NEED_MAKE) $(MAKE_VERSION)))"
$(error Versions of make prior to $(NEED_MAKE) are not supported)
endif
-ifeq ($(filter 3.81,$(firstword $(sort 3.81 $(MAKE_VERSION)))),)
-.DEFAULT_GOAL=all # Introduced in 3.81
+
+# .DEFAULT_GOAL introduced in 3.81
+DEFAULT_GOAL_MAKE := 3.81
+ifneq "$(DEFAULT_GOAL_MAKE)" "$(firstword $(sort $(DEFAULT_GOAL_MAKE) $(MAKE_VERSION)))"
+.DEFAULT_GOAL=all
endif
all: $(TARGETS)