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.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12098 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2005-12-04 22:21:43 +00:00
parent eb88bd88f9
commit e16e517092
3 changed files with 21 additions and 7 deletions

View File

@ -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@asynchronous.org>
* All: Fold branches/goffice-update/ back into trunk/.

View File

@ -256,24 +256,30 @@ _gnc-version.h: gnc-svninfo.h
@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

View File

@ -74,7 +74,7 @@ gnc_show_splash_screen (void)
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);