[Gnucash-changes] r12098 - gnucash/trunk - Update svn version
grabbing code.
Derek Atkins
warlord at cvs.gnucash.org
Sun Dec 4 17:21:43 EST 2005
Author: warlord
Date: 2005-12-04 17:21:43 -0500 (Sun, 04 Dec 2005)
New Revision: 12098
Trac: http://svn.gnucash.org/trac/changeset/12098
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/gnome-utils/Makefile.am
gnucash/trunk/src/gnome-utils/gnc-splash.c
Log:
Update svn version grabbing code.
* src/gnome-utils/Makefile.am: Grab svn version using
svnversion instead of parsing "svn info". Also make it
so that it doesn't force a rebuild if the version does
not change.
* src/gnome-utils/gnc-splash.c: changed svn version
from an integer into a string. Handle that in the
splash screen.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2005-12-04 22:11:34 UTC (rev 12097)
+++ gnucash/trunk/ChangeLog 2005-12-04 22:21:43 UTC (rev 12098)
@@ -8,6 +8,14 @@
make _g_compute_locale_variants static because it's
not needed outside this file.
+ * src/gnome-utils/Makefile.am: Grab svn version using
+ svnversion instead of parsing "svn info". Also make it
+ so that it doesn't force a rebuild if the version does
+ not change.
+ * src/gnome-utils/gnc-splash.c: changed svn version
+ from an integer into a string. Handle that in the
+ splash screen.
+
2005-12-04 Joshua Sled <jsled at asynchronous.org>
* All: Fold branches/goffice-update/ back into trunk/.
Modified: gnucash/trunk/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/Makefile.am 2005-12-04 22:11:34 UTC (rev 12097)
+++ gnucash/trunk/src/gnome-utils/Makefile.am 2005-12-04 22:21:43 UTC (rev 12098)
@@ -256,24 +256,30 @@
@echo "#include \"gnc-svninfo.h\"" >> _gnc-version.h
@echo "#endif" >> _gnc-version.h
-gnc-svninfo.h: .gnc-svninfo.h
+gnc-svninfo.h: _gnc-svninfo.h
+ -[ ! -f gnc-svninfo.h ] && cp _gnc-svninfo.h gnc-svninfo.h
+ -cmp -s _gnc-svninfo.h gnc-svninfo.h || cp _gnc-svninfo.h gnc-svninfo.h
+ -rm -f _gnc-svninfo.h
+
+_gnc-svninfo.h:
@s=${srcdir} ; \
if [ -h ${srcdir}/Makefile.am ] ; then \
d=`readlink $(srcdir)/Makefile.am` ; \
s="${srcdir}/`dirname $$d`" ; \
fi ; \
if [ -d $$s/.svn ] ; then \
- svninfo=`LANG=C svn info $$s |grep '^Revision: '|sed 's/Revision: //'` ; \
+ svninfo=`svnversion $$s` ; \
if [ -z "$$svninfo" ] ; then \
- echo "svn info failed. figure out why." ; \
+ echo "svnversion failed. figure out why." ; \
echo "can't determine svn revision from $$s." ; \
exit 1 ; \
fi ; \
- echo "#define GNUCASH_SVN_REV $$svninfo" > gnc-svninfo.h ; \
+ echo "/* Autogenerated. Do not change. */" > _gnc_svninfo.h ; \
+ echo "#define GNUCASH_SVN_REV \"$$svninfo\"" >> _gnc-svninfo.h ; \
+ else \
+ cp $(srcdir)/gnc-svninfo.h _gnc-svninfo.h ; \
fi
-.gnc-svninfo.h:
-
BUILT_SOURCES = gnc-dir.h gnc-version.h
if GNUCASH_SEPARATE_BUILDDIR
Modified: gnucash/trunk/src/gnome-utils/gnc-splash.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-splash.c 2005-12-04 22:11:34 UTC (rev 12097)
+++ gnucash/trunk/src/gnome-utils/gnc-splash.c 2005-12-04 22:21:43 UTC (rev 12098)
@@ -74,7 +74,7 @@
frame = gtk_frame_new (NULL);
vbox = gtk_vbox_new (FALSE, 3);
#ifdef GNUCASH_SVN
- ver_string = g_strdup_printf(_("Version: Gnucash-%s svn (r%d built %s)"),
+ ver_string = g_strdup_printf(_("Version: Gnucash-%s svn (r%s built %s)"),
VERSION, GNUCASH_SVN_REV, GNUCASH_BUILD_DATE);
#else
ver_string = g_strdup_printf(_("Version: Gnucash-%s"), VERSION);
More information about the gnucash-changes
mailing list