Add git commit-id to version string
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 9 Nov 2010 07:34:02 +0000 (08:34 +0100)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 9 Nov 2010 07:34:02 +0000 (08:34 +0100)
Makefile

index 8f39d58..bc78561 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ switch:
 src/builddata.c:
        @$(RM) "$@"
        @echo "#include \"defs.h\"" >> "$@" 
 src/builddata.c:
        @$(RM) "$@"
        @echo "#include \"defs.h\"" >> "$@" 
-       @echo "const char olsrd_version[] = \"olsr.org - $(VERS)\";" >> "$@" 
+       @echo "const char olsrd_version[] = \"olsr.org - $(VERS)-`git log -1 --pretty=%h`\";"  >> "$@"
        @date +"const char build_date[] = \"%Y-%m-%d %H:%M:%S\";" >> "$@" 
        @echo "const char build_host[] = \"$(shell hostname)\";" >> "$@" 
 
        @date +"const char build_date[] = \"%Y-%m-%d %H:%M:%S\";" >> "$@" 
        @echo "const char build_host[] = \"$(shell hostname)\";" >> "$@"