# HG changeset patch # User Oleksandr Gavenko # Date 1326631119 -7200 # Node ID 003356f9e504afce7e6eb8e1e201d4863217a50d # Parent 38e8a1063673a46d2eec8fd0527ac366afade8bf Gather all available version info. diff -r 38e8a1063673 -r 003356f9e504 Makefile --- a/Makefile Fri Jan 13 23:41:20 2012 +0200 +++ b/Makefile Sun Jan 15 14:38:39 2012 +0200 @@ -54,12 +54,25 @@ -include VERSION VERSION: - ver=$$(hg log -r . --template '{latesttag}'); \ -ver=$${ver#t}; \ -major=$${ver%.*}; \ -minor=$${ver#*.}; \ -printf "vmajor=%s\nvminor=%s\n" $$major $$minor >VERSION - # is_release=`hg log --template '{latesttagdistance}'` + \ +vtagdist=$$(hg log -r . --template '{latesttagdistance}'); \ +vatrelease=$$([ $$vtagdist = 0 ] && echo yes || echo no); \ +vtag=$$(hg log -r . --template '{latesttag}'); \ +vmajor=$${vtag#t}; \ +vmajor=$${vmajor%.*}; \ +vminor=$${vtag#*.}; \ +vrev=$$(hg id -i); \ +visclean=$$(case $$vrev in *+) echo no;; *) echo yes;; esac); \ +vrev=$${vrev%+}; \ +{ \ +echo "vrev=$$vrev"; \ +echo "vtag=$$vtag"; \ +echo "vtagdist=$$vtagdist"; \ +echo "visclean=$$visclean"; \ +echo "vatrelease=$$vatrelease"; \ +echo "vmajor=$$vmajor"; \ +echo "vminor=$$vminor"; \ +} >VERSION ################################################################ # Determine platform/environment. @@ -266,12 +279,21 @@ .PHONY: help help: - @echo - @echo vmajor=$(vmajor) - @echo vminor=$(vminor) - @echo - @echo Supported targets: - @sed -n -e '/^[[:alnum:]_-]*:/{s=^\(.*\):.*= \1=;p;}' $(BUILD_SCRIPT) + @\ +echo; \ +echo Current configuration:; \ +echo; \ +sed 's=^= ='