summaryrefslogtreecommitdiff
path: root/packaging/standalone
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-10-09 17:40:44 +0200
committerJean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr>2015-10-20 11:10:48 +0200
commit706cf18bcae67b03a803c15eeabc38a80d9e85d1 (patch)
tree47c136548b8ce132480e4ae7b8b158c17f963262 /packaging/standalone
parent231e90cacf3daec5f43b3307867129e61496b123 (diff)
downloadrabbitmq-server-git-706cf18bcae67b03a803c15eeabc38a80d9e85d1.tar.gz
Give path to the source dist to packages' Makefiles
Diffstat (limited to 'packaging/standalone')
-rw-r--r--packaging/standalone/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/packaging/standalone/Makefile b/packaging/standalone/Makefile
index e1dd1632bc..e75c656e2f 100644
--- a/packaging/standalone/Makefile
+++ b/packaging/standalone/Makefile
@@ -1,6 +1,15 @@
-TARBALL_DIR ?= ../..
-TARBALL ?= $(notdir $(wildcard $(TARBALL_DIR)/rabbitmq-server-[0-9.]*.tar.xz))
-VERSION ?= $(patsubst rabbitmq-server-%.tar.xz,%,$(TARBALL))
+SOURCE_DIST_FILE ?= $(wildcard ../../../rabbitmq-server-*.tar.xz)
+ifeq ($(SOURCE_DIST_FILE),)
+$(error Cannot find source archive; please specify SOURCE_DIST_FILE)
+endif
+ifneq ($(words $(SOURCE_DIST_FILE)),1)
+$(error Multile source archives found; please specify SOURCE_DIST_FILE)
+endif
+
+VERSION ?= $(patsubst rabbitmq-server-%.tar.xz,%,$(notdir $(SOURCE_DIST_FILE)))
+ifeq ($(VERSION),)
+$(error Cannot determine version; please specify VERSION)
+endif
SOURCE_DIR=rabbitmq-server-$(VERSION)
TARGET_DIR=rabbitmq_server-$(VERSION)
@@ -25,7 +34,7 @@ all: dist
@:
dist:
- tar -Jxf $(TARBALL_DIR)/$(TARBALL)
+ tar -Jxf $(SOURCE_DIST_FILE)
$(MAKE) -C $(SOURCE_DIR) \
PREFIX= RMQ_ROOTDIR= \