summaryrefslogtreecommitdiff
path: root/Makefile.1.6
diff options
context:
space:
mode:
authorKeine_Ahnung <dirk-vdr@gmx.de>2013-02-27 16:54:53 +0100
committerKeine_Ahnung <dirk-vdr@gmx.de>2013-02-27 16:54:53 +0100
commitb557752369a35ddf6cd8b8f06f19636aa2feb730 (patch)
tree709b29f3b3123b2bb368ef44c780dcbdc9a4866e /Makefile.1.6
parent593168e7418e0eccfa597a893c9f8d73b0db8ce0 (diff)
downloadvdr-plugin-uactivity-b557752369a35ddf6cd8b8f06f19636aa2feb730.tar.gz
vdr-plugin-uactivity-b557752369a35ddf6cd8b8f06f19636aa2feb730.tar.bz2
new versionsnumer system for git checkouts
Diffstat (limited to 'Makefile.1.6')
-rw-r--r--Makefile.1.67
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.1.6 b/Makefile.1.6
index fcd7593..af6c6cc 100644
--- a/Makefile.1.6
+++ b/Makefile.1.6
@@ -13,7 +13,10 @@ PLUGIN = uactivity
### 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 [ -d .git ] && git describe --tags --dirty| sed 's/^v//' || cat version)
+ifeq ($(strip $(VERSION)),)
+ $(error VERSION is undefined)
+endif
### The C++ compiler and options:
@@ -55,7 +58,7 @@ PACKAGE = vdr-$(ARCHIVE)
INCLUDES += -I$(VDRDIR)/include
-DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DUACTIVITY_COMMAND='"$(PLUGIN_UACTIVITY_COMMAND)"'
+DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DUACTIVITY_COMMAND='"$(PLUGIN_UACTIVITY_COMMAND)"' -DPLUGIN_VERSION='"$(VERSION)"'
### The object files (add further files here):