From: svenhoefer Date: Tue, 3 May 2016 14:45:13 +0000 (+0200) Subject: - update version handling; call 'make vcs_version' before 'make all' X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=ba1aa4880260ccbe247c42a5323369d005bdfafa;p=lcd4linux.git - update version handling; call 'make vcs_version' before 'make all' --- diff --git a/Makefile.am b/Makefile.am index 869e5f1..666fd63 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,7 +23,7 @@ lcd4linux_LDADD = @DRIVERS@ @PLUGINS@ @DRVLIBS@ @PLUGINLIBS@ lcd4linux_DEPENDENCIES = @DRIVERS@ @PLUGINS@ lcd4linux_SOURCES = \ -lcd4linux.c svn_version.h \ +lcd4linux.c vcs_version.h \ cfg.c cfg.h \ debug.c debug.h \ drv.c drv.h \ @@ -174,7 +174,7 @@ plugin_xmms.c EXTRA_DIST = \ -svn_version.sh \ +vcs_version.sh \ lcd4linux.conf.sample \ lcd4kde.conf \ lcd4linux.kdelnk \ @@ -193,10 +193,9 @@ plugin_sample.c -# create subversion version +# create version -.PHONY: svn_version - -svn_version: - svn_version.sh +.PHONY: vcs_version +vcs_version: + ./vcs_version.sh diff --git a/lcd4linux.c b/lcd4linux.c index 4eba7a5..1aedb2f 100644 --- a/lcd4linux.c +++ b/lcd4linux.c @@ -37,7 +37,7 @@ #include /* umask() */ #include /* umask() */ -#include "svn_version.h" +#include "vcs_version.h" #include "cfg.h" #include "debug.h" #include "qprintf.h" @@ -59,7 +59,7 @@ #define PIDFILE "/var/run/lcd4linux.pid" -static char *release = "LCD4Linux " VERSION "-" SVN_VERSION; +static char *release = "LCD4Linux " VERSION "-" VCS_VERSION; static char *copyright = "Copyright (C) 2005, 2006, 2007, 2008, 2009 The LCD4Linux Team "; static char **my_argv; diff --git a/svn_version.h b/svn_version.h deleted file mode 100644 index c5c25bc..0000000 --- a/svn_version.h +++ /dev/null @@ -1 +0,0 @@ -#define SVN_VERSION "1193" diff --git a/svn_version.sh b/svn_version.sh deleted file mode 100755 index 82df1b9..0000000 --- a/svn_version.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# $Id$ -# $URL$ - - -OLD_VERSION=`cat svn_version.h 2>/dev/null` - -if [ -d .svn ]; then - NEW_VERSION="#define SVN_VERSION \"`svnversion -n`\"" -fi - -if [ "$NEW_VERSION" != "$OLD_VERSION" ]; then - echo $NEW_VERSION >svn_version.h -fi diff --git a/vcs_version.h b/vcs_version.h new file mode 100644 index 0000000..98e8c90 --- /dev/null +++ b/vcs_version.h @@ -0,0 +1 @@ +#define VCS_VERSION "" diff --git a/vcs_version.sh b/vcs_version.sh new file mode 100755 index 0000000..1b7d1f0 --- /dev/null +++ b/vcs_version.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "#define VCS_VERSION \"`git describe --tags`\"" > vcs_version.h +