[Gnucash-changes] r11787 - in gnucash/trunk: . src/gnome-utils -
Use the svn info for the splash screen info.
Derek Atkins
warlord at cvs.gnucash.org
Wed Nov 2 13:14:49 EST 2005
Author: warlord
Date: 2005-11-02 13:14:48 -0500 (Wed, 02 Nov 2005)
New Revision: 11787
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/configure.in
gnucash/trunk/src/gnome-utils/Makefile.am
gnucash/trunk/src/gnome-utils/gnc-splash.c
Log:
Use the svn info for the splash screen info.
* configure.in: don't need GNUCASH_CVS anymore
* src/gnome-utils/Makefile.am:
build gnc-version.h and gnc-svninfo.h. add the
latter to EXTRA_DIST. Only build svninfo if
$(srcdir)/.svn exists. #define GNUCASH_SVN
when that directory exists (at buildtime).
* src/gnome-utils/gnc-splash.h: use new SVN info.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2005-11-02 16:44:30 UTC (rev 11786)
+++ gnucash/trunk/ChangeLog 2005-11-02 18:14:48 UTC (rev 11787)
@@ -1,3 +1,13 @@
+2005-11-02 Derek Atkins <derek at ihtfp.com>
+
+ * configure.in: don't need GNUCASH_CVS anymore
+ * src/gnome-utils/Makefile.am:
+ build gnc-version.h and gnc-svninfo.h. add the
+ latter to EXTRA_DIST. Only build svninfo if
+ $(srcdir)/.svn exists. #define GNUCASH_SVN
+ when that directory exists (at buildtime).
+ * src/gnome-utils/gnc-splash.h: use new SVN info.
+
2005-11-01 David Hampton <hampton at employees.org>
* All: Collapse the gnome2 branch back into HEAD.
Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in 2005-11-02 16:44:30 UTC (rev 11786)
+++ gnucash/trunk/configure.in 2005-11-02 18:14:48 UTC (rev 11787)
@@ -51,10 +51,6 @@
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY)
-# Comment out for production or semi-production builds. I.E. Anything
-# that is explicitly tagged in cvs as a version.
-AC_DEFINE(GNUCASH_CVS,1,[Define if built from untagged cvs])
-
AC_SUBST(GNUCASH_MAJOR_VERSION)
AC_SUBST(GNUCASH_MINOR_VERSION)
AC_SUBST(GNUCASH_MICRO_VERSION)
Modified: gnucash/trunk/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/Makefile.am 2005-11-02 16:44:30 UTC (rev 11786)
+++ gnucash/trunk/src/gnome-utils/Makefile.am 2005-11-02 18:14:48 UTC (rev 11787)
@@ -270,6 +270,7 @@
EXTRA_DIST = \
.cvsignore \
gnc-dir.h.in \
+ gnc-svninfo.h \
${glade_DATA} \
${gwmod_DATA} \
${gncmod_DATA} \
@@ -292,15 +293,36 @@
-cmp -s _gnc-version.h gnc-version.h || cp _gnc-version.h gnc-version.h
-rm -f _gnc-version.h
-_gnc-version.h:
+_gnc-version.h: gnc-svninfo.h
@echo "/* Autogenerated. Do not change. */" > _gnc-version.h
@echo "#ifndef GNC_VERSION_H" >> _gnc-version.h
@echo "#define GNC_VERSION_H" >> _gnc-version.h
@echo "" >> _gnc-version.h
+ @s=${srcdir} ; \
+ if [ -h ${srcdir}/Makefile.am ] ; then \
+ d=`readlink $(srcdir)/Makefile.am` ; \
+ s="${srcdir}/`dirname $$d`" ; \
+ fi ; \
+ if [ -d $$s/.svn ] ; then \
+ echo "#define GNUCASH_SVN 1" >> _gnc-version.h ; \
+ fi
@echo "#define GNUCASH_BUILD_DATE \"`date +%Y-%m-%d`\"" >> _gnc-version.h
- @echo "" >> _gnc-version.h
+ @echo "#include \"gnc-svninfo.h\"" >> _gnc-version.h
@echo "#endif" >> _gnc-version.h
+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=`svn info $$s |grep '^Revision: '|sed 's/Revision: //'` ; \
+ echo "#define GNUCASH_SVN_REV $$svninfo" > gnc-svninfo.h ; \
+ fi
+
+.gnc-svninfo.h:
+
BUILT_SOURCES = gnc-dir.h gnc-version.h
if GNUCASH_SEPARATE_BUILDDIR
@@ -333,7 +355,7 @@
BUILT_SOURCES += gw-gnome-utils.scm gw-gnome-utils.c gw-gnome-utils.h
DISTCLEANFILES = gnucash g-wrapped .scm-links ${SCM_FILE_LINKS} \
- gw-gnome-utils.html
+ gw-gnome-utils.html gnc-svninfo.h
#
# I hate inconsistent standards. Autotools puts help files into
Modified: gnucash/trunk/src/gnome-utils/gnc-splash.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-splash.c 2005-11-02 16:44:30 UTC (rev 11786)
+++ gnucash/trunk/src/gnome-utils/gnc-splash.c 2005-11-02 18:14:48 UTC (rev 11787)
@@ -72,9 +72,9 @@
frame = gtk_frame_new (NULL);
vbox = gtk_vbox_new (FALSE, 3);
-#ifdef GNUCASH_CVS
- sprintf(ver_string, _("Version: Gnucash-%s cvs (built %s)"),
- VERSION, GNUCASH_BUILD_DATE);
+#ifdef GNUCASH_SVN
+ sprintf(ver_string, _("Version: Gnucash-%s svn (r%d built %s)"),
+ VERSION, GNUCASH_SVN_REV, GNUCASH_BUILD_DATE);
#else
sprintf(ver_string, _("Version: Gnucash-%s"), VERSION);
#endif
More information about the gnucash-changes
mailing list