Update Makefile to get version from $APP_VERSION
If git describe fails, check $APP_VERSION, otherwise set the version to "Unknown".
This commit is contained in:
@@ -4,7 +4,11 @@
|
|||||||
# Credit to Tom Tromey and Paul D. Smith:
|
# Credit to Tom Tromey and Paul D. Smith:
|
||||||
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
|
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
|
||||||
|
|
||||||
VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
|
VERSION := $(shell \
|
||||||
|
git describe --abbrev=4 --dirty --always --tags 2>/dev/null || \
|
||||||
|
echo $${APP_VERSION:-Unknown} \
|
||||||
|
)
|
||||||
|
|
||||||
DEPDIR := .deps
|
DEPDIR := .deps
|
||||||
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
|
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user