From af249bc2201bb9006d47eb203318f9cd488abe8a Mon Sep 17 00:00:00 2001 From: Ulrich Eckhardt Date: Fri, 12 May 2017 18:50:15 +0200 Subject: Add GIT Version information --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index 5a14a28..631e845 --- a/Makefile +++ b/Makefile @@ -11,7 +11,11 @@ PLUGIN = radio ### The version number of this plugin (taken from the main source file): -VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') +VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | \ + grep -v GIT \ + awk '{ print $$6 }' | sed -e 's/[";]//g') + +GIT_REV = $(shell git describe --always 2>/dev/null) ### The directory environment: @@ -49,7 +53,8 @@ SOFILE = libvdr-$(PLUGIN).so INCLUDES += -DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' \ + $(if $(GIT_REV), -DGIT_REV='"$(GIT_REV)"') ### The object files (add further files here): -- cgit v1.2.3