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