diff --git a/src/app-utils/Makefile.am b/src/app-utils/Makefile.am index 6bf39e44ad..5fc3586f90 100644 --- a/src/app-utils/Makefile.am +++ b/src/app-utils/Makefile.am @@ -109,10 +109,11 @@ if BUILDING_FROM_SCM swig-app-utils-guile.c: app-utils.i ${top_srcdir}/src/base-typemaps.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi - +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 $@ $< diff --git a/src/core-utils/Makefile.am b/src/core-utils/Makefile.am index 0fa0d52df5..a26dfea2ef 100644 --- a/src/core-utils/Makefile.am +++ b/src/core-utils/Makefile.am @@ -46,10 +46,11 @@ if BUILDING_FROM_SCM swig-core-utils-guile.c: core-utils.i ${top_srcdir}/src/base-typemaps.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi - +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 $@ $< diff --git a/src/engine/Makefile.am b/src/engine/Makefile.am index 6f101d7837..5d6f8a06ac 100644 --- a/src/engine/Makefile.am +++ b/src/engine/Makefile.am @@ -205,10 +205,11 @@ swig-engine.c: engine.i $(top_srcdir)/src/base-typemaps.i \ $(gncinclude_HEADERS) $(noinst_HEADERS) $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src/libqof/qof -I${top_srcdir}/src -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi - +endif endif iso-4217-currencies.c: iso-4217-currencies.scm iso-currencies-to-c diff --git a/src/gnc-module/Makefile.am b/src/gnc-module/Makefile.am index 01d93cfad6..b11cee08d4 100644 --- a/src/gnc-module/Makefile.am +++ b/src/gnc-module/Makefile.am @@ -33,10 +33,12 @@ if BUILDING_FROM_SCM swig-gnc-module.c: gnc-module.i ${top_srcdir}/src/base-typemaps.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi endif +endif EXTRA_DIST = \ ${gncmod_DATA} \ diff --git a/src/gnc-module/test/mod-bar/Makefile.am b/src/gnc-module/test/mod-bar/Makefile.am index 5b0d633224..368b14fc27 100644 --- a/src/gnc-module/test/mod-bar/Makefile.am +++ b/src/gnc-module/test/mod-bar/Makefile.am @@ -25,10 +25,12 @@ libgncmodbar_la_LIBADD=libbar.la \ if BUILDING_FROM_SCM swig-bar.c: bar.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi endif +endif EXTRA_DIST = \ bar.i \ diff --git a/src/gnc-module/test/mod-baz/Makefile.am b/src/gnc-module/test/mod-baz/Makefile.am index ef571cc2cf..fad5672e2b 100644 --- a/src/gnc-module/test/mod-baz/Makefile.am +++ b/src/gnc-module/test/mod-baz/Makefile.am @@ -29,10 +29,12 @@ libgncmodbaz_la_LIBADD = \ if BUILDING_FROM_SCM swig-baz.c: baz.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi endif +endif EXTRA_DIST = \ baz.i \ diff --git a/src/gnc-module/test/mod-foo/Makefile.am b/src/gnc-module/test/mod-foo/Makefile.am index 49972db725..6938cda448 100644 --- a/src/gnc-module/test/mod-foo/Makefile.am +++ b/src/gnc-module/test/mod-foo/Makefile.am @@ -30,10 +30,12 @@ EXTRA_DIST = \ if BUILDING_FROM_SCM swig-foo.c: foo.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi endif +endif BUILT_SOURCES = swig-foo.c MAINTAINERCLEANFILES = swig-foo.c diff --git a/src/gnome-utils/Makefile.am b/src/gnome-utils/Makefile.am index 65b24853b3..6d723dbf14 100644 --- a/src/gnome-utils/Makefile.am +++ b/src/gnome-utils/Makefile.am @@ -228,10 +228,12 @@ swig-gnome-utils.c: gnome-utils.i \ ${top_srcdir}/src/base-typemaps.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi endif +endif gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash gncmod_DATA = gnome-utils.scm diff --git a/src/gnome/Makefile.am b/src/gnome/Makefile.am index 906f212bb5..2fc53b3ddf 100644 --- a/src/gnome/Makefile.am +++ b/src/gnome/Makefile.am @@ -115,10 +115,12 @@ if BUILDING_FROM_SCM swig-gnome.c: gnome.i dialog-progress.h ${top_srcdir}/src/base-typemaps.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi endif +endif EXTRA_DIST = \ gnome.i \ diff --git a/src/html/Makefile.am b/src/html/Makefile.am index c27b555464..725b704f8f 100644 --- a/src/html/Makefile.am +++ b/src/html/Makefile.am @@ -59,10 +59,12 @@ swig-gnc-html.c: gnc-html.i gnc-html.h \ ${top_srcdir}/src/base-typemaps.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi endif +endif EXTRA_DIST = \ gnc-html.i diff --git a/src/report/report-gnome/Makefile.am b/src/report/report-gnome/Makefile.am index 04fc6e9f04..9200a7d01e 100644 --- a/src/report/report-gnome/Makefile.am +++ b/src/report/report-gnome/Makefile.am @@ -53,10 +53,12 @@ if BUILDING_FROM_SCM swig-report-gnome.c: report-gnome.i ${top_srcdir}/src/base-typemaps.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi endif +endif gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report gncmod_DATA = report-gnome.scm diff --git a/src/report/report-system/Makefile.am b/src/report/report-system/Makefile.am index 952555e4ca..425cce3c2a 100644 --- a/src/report/report-system/Makefile.am +++ b/src/report/report-system/Makefile.am @@ -25,10 +25,12 @@ if BUILDING_FROM_SCM swig-report-system.c: report-system.i ${top_srcdir}/src/base-typemaps.i $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi endif +endif AM_CPPFLAGS = \ -I${top_srcdir}/src \ diff --git a/src/test-core/Makefile.am b/src/test-core/Makefile.am index f9d2a8bef7..fb31c58445 100644 --- a/src/test-core/Makefile.am +++ b/src/test-core/Makefile.am @@ -28,9 +28,11 @@ swig-unittest-support-guile.c: unittest-support.i $(top_srcdir)/src/base-typemap $(SWIG) -guile $(SWIG_ARGS) -Linkage module \ -I${top_srcdir}/src \ ${AM_CPPFLAGS} -o $@ $< +if ! OS_WIN32 if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \ patch $@ $(top_srcdir)/src/swig-utf8.patch; \ fi +endif swig-unittest-support-python.c: unittest-support.i $(top_srcdir)/src/base-typemaps.i $(SWIG) -python -Wall -Werror $(SWIG_ARGS) \