Move gnc-version.h and gnc-svninfo.h from gnome-utils to core-utils.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19928 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Mike Alexander 2010-12-12 06:48:20 +00:00
parent 0288b5f69b
commit 8adaf9d132
7 changed files with 54 additions and 57 deletions

View File

@ -151,7 +151,7 @@ Either that or contact gnucash-devel@gnucash.org because
the tarball you downloaded is broken.
])])
AC_CHECK_FILE(${srcdir}/src/gnome-utils/gnc-svninfo.h, [],
AC_CHECK_FILE(${srcdir}/src/core-utils/gnc-svninfo.h, [],
[AC_MSG_ERROR([
It looks like you are NOT building from Subversion

View File

@ -47,7 +47,7 @@ rm -rf ${_DIST_UDIR}
_BUILD_UDIR=`unix_path $BUILD_DIR`
_GNUCASH_UDIR=`unix_path $GNUCASH_DIR`
PKG_VERSION=`grep PACKAGE_VERSION ${_BUILD_UDIR}/config.h | cut -d" " -f3 | cut -d\" -f2 `
SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/gnome-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/core-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
# Choose the output filename based on our "build_from_tarball" setting
# Make sure this logic matches the logic in dist.sh!

View File

@ -286,7 +286,7 @@ function dist_finish() {
if [ "$BUILD_FROM_TARBALL" = "no" ]; then
# And changing output filename
PKG_VERSION=`grep PACKAGE_VERSION ${_BUILD_UDIR}/config.h | cut -d" " -f3 | cut -d\" -f2 `
SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/gnome-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/core-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
SETUP_FILENAME="gnucash-${PKG_VERSION}-svn-r${SVN_REV}-setup.exe"
qpushd ${_GNUCASH_UDIR}
mv gnucash-${PKG_VERSION}-setup.exe ${SETUP_FILENAME}

View File

@ -15,7 +15,7 @@ AM_CPPFLAGS = -I${top_builddir} ${GLIB_CFLAGS} ${GNOME_CFLAGS} ${GTK_CFLAGS} \
-I${top_srcdir}/src/gnome-utils \
-I${top_srcdir}/src/engine \
-I${top_srcdir}/src/gnome \
-I${top_builddir}/src/gnome-utils \
-I${top_builddir}/src/core-utils \
-I${top_srcdir}/src/gnc-module \
-I${top_srcdir}/src/libqof/qof \
${GUILE_INCS} \

View File

@ -50,7 +50,6 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/libqof/qof \
-I${top_srcdir}/src
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = core-utils.scm
@ -75,8 +74,8 @@ if ! OS_WIN32
endif
noinst_DATA = .scm-links
BUILT_SOURCES = gncla-dir.h
EXTRA_DIST = $(gncmod_DATA) core-utils.i gncla-dir.h.in
BUILT_SOURCES = gncla-dir.h gnc-version.h
EXTRA_DIST = $(gncmod_DATA) core-utils.i gncla-dir.h.in gnc-svninfo.h
CLEANFILES = $(BUILT_SOURCES) gnucash .scm-links
MAINTAINERCLEANFILES = swig-core-utils.c
@ -93,3 +92,49 @@ gncla-dir.h: gncla-dir.h.in ${top_builddir}/config.status Makefile
-e 's#@-prefix-@#${prefix}#g'
mv $@.tmp $@
## We borrow guile's convention and use @-...-@ as the substitution
## brackets here, instead of the usual @...@. This prevents autoconf
## from substituting the values directly into the left-hand sides of
## the sed substitutions.
gnc-version.h: _gnc-version.h
-if [ ! -f gnc-version.h ]; then cp _gnc-version.h gnc-version.h; fi
-cmp -s _gnc-version.h gnc-version.h || cp _gnc-version.h gnc-version.h
-rm -f _gnc-version.h
_gnc-version.h: gnc-svninfo.h Makefile
@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
@svninfo=`${top_srcdir}/util/gnc-svnversion ${top_srcdir}` ; \
if [ $$? = 0 ] ; then \
echo "#define GNUCASH_SVN 1" >> _gnc-version.h ; \
fi
@echo "#define GNUCASH_BUILD_DATE \"`date +%Y-%m-%d`\"" >> _gnc-version.h
@echo "#include \"gnc-svninfo.h\"" >> _gnc-version.h
@echo "#endif" >> _gnc-version.h
gnc-svninfo.h: _gnc-svninfo.h
-if [ ! -f gnc-svninfo.h ]; then cp _gnc-svninfo.h gnc-svninfo.h; fi
-cmp -s _gnc-svninfo.h gnc-svninfo.h || cp _gnc-svninfo.h gnc-svninfo.h
-rm -f _gnc-svninfo.h
_gnc-svninfo.h: Makefile
@svninfo=`${top_srcdir}/util/gnc-svnversion ${top_srcdir}` ; \
if [ $$? = 0 ] ; then \
if [ -z "$$svninfo" ] ; then \
echo "gnc-svnversion failed. figure out why." ; \
echo "can't determine svn revision from ${top_srcdir}." ; \
exit 1 ; \
fi ; \
echo "/* Autogenerated. Do not change. */" > _gnc-svninfo.h ; \
echo "#define GNUCASH_SVN_REV \"$$svninfo\"" >> _gnc-svninfo.h ; \
else \
if [ -r $(srcdir)/gnc-svninfo.h ] ; then \
cp $(srcdir)/gnc-svninfo.h _gnc-svninfo.h ; \
else \
echo "You're building from SVN... But your build system is broken" ; \
echo "Don't do that. Complain to your build-system creator." ; \
exit 1 ; \
fi ; \
fi

View File

@ -24,7 +24,7 @@
#include <stdlib.h>
#include "config.h"
#include "gnc-main.h"
#include "gnome-utils/gnc-version.h"
#include "gnc-version.h"
static gchar *namespace_regexp = NULL;
static gboolean is_debugging = 0;

View File

@ -12,6 +12,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/app-utils \
-I${top_srcdir}/src \
-I${top_builddir}/src \
-I${top_builddir}/src/core-utils \
-I${top_srcdir}/lib/libc \
-I${top_srcdir}/src/libqof/qof \
${GLIB_CFLAGS} \
@ -219,59 +220,10 @@ gncscmdir = ${GNC_SHAREDIR}/scm
gncscm_DATA = gnc-menu-extensions.scm
EXTRA_DIST = \
gnc-svninfo.h \
gnome-utils.i \
${gncmod_DATA} \
${gncscm_DATA}
## We borrow guile's convention and use @-...-@ as the substitution
## brackets here, instead of the usual @...@. This prevents autoconf
## from substituting the values directly into the left-hand sides of
## the sed substitutions.
gnc-version.h: _gnc-version.h
-if [ ! -f gnc-version.h ]; then cp _gnc-version.h gnc-version.h; fi
-cmp -s _gnc-version.h gnc-version.h || cp _gnc-version.h gnc-version.h
-rm -f _gnc-version.h
_gnc-version.h: gnc-svninfo.h Makefile
@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
@svninfo=`${top_srcdir}/util/gnc-svnversion ${top_srcdir}` ; \
if [ $$? = 0 ] ; then \
echo "#define GNUCASH_SVN 1" >> _gnc-version.h ; \
fi
@echo "#define GNUCASH_BUILD_DATE \"`date +%Y-%m-%d`\"" >> _gnc-version.h
@echo "#include \"gnc-svninfo.h\"" >> _gnc-version.h
@echo "#endif" >> _gnc-version.h
gnc-svninfo.h: _gnc-svninfo.h
-if [ ! -f gnc-svninfo.h ]; then cp _gnc-svninfo.h gnc-svninfo.h; fi
-cmp -s _gnc-svninfo.h gnc-svninfo.h || cp _gnc-svninfo.h gnc-svninfo.h
-rm -f _gnc-svninfo.h
_gnc-svninfo.h: Makefile
@svninfo=`${top_srcdir}/util/gnc-svnversion ${top_srcdir}` ; \
if [ $$? = 0 ] ; then \
if [ -z "$$svninfo" ] ; then \
echo "gnc-svnversion failed. figure out why." ; \
echo "can't determine svn revision from ${top_srcdir}." ; \
exit 1 ; \
fi ; \
echo "/* Autogenerated. Do not change. */" > _gnc-svninfo.h ; \
echo "#define GNUCASH_SVN_REV \"$$svninfo\"" >> _gnc-svninfo.h ; \
else \
if [ -r $(srcdir)/gnc-svninfo.h ] ; then \
cp $(srcdir)/gnc-svninfo.h _gnc-svninfo.h ; \
else \
echo "You're building from SVN... But your build system is broken" ; \
echo "Don't do that. Complain to your build-system creator." ; \
exit 1 ; \
fi ; \
fi
BUILT_SOURCES = gnc-version.h
if GNUCASH_SEPARATE_BUILDDIR
#For executing test cases