summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2013-07-17 10:25:58 +0100
committerTim Watson <tim@rabbitmq.com>2013-07-17 10:25:58 +0100
commitd614af371f311a3f92969c65e77ccfff89e1cc0a (patch)
treeb53c11e1555c3416af810d2293fb7ca346a04808 /Makefile
parent4ee05e6853631411bd4a87ba7fdd55292bb9a77c (diff)
downloadrabbitmq-server-git-d614af371f311a3f92969c65e77ccfff89e1cc0a.tar.gz
Add version.mk, avoid sed when building srcdist, allow VERSION to be provided
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 79d62b5149..56d4b3c05c 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,8 @@ endif
#other args: +native +"{hipe,[o3,verbose]}" -Ddebug=true +debug_info +no_strict_record_tests
ERLC_OPTS=-I $(INCLUDE_DIR) -o $(EBIN_DIR) -Wall -v +debug_info $(call boolean_macro,$(USE_SPECS),use_specs) $(call boolean_macro,$(USE_PROPER_QC),use_proper_qc)
-VERSION?=0.0.0
+include version.mk
+
PLUGINS_SRC_DIR?=$(shell [ -d "plugins-src" ] && echo "plugins-src" || echo )
PLUGINS_DIR=plugins
TARBALL_NAME=rabbitmq-server-$(VERSION)
@@ -262,7 +263,7 @@ srcdist: distclean
cp -r $(AMQP_CODEGEN_DIR)/* $(TARGET_SRC_DIR)/codegen/
cp codegen.py Makefile generate_app generate_deps calculate-relative $(TARGET_SRC_DIR)
- sed -i -e "s:^VERSION?=0.0.0:VERSION=${VERSION}:" $(TARGET_SRC_DIR)/Makefile
+ echo "VERSION?=${VERSION}" > $(TARGET_SRC_DIR)/version.mk
cp -r scripts $(TARGET_SRC_DIR)
cp -r $(DOCS_DIR) $(TARGET_SRC_DIR)