Remove "release-" from displayed git version.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 5 May 2015 21:03:41 +0000 (23:03 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 5 May 2015 21:03:41 +0000 (23:03 +0200)
Also make sure that version_git.h is only written to if the "git
describe" command succeeds.

src/Makefile.am

index cc512b1..3b9843a 100644 (file)
@@ -6,7 +6,7 @@ sbin_PROGRAMS = tincd tinc sptps_test sptps_keypair
 .PHONY: version.c version_git.h
 version_git.h:
        echo >$@
-       -GIT_DESCRIPTION="`cd $(@D) && git describe`" && echo "#define GIT_DESCRIPTION \"$$GIT_DESCRIPTION\"" >$@
+       -git describe && echo '#define GIT_DESCRIPTION "'`git describe | sed 's/release-//'`'"' >$@
 version.c: version_git.h
 
 if LINUX