]> git.webhop.me Git - lcd4linux.git/commitdiff
- update version handling; call 'make vcs_version' before 'make all'
authorsvenhoefer <svenhoefer@svenhoefer.com>
Tue, 3 May 2016 14:45:13 +0000 (16:45 +0200)
committersvenhoefer <svenhoefer@svenhoefer.com>
Tue, 3 May 2016 14:45:13 +0000 (16:45 +0200)
Makefile.am
lcd4linux.c
svn_version.h [deleted file]
svn_version.sh [deleted file]
vcs_version.h [new file with mode: 0644]
vcs_version.sh [new file with mode: 0755]

index 869e5f109bb3fefb7620f894ade9cab10a0347e3..666fd63e98f7f18f84d614db01001f1bfecf5021 100644 (file)
@@ -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
index 4eba7a552c9ae5b0caf76f756781351b9c0bf781..1aedb2f8186b18a16757fd390c80e9c185f324d7 100644 (file)
@@ -37,7 +37,7 @@
 #include <sys/types.h>         /* umask() */
 #include <sys/stat.h>          /* 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 <lcd4linux-devel@users.sourceforge.net>";
 static char **my_argv;
diff --git a/svn_version.h b/svn_version.h
deleted file mode 100644 (file)
index c5c25bc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#define SVN_VERSION "1193"
diff --git a/svn_version.sh b/svn_version.sh
deleted file mode 100755 (executable)
index 82df1b9..0000000
+++ /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 (file)
index 0000000..98e8c90
--- /dev/null
@@ -0,0 +1 @@
+#define VCS_VERSION ""
diff --git a/vcs_version.sh b/vcs_version.sh
new file mode 100755 (executable)
index 0000000..1b7d1f0
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo "#define VCS_VERSION \"`git describe --tags`\"" > vcs_version.h
+