]> granicus.if.org Git - xz/commitdiff
Put the git commit to the filename in mydist rule.
authorLasse Collin <lasse.collin@tukaani.org>
Fri, 11 Jun 2010 07:40:28 +0000 (10:40 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 11 Jun 2010 07:40:28 +0000 (10:40 +0300)
Makefile.am

index 749494c4f6d255c364b3d980d58b9be2daa0f52f..9d6cf1ec62aa810463958d86f5e182c4f41611a1 100644 (file)
@@ -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