Merge pull request #348 from anthraxx/master
authorJens Steube <jens.steube@gmail.com>
Thu, 19 May 2016 18:59:53 +0000 (20:59 +0200)
committerJens Steube <jens.steube@gmail.com>
Thu, 19 May 2016 18:59:53 +0000 (20:59 +0200)
fallback for Makefile version if its not a git checkout (tarball) (re…

.gitattributes [new file with mode: 0644]
src/Makefile

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..d39ea83
--- /dev/null
@@ -0,0 +1 @@
+src/Makefile export-subst
index ea72eb4..7509900 100644 (file)
@@ -80,7 +80,8 @@ CC_WIN_64                := x86_64-w64-mingw32-gcc
 ##
 
 COMPTIME                 := $(shell date +%s)
-VERSION_TAG              := $(shell git describe --tags --dirty=+)
+VERSION_EXPORT           := $Format:%D$
+VERSION_TAG              := $(shell test -d .git && git describe --tags --dirty=+ || echo "$(VERSION_EXPORT)"|cut -d, -f2|sed -r 's|.* (\w+/)?([^ ]+)|\2|')
 
 ##
 ## Compiler flags