[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Wed Nov 23 17:59:29 CET 2005


SVN commit 482640 by staikos:

generate a more meaningful revision number


 M  +12 -0     Makefile.am  
 M  +2 -1      kstdebug.cpp  


--- trunk/extragear/graphics/kst/kst/Makefile.am #482639:482640
@@ -313,9 +313,21 @@
 vectorselector.lo: vectorselector.ui.h vectorselector.ui
 viewmatricesdialog.lo: matrixselector.h
 viewvectorsdialog.lo: vectorselector.h
+kstdebug.lo: kstrevision.h
 
 METASOURCES=AUTO
 
 update_DATA = kstautosave11.upd kstrcmisc11.upd
 updatedir = $(kde_datadir)/kconf_update
 
+kstrevision.h:
+	@if (which svn >/dev/null 2>&1); then \
+	if (svn info $(srcdir) >/dev/null 2>&1); then \
+	REV=`svn info $(srcdir) | grep ^Revision | cut -b 11-`; \
+	else REV="dist"; fi; else REV="dist"; fi; \
+	echo "#ifndef KSTREVISION" >kstrevision.h.tmp; \
+	echo "#define KSTREVISION \""$REV"\"" >>kstrevision.h.tmp; \
+	echo "#endif" >>kstrevision.h.tmp; \
+	if (diff -N kstrevision.h.tmp kstrevision.h >/dev/null 2>&1); \
+	then rm kstrevision.h.tmp; else mv kstrevision.h.tmp kstrevision.h; fi
+
--- trunk/extragear/graphics/kst/kst/kstdebug.cpp #482639:482640
@@ -19,6 +19,7 @@
 #include "kstdatasource.h"
 #include "kstdebug.h"
 #include "kstdoc.h"
+#include "kstrevision.h"
 #include "logevents.h"
 
 #include <kapplication.h>
@@ -47,7 +48,7 @@
 : QObject() {
   _applyLimit = false;
   _limit = 10000;
-  _kstRevision = QString::fromLatin1("$Rev$");
+  _kstRevision = QString::fromLatin1(KSTREVISION);
   _hasNewError = false;
 }
 


More information about the Kst mailing list