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.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11787 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2005-11-02 18:14:48 +00:00
parent 5eded02d6c
commit 35e7ebec71
4 changed files with 38 additions and 10 deletions

View File

@ -1,3 +1,13 @@
2005-11-02 Derek Atkins <derek@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@employees.org>
* All: Collapse the gnome2 branch back into HEAD.

View File

@ -51,10 +51,6 @@ GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY=`echo $GCONF_SCHEMA_CONFIG_SOURCE | cut -d ':
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)

View File

@ -270,6 +270,7 @@ glade_DATA = \
EXTRA_DIST = \
.cvsignore \
gnc-dir.h.in \
gnc-svninfo.h \
${glade_DATA} \
${gwmod_DATA} \
${gncmod_DATA} \
@ -292,15 +293,36 @@ gnc-version.h: _gnc-version.h
-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 @@ gw-gnome-utils.scm gw-gnome-utils.c gw-gnome-utils.h: \
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

View File

@ -72,9 +72,9 @@ gnc_show_splash_screen (void)
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