aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2021-02-07 19:25:06 +0100
committerReto Brunner <reto@labrat.space>2021-02-07 19:25:06 +0100
commit077063ba4ba3dbf0a7a43c58c73bc906ed4684d2 (patch)
tree973f3a152df73d6bd418643a9ad2c009c71ef51e
parent804329970ba2bf3fa5ef03e6ca2ba7264b993c11 (diff)
downloadaerc-077063ba4ba3dbf0a7a43c58c73bc906ed4684d2.tar.gz
Makefile: use git version string if we can
Some packagers overwrote the version we embed in aerc, we really don't want that. Hence we force clear the variable at the beginning of the makefile. If git is available and returns a useful info we now use that version instead of the hardcoded version
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9ad5e29a..661acef2 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