On tarball creation, check package/git version

Check that the package version matches the git version
(the output of "git describe") before creating dist tarballs.
This commit is contained in:
Hans Ulrich Niedermann 2008-01-09 17:01:15 +01:00 committed by Julien Danjou
parent 26d54994c4
commit 5aa2d4fd1a
1 changed files with 15 additions and 0 deletions

View File

@ -143,6 +143,21 @@ if HAVE_ASCIIDOC
endif
# Check that package version matches git version before creating dist tarballs
dist-hook: git-version-check
distcheck-hook: git-version-check
git-version-check:
git_ver=`{ test -d $(top_srcdir)/.git && git --git-dir=$(top_srcdir)/.git describe 2> /dev/null; } || echo devel`; \
if test "x$${git_ver}" = "x$(PACKAGE_VERSION)"; then :; else \
echo "ERROR: The PACKAGE_VERSION and the 'git describe' version do not match:"; \
echo " current git version: $${git_ver}"; \
echo " current package version: $(PACKAGE_VERSION)"; \
echo "You can update the PACKAGE_VERSION by running $(top_srcdir)/autogen.sh."; \
exit 1; \
fi
EXTRA_DIST += awesome.doxygen.in
# Workaround for buggy pre-1.5.3 doxygen.