From b530cd78c8403c84a583982158bfd92efedf68b8 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Tue, 9 Apr 2013 11:26:04 +0000 Subject: [PATCH] Makefiles extract version number automatically using printversion script. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6673 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- Makefile | 6 ++---- prism/Makefile | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 99a99417..88b5c21b 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,9 @@ default: none none: @echo 'Did you want to build PRISM? Do "cd prism" and then "make"' -# By default, extract version number from Version.java +# By default, extract version number from Java code using printversion # Can be overridden by passing VERSION=xxx -VERSION_NUM = $(shell grep versionString prism/src/prism/Version.java | sed -E 's/[^"]+"([^"]+)"[^"]+/\1/') -VERSION_SUFFIX = $(shell grep versionSuffixString prism/src/prism/Version.java | sed -E 's/[^"]+"([^"]*)"[^"]+/\1/') -VERSION = $(VERSION_NUM)$(VERSION_SUFFIX) +VERSION = $(shell SRC_DIR=prism/src prism/src/scripts/printversion.sh 2> /dev/null) # Build a source distribution dist_src: version diff --git a/prism/Makefile b/prism/Makefile index ece2aaf5..c92f07e0 100644 --- a/prism/Makefile +++ b/prism/Makefile @@ -381,7 +381,9 @@ bin_scripts: done; @./install.sh silent -VERSION=# default value for VERSION is blank to force provision at command-line +# Unless VERSION has been passed in (as VERSION=xxx), +# extract version number from Java code using printversion +VERSION = $(shell SRC_DIR=$(SRC_DIR) $(SRC_DIR)/scripts/printversion.sh 2> /dev/null) dist_src: dist_check_version dist_copy clean_all dist_tidy