Remove "release-" from displayed git version.

Also make sure that version_git.h is only written to if the "git
describe" command succeeds.
This commit is contained in:
Guus Sliepen 2015-05-05 23:03:41 +02:00
parent 120e0567cb
commit c46bdbde18

View 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