From 1b2c564d4a086277ee5811eae7d09bab09525eee Mon Sep 17 00:00:00 2001 From: Tim Watson Date: Tue, 9 Jul 2013 12:02:25 +0100 Subject: ensure that srcdist inserts the correct version into the bundled makefile --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 9a6ad7a6..79d62b51 100644 --- a/Makefile +++ b/Makefile @@ -262,6 +262,8 @@ 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 + cp -r scripts $(TARGET_SRC_DIR) cp -r $(DOCS_DIR) $(TARGET_SRC_DIR) chmod 0755 $(TARGET_SRC_DIR)/scripts/* -- cgit v1.2.1 From ff96a34159cf49f4a51e622861a4df1b4b0236c4 Mon Sep 17 00:00:00 2001 From: Tim Watson Date: Wed, 17 Jul 2013 10:25:58 +0100 Subject: Add version.mk, avoid sed when building srcdist, allow VERSION to be provided --- Makefile | 5 +++-- version.mk | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 version.mk diff --git a/Makefile b/Makefile index 79d62b51..56d4b3c0 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) diff --git a/version.mk b/version.mk new file mode 100644 index 00000000..5683af4a --- /dev/null +++ b/version.mk @@ -0,0 +1 @@ +VERSION?=0.0.0 -- cgit v1.2.1