Put the version in config.mk instead of a separate file

There is no need to have a separate VERSION file in release tarballs,
having the version in config.mk directly allows for a proper fallback in
case the git repository and the version file doesn't exists. The most
important example of this is the tarballs that github creates on every
release.
This commit is contained in:
Nikos Tsipinakis 2017-07-09 20:41:41 +03:00
parent 599db75401
commit 1b6f9dbb29

View File

@ -3,8 +3,8 @@ PREFIX ?= /usr/local
MANPREFIX = ${PREFIX}/share/man
# In dist tarballs, the version is stored in the VERSION files.
VERSION := '$(shell [ -f VERSION ] && cat VERSION)'
ifeq ('',$(VERSION))
VERSION := "1.1.0 (git-unknown)"
ifneq ($(wildcard ./.git/.),)
VERSION := $(shell git describe --tags)
endif