make setting the version number a little easier for osx

This commit is contained in:
Charles Kerr 2007-08-27 17:35:21 +00:00
parent 5006480a7f
commit a72d156b9c
2 changed files with 14 additions and 14 deletions

View File

@ -14,7 +14,7 @@ clean:
# Check if this is a release or an SVN build # Check if this is a release or an SVN build
# #
include mk/version.mk include mk/version.mk
ifeq ($(VERSION_STRING),$(VERSION_MAJOR).$(VERSION_MINOR)) ifeq ($(STABLE_RELEASE),"yes")
VERSION_PACKAGE = $(VERSION_STRING) VERSION_PACKAGE = $(VERSION_STRING)
else else
VERSION_PACKAGE = $(VERSION_STRING)-r$(VERSION_REVISION) VERSION_PACKAGE = $(VERSION_STRING)-r$(VERSION_REVISION)

View File

@ -2,21 +2,23 @@
# #
# $Id$ # $Id$
# constraint: strlen(MAJOR MINOR MAINT BETA) must be 4 # these should be the only two lines you need to change
# convention: BETA: "Z" for a beta, "0" for a stable PEERID_PREFIX="-TR080Z-"
MAJOR="0" USERAGENT_PREFIX="0.80+"
MINOR="8"
MAINT="1"
BETA="Z"
STRING=0.81+
PEERID_PREFIX="-TR081Z-"
USERAGENT_PREFIX="0.81+"
SVN_REVISION=`find ./ -name "*\.[ch]" -o -name "*\.cpp" -o -name "*\.po" | \ SVN_REVISION=`find ./ -name "*\.[ch]" -o -name "*\.cpp" -o -name "*\.po" | \
xargs grep "\$Id:" | \ xargs grep "\$Id:" | \
grep -v third-party | \ grep -v third-party | \
cut -d"$Id:" -f3 | cut -d" " -f3 | sort -n | tail -n 1` cut -d"$Id:" -f3 | cut -d" " -f3 | sort -n | tail -n 1`
if test "x${PEERID_PREFIX//Z/}" = "x$PEERID_PREFIX";
then
STABLE_RELEASE=yes
else
STABLE_RELEASE=no
fi
# Generate files to be included: only overwrite them if changed so make # Generate files to be included: only overwrite them if changed so make
# won't rebuild everything unless necessary # won't rebuild everything unless necessary
replace_if_differs () replace_if_differs ()
@ -30,11 +32,9 @@ replace_if_differs ()
# Generate version.mk # Generate version.mk
cat > mk/version.mk.new << EOF cat > mk/version.mk.new << EOF
VERSION_MAJOR = "$MAJOR"
VERSION_MINOR = "$MINOR"
VERSION_MAINTENANCE = "$MAINT"
VERSION_REVISION = "$SVN_REVISION" VERSION_REVISION = "$SVN_REVISION"
VERSION_STRING = "$STRING ($SVN_REVISION)" VERSION_STRING = "$USERAGENT_PREFIX ($SVN_REVISION)"
STABLE_RELEASE = "$STABLE_RELEASE"
EOF EOF
replace_if_differs mk/version.mk.new mk/version.mk replace_if_differs mk/version.mk.new mk/version.mk