summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-06-11 10:40:28 +0300
committerLasse Collin <lasse.collin@tukaani.org>2010-06-11 10:40:28 +0300
commit3e49c8acb0f5312948eddb2342dbb5802d4571d0 (patch)
treec3968aecf018c5199a448c697e24981de4538ed3 /Makefile.am
parentd8b41eedce486d400f701b757b7b5e4e32276618 (diff)
downloadxz-3e49c8acb0f5312948eddb2342dbb5802d4571d0.tar.gz
Put the git commit to the filename in mydist rule.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 749494c..9d6cf1e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -77,5 +77,9 @@ dist-hook:
# This works with GNU tar and gives cleaner package than normal 'make dist'.
mydist:
+ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
+ SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
+ test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
+ fi; \
TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
- $(MAKE) dist-gzip
+ $(MAKE) VERSION="$$VERSION" dist-gzip