1
0
mirror of https://github.com/Zygo/bees.git synced 2025-07-07 02:42:27 +02:00

Makefile: Specify version when building from tarball

When package maintainers build from a tarball, the .git directory does
not exist to extract the version tag. Let's add a hack to work around
this issue and let them specify `BEES_VERSION="v0.y"` on the make
cmdline.

Github-Bug: https://github.com/Zygo/bees/issues/75
Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
Kai Krakow
2018-09-30 04:15:46 +02:00
parent 3504439d5c
commit cf9d1d0b78
2 changed files with 4 additions and 2 deletions

View File

@ -20,7 +20,7 @@ BEES_OBJS = \
bees-types.o \
bees-version.c: bees.h $(BEES_OBJS:.o=.cc) Makefile
echo "const char *BEES_VERSION = \"$(shell git describe --always --dirty || echo UNKNOWN)\";" > bees-version.new.c
echo "const char *BEES_VERSION = \"$(BEES_VERSION)\";" > bees-version.new.c
mv -f bees-version.new.c bees-version.c
.depends/%.dep: %.cc Makefile