Add hash code of olsr core source to version string
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 9 Nov 2010 09:05:38 +0000 (10:05 +0100)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 9 Nov 2010 09:05:38 +0000 (10:05 +0100)
Makefile
make/hash_source.sh [new file with mode: 0755]

index bc78561..e3bb243 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ switch:
 src/builddata.c:
        @$(RM) "$@"
        @echo "#include \"defs.h\"" >> "$@" 
-       @echo "const char olsrd_version[] = \"olsr.org - $(VERS)-`git log -1 --pretty=%h`\";"  >> "$@"
+       @echo "const char olsrd_version[] = \"olsr.org -  $(VERS)-git`git log -1 --pretty=%h`-hash`./make/hash_source.sh`\";"  >> "$@"
        @date +"const char build_date[] = \"%Y-%m-%d %H:%M:%S\";" >> "$@" 
        @echo "const char build_host[] = \"$(shell hostname)\";" >> "$@" 
 
diff --git a/make/hash_source.sh b/make/hash_source.sh
new file mode 100755 (executable)
index 0000000..6187aac
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+cat `find . -name *.c`|md5sum