Makefile: use git-describe to get the version string

That means we can just tag releases and the version will be taken
from the tag to generate the tarball.
This commit is contained in:
Maxime Coste 2018-04-14 13:05:59 +10:00
parent 7f6a6ab1d3
commit 0f38be544c

View File

@ -20,7 +20,7 @@ else
endif
endif
version ?= $(shell if [ -f .version ]; then cat .version; elif [ -d ../.git ]; then git rev-parse --short HEAD; else echo "unknown"; fi)
version ?= $(shell if [ -f .version ]; then cat .version; elif [ -d ../.git ]; then git describe --tags HEAD; else echo "unknown"; fi)
sources := $(sort $(wildcard *.cc))
objects := $(addprefix ., $(sources:.cc=$(suffix).o))