aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDmitrij D. Czarkoff <czarkoff@gmail.com>2016-11-22 15:55:45 +0100
committerDmitrij D. Czarkoff <czarkoff@gmail.com>2016-11-22 15:55:45 +0100
commit8febdbbd354868f23725124eb2b657d946a18607 (patch)
tree0e208598149db1aff16e5ba965d23d3fe43ab58f /Makefile
parent9aea3f0ddad87cc97f246161075d249177aeae46 (diff)
downloadimv-8febdbbd354868f23725124eb2b657d946a18607.tar.gz
Simplify VERSION handling
Also, use default abbreviation length, so that abbreviated object name in VERSION would match github's display of commit IDs.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 1 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3feb11c..de51f1b 100644
--- a/Makefile
+++ b/Makefile
@@ -23,10 +23,7 @@ TESTS := $(patsubst test/%.c,$(BUILDDIR)/test_%,$(wildcard test/*.c))
TFLAGS ?= -g $(CFLAGS) $(CPPFLAGS) $(shell pkg-config --cflags cmocka)
TLIBS := $(LIBS) $(shell pkg-config --libs cmocka)
-VERSION := $(shell git describe --abbrev=8 --dirty --always --tags 2> /dev/null)
-ifeq ($(VERSION),)
-VERSION := v2.1.3
-endif
+VERSION != git describe --dirty --always --tags 2> /dev/null || echo v2.1.3
CFLAGS += -DIMV_VERSION=\""$(VERSION)"\"