r23748 - gnucash/trunk - Update r23747 -- require 2.0.10 for guile2 builds, but allow older versions
Derek Atkins
warlord at code.gnucash.org
Thu Jan 23 16:20:38 EST 2014
Author: warlord
Date: 2014-01-23 16:20:37 -0500 (Thu, 23 Jan 2014)
New Revision: 23748
Trac: http://svn.gnucash.org/trac/changeset/23748
Modified:
gnucash/trunk/Makefile.am
gnucash/trunk/configure.ac
gnucash/trunk/src/app-utils/Makefile.am
gnucash/trunk/src/core-utils/Makefile.am
gnucash/trunk/src/engine/Makefile.am
gnucash/trunk/src/gnc-module/Makefile.am
gnucash/trunk/src/gnc-module/test/mod-bar/Makefile.am
gnucash/trunk/src/gnc-module/test/mod-baz/Makefile.am
gnucash/trunk/src/gnc-module/test/mod-foo/Makefile.am
gnucash/trunk/src/gnome-utils/Makefile.am
gnucash/trunk/src/gnome/Makefile.am
gnucash/trunk/src/html/Makefile.am
gnucash/trunk/src/report/report-gnome/Makefile.am
gnucash/trunk/src/report/report-system/Makefile.am
gnucash/trunk/src/test-core/Makefile.am
Log:
Update r23747 -- require 2.0.10 for guile2 builds, but allow older versions
for guile 1.8 builds. However if we don't have guile 2.0.10 then don't
allow "make dist" to run. This also means we wont patch the guile
files unless we find swig 2.0.10.
Modified: gnucash/trunk/Makefile.am
===================================================================
--- gnucash/trunk/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -40,6 +40,7 @@
# CVS dirs.
EXTRA_DIST = \
+ $(SWIG_DIST_FAIL) \
make-gnucash-potfiles.in \
macros/as-scrub-include.m4 \
macros/binreloc.m4 \
@@ -146,6 +147,14 @@
#dist-hook: po/POTFILES.in
+# Make "make dist" fail if we have the wrong version of swig
+if SWIG_DIST_FAIL
+SWIG_DIST_FAIL = swig-dist-fail
+swig-dist-fail:
+ @echo "You cannot build the dist with your version of swig"
+ @exit 1
+endif
+
distcheck-hook:
@e=''; \
for X in `grep -v \# ${distdir}/po/POTFILES.in | sed 's/\[type:.*\]//'` ; do \
Modified: gnucash/trunk/configure.ac
===================================================================
--- gnucash/trunk/configure.ac 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/configure.ac 2014-01-23 21:20:37 UTC (rev 23748)
@@ -476,21 +476,51 @@
### --------------------------------------------------------------------------
### SWIG version checks (only when building from SCM)
#
-# We need at least version 2.0.10 of SWIG because that's the first version
-# that supports guile 2
-# For a guile 1.8 build we could have gotten away with an older version
-# but we need to apply a patch to the swig generated files that needs to
-# go into the release tarball. At that point we don't know yet which
-# version of guile will be used together with that tarball so we have
-# to prepare the tarball for guile 2 compatibility.
+# In order to build against guile 2 or build the dist we need at least
+# version 2.0.10 of SWIG, because that's the first version that supports
+# guile 2.
+#
+# For a guile 1.8 build we accept an older version, but wont allow you
+# to build the dist because we need to apply a patch to the swig
+# generated files that needs to go into the release tarball. At that
+# point we don't know yet which version of guile will be used together
+# with that tarball so we have to prepare the tarball for guile 2
+# compatibility.
+#
if test "${BUILDING_FROM_SCM}" = yes
then
- AX_PKG_SWIG(2.0.10, [],
+ AX_PKG_SWIG(2.0.10, [gnc_have_swig_2_0_10=yes], [gnc_have_swig_2_0_10=no])
+
+ if test "${gnc_have_guile_2}" = yes
+ then
+ if test "${gnc_have_swig_2_0_10}" = no
+ then
+ AC_MSG_ERROR([
+ You are building from ${SCM_TYPE} but swig was not found or too old.
+ To build gnucash you need at least swig version 2.0.10.
+ ])
+ fi
+ else # using guile 1.8
+ if test "${gnc_have_swig_2_0_10}" = no
+ then
+ AX_PKG_SWIG(1.3.31, [],
[AC_MSG_ERROR([
You are building from ${SCM_TYPE} but swig was not found or too old.
- To build gnucash you need at least swig version 2.0.10.
- ])])
+ To build gnucash with guile 1.8 you need at least swig version 1.3.31.
+ ])])
+ fi
+ fi
+
+ # If we get here then we have an okay version to build locally.
+ # Check if we can build dist (which always requires swig 2.0.10)
+ if test "${gnc_have_swig_2_0_10}" = no
+ then
+ AC_MSG_WARN([You don't have SWIG 2.0.10 so you will not be able to "make dist"])
+ fi
fi
+
+AM_CONDITIONAL([SWIG_DIST_FAIL], test "${gnc_have_swig_2_0_10}" != yes)
+
### --------------------------------------------------------------------------
### LIBXML -- GNOME_XML_LIB is defined by GNOME_XML_CHECK
Modified: gnucash/trunk/src/app-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/app-utils/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/app-utils/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -110,10 +110,12 @@
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
+endif
swig-app-utils-python.c: app-utils.i ${top_srcdir}/src/base-typemaps.i
$(SWIG) -python -Wall -Werror $(SWIG_ARGS) \
-I${top_srcdir}/src -o $@ $<
Modified: gnucash/trunk/src/core-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/core-utils/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/core-utils/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -47,10 +47,12 @@
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
+endif
swig-core-utils-python.c: core-utils.i ${top_srcdir}/src/base-typemaps.i
$(SWIG) -python -Wall -Werror $(SWIG_ARGS) \
-I${top_srcdir}/src -o $@ $<
Modified: gnucash/trunk/src/engine/Makefile.am
===================================================================
--- gnucash/trunk/src/engine/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/engine/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -206,11 +206,13 @@
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src/libqof/qof -I${top_srcdir}/src -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
iso-4217-currencies.c: iso-4217-currencies.scm iso-currencies-to-c
-chmod u+x ./iso-currencies-to-c
Modified: gnucash/trunk/src/gnc-module/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/gnc-module/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -34,11 +34,13 @@
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
EXTRA_DIST = \
${gncmod_DATA} \
Modified: gnucash/trunk/src/gnc-module/test/mod-bar/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-bar/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/gnc-module/test/mod-bar/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -26,11 +26,13 @@
swig-bar.c: bar.i
$(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
EXTRA_DIST = \
bar.i \
Modified: gnucash/trunk/src/gnc-module/test/mod-baz/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-baz/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/gnc-module/test/mod-baz/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -30,11 +30,13 @@
swig-baz.c: baz.i
$(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
EXTRA_DIST = \
baz.i \
Modified: gnucash/trunk/src/gnc-module/test/mod-foo/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/test/mod-foo/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/gnc-module/test/mod-foo/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -31,11 +31,13 @@
swig-foo.c: foo.i
$(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
BUILT_SOURCES = swig-foo.c
MAINTAINERCLEANFILES = swig-foo.c
Modified: gnucash/trunk/src/gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/gnome/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -116,11 +116,13 @@
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
EXTRA_DIST = \
gnome.i \
Modified: gnucash/trunk/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/gnome-utils/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -229,11 +229,13 @@
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = gnome-utils.scm
Modified: gnucash/trunk/src/html/Makefile.am
===================================================================
--- gnucash/trunk/src/html/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/html/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -60,11 +60,13 @@
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
EXTRA_DIST = \
gnc-html.i
Modified: gnucash/trunk/src/report/report-gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/report/report-gnome/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/report/report-gnome/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -54,11 +54,13 @@
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report
gncmod_DATA = report-gnome.scm
Modified: gnucash/trunk/src/report/report-system/Makefile.am
===================================================================
--- gnucash/trunk/src/report/report-system/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/report/report-system/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -26,11 +26,13 @@
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
endif
+endif
AM_CPPFLAGS = \
-I${top_srcdir}/src \
Modified: gnucash/trunk/src/test-core/Makefile.am
===================================================================
--- gnucash/trunk/src/test-core/Makefile.am 2014-01-23 09:21:53 UTC (rev 23747)
+++ gnucash/trunk/src/test-core/Makefile.am 2014-01-23 21:20:37 UTC (rev 23748)
@@ -29,10 +29,12 @@
-I${top_srcdir}/src \
${AM_CPPFLAGS} -o $@ $<
if ! OS_WIN32
+if ! SWIG_DIST_FAIL
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
fi
endif
+endif
swig-unittest-support-python.c: unittest-support.i $(top_srcdir)/src/base-typemaps.i
$(SWIG) -python -Wall -Werror $(SWIG_ARGS) \
More information about the gnucash-changes
mailing list