build: Include revision information in distributions.

This commit is contained in:
Tom Goff 2016-01-26 17:01:23 -05:00
parent a09bbd9151
commit af885e156e
3 changed files with 19 additions and 2 deletions

2
.gitignore vendored
View file

@ -1,4 +1,6 @@
.deps
.version
.version.date
Makefile
Makefile.in
aclocal.m4

View file

@ -25,6 +25,7 @@ ACLOCAL_AMFLAGS = -I config
# extra files to include with distribution tarball
EXTRA_DIST = bootstrap.sh LICENSE README-Xen Changelog kernel \
python-prefix.py revision.sh \
.version .version.date \
packaging/bsd \
packaging/deb/compat \
packaging/deb/copyright \
@ -70,3 +71,9 @@ core-restart:
daemon/sbin/core-cleanup
rm -f /var/log/core-daemon.log
/etc/init.d/core-daemon start
.version:
echo $(CORE_VERSION) > $@
.version.date:
echo $(CORE_VERSION_DATE) > $@

View file

@ -44,7 +44,11 @@ esac
_revision()
{
if [ -r .version ]; then
cat .version
else
echo $1$2
fi
}
git_revision()
@ -124,7 +128,11 @@ svn_revision()
_date()
{
if [ -r .version.date ]; then
cat .version.date
else
date '+%Y%m%d'
fi
}
git_date()