summaryrefslogtreecommitdiff
path: root/Makefile
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
commit921af2df64e66ad52b8bf71e079313a694d58c3b (patch)
tree3250ad68ecb22da8ec2a1c5900842e53190e5288 /Makefile
parentd26b55fa4ea98356f4301038dc5bd5bef1d97c0b (diff)
downloadrabbitmq-server-git-921af2df64e66ad52b8bf71e079313a694d58c3b.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 action
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index fc1aea8f29..3f2707830a 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)