From 8febdbbd354868f23725124eb2b657d946a18607 Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Tue, 22 Nov 2016 15:55:45 +0100 Subject: Simplify VERSION handling Also, use default abbreviation length, so that abbreviated object name in VERSION would match github's display of commit IDs. --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Makefile') 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)"\" -- cgit v1.2.3