summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--version.dist (renamed from version.h)0
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2e8fbf0..d89b038 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@
DIRS = command plugin
+$(shell GITVERSION=`git rev-parse --short HEAD`; if [ -n $GITVERSION ]; then sed "s/\";/ ($$GITVERSION)\";/" version.dist > version.h; else cp version.dist version.h; fi)
VERSION = $(shell grep 'static const char \*VERSION *=' version.h | awk '{ print $$6 }' | sed -e 's/[";]//g')
TMPDIR = /tmp
@@ -40,4 +41,4 @@ dist:
clean:
for i in $(DIRS); do make -C $$i clean; done
- @-rm -f $(PACKAGE).tgz
+ @-rm -f version.h $(PACKAGE).tgz
diff --git a/version.h b/version.dist
index 8a6a088..8a6a088 100644
--- a/version.h
+++ b/version.dist