From dd0d3238ca65fcd7eaf5766caab900458e44de4c Mon Sep 17 00:00:00 2001 From: Daniel Roethlisberger Date: Wed, 22 Apr 2015 23:12:03 +0200 Subject: [PATCH] Add sha1(NEWS.md) to BUILD_INFO when VERSION from dir Issue: #85 --- GNUmakefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 03e0fcc..fc276be 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -156,6 +156,7 @@ PKGCONFIG?= pkg-config BASENAME?= basename CAT?= cat +CUT?= cut GREP?= grep INSTALL?= install MKDIR?= mkdir @@ -201,7 +202,9 @@ ifndef GITDIR VERSION:= $(shell $(BASENAME) $(PWD)|\ $(GREP) $(TARGET)-|\ $(SED) 's/.*$(TARGET)-\(.*\)/\1/g') -BUILD_INFO+= V:DIR +NEWSSHA:= $(shell $(OPENSSL) dgst -sha1 -r NEWS.md |\ + $(CUT) -c -7) +BUILD_INFO+= V:DIR N:$(NEWSSHA) else VERSION:= $(shell $(GIT) describe --tags --dirty --always) BUILD_INFO+= V:GIT