about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9ad5e29..661acef 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,13 @@
 .SUFFIXES:
 .SUFFIXES: .1 .5 .7 .1.scd .5.scd .7.scd
 
+override undefine VERSION # don't allow local overrides, we want our version
+_git_version=$(shell git describe --long --tags --dirty 2>/dev/null | sed 's/-/.r/;s/-/./')
+ifeq ($(strip $(_git_version)),)
 VERSION=0.5.2
+else
+VERSION=$(_git_version)
+endif
 
 VPATH=doc
 PREFIX?=/usr/local