diff options
author | Dmitrij D. Czarkoff <czarkoff@gmail.com> | 2016-11-22 15:55:45 +0100 |
---|---|---|
committer | Dmitrij D. Czarkoff <czarkoff@gmail.com> | 2016-11-22 15:55:45 +0100 |
commit | 8febdbbd354868f23725124eb2b657d946a18607 (patch) | |
tree | 0e208598149db1aff16e5ba965d23d3fe43ab58f | |
parent | 9aea3f0ddad87cc97f246161075d249177aeae46 (diff) | |
download | imv-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.
-rw-r--r-- | Makefile | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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)"\" |