From e5c7756b515ffa2309fb7bb964f6eba5c455302a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Wed, 27 Dec 2006 02:51:03 +0000 Subject: [PATCH] Do not build tests for `make all' but only `make check'. This is done by using the automake prefix check_ instead of noinst_. The modules created in src/gnc-module/test now use that prefix too, but with LDFLAGS="-rpath ${PWD}" to make them shared (we never install them). git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15260 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/app-utils/test/Makefile.am | 2 +- src/backend/file/test/Makefile.am | 4 ++-- src/backend/postgres/test/Makefile.am | 2 +- src/business/business-core/test/Makefile.am | 2 +- src/calculation/test/Makefile.am | 2 +- src/engine/test-core/Makefile.am | 2 +- src/engine/test/Makefile.am | 2 +- src/gnc-module/test/Makefile.am | 2 +- src/gnc-module/test/misc-mods/Makefile.am | 11 ++++------- src/gnc-module/test/mod-bar/Makefile.am | 10 +++------- src/gnc-module/test/mod-baz/Makefile.am | 10 +++------- src/gnc-module/test/mod-foo/Makefile.am | 10 +++------- src/gnome-utils/test/Makefile.am | 2 +- src/import-export/hbci/test/Makefile.am | 2 +- src/import-export/ofx/test/Makefile.am | 2 +- src/import-export/qif-import/test/Makefile.am | 2 +- src/import-export/qif/test/Makefile.am | 2 +- src/import-export/test/Makefile.am | 2 +- src/network-utils/test/Makefile.am | 2 +- src/register/ledger-core/test/Makefile.am | 2 +- src/register/register-core/test/Makefile.am | 2 +- src/register/register-gnome/test/Makefile.am | 2 +- src/report/locale-specific/us/test/Makefile.am | 2 +- src/report/report-gnome/test/Makefile.am | 2 +- src/report/report-system/test/Makefile.am | 2 +- src/tax/us/test/Makefile.am | 2 +- 26 files changed, 36 insertions(+), 51 deletions(-) diff --git a/src/app-utils/test/Makefile.am b/src/app-utils/test/Makefile.am index da24e0e282..ac0c598277 100644 --- a/src/app-utils/test/Makefile.am +++ b/src/app-utils/test/Makefile.am @@ -44,7 +44,7 @@ LDADD = \ ${QOF_LIBS} \ ${GCONF_LIBS} -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-link-module \ test-exp-parser \ test-print-parse-amount \ diff --git a/src/backend/file/test/Makefile.am b/src/backend/file/test/Makefile.am index 73e3f715a5..c39feda168 100644 --- a/src/backend/file/test/Makefile.am +++ b/src/backend/file/test/Makefile.am @@ -191,13 +191,13 @@ TESTS_ENVIRONMENT := \ SRCDIR=${srcdir} \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) -noinst_LTLIBRARIES = libgnc-test-file-stuff.la +check_LTLIBRARIES = libgnc-test-file-stuff.la libgnc_test_file_stuff_la_SOURCES = test-file-stuff.c libgnc_test_file_stuff_la_LIBADD = \ ${top_builddir}/src/engine/libgncmod-engine.la -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-date-converting \ test-dom-converters1 \ test-kvp-frames \ diff --git a/src/backend/postgres/test/Makefile.am b/src/backend/postgres/test/Makefile.am index 4dccc6720c..77c317e0b6 100644 --- a/src/backend/postgres/test/Makefile.am +++ b/src/backend/postgres/test/Makefile.am @@ -14,7 +14,7 @@ TESTS_ENVIRONMENT := \ TEST_DB_SOCKET_DIR=`pwd`/gnc_test_db_sock \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-load-backend \ test-db \ test-escape \ diff --git a/src/business/business-core/test/Makefile.am b/src/business/business-core/test/Makefile.am index 2aeb3b9903..24034afe23 100644 --- a/src/business/business-core/test/Makefile.am +++ b/src/business/business-core/test/Makefile.am @@ -39,7 +39,7 @@ GNC_TEST_DEPS := \ TESTS_ENVIRONMENT := \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-load-module \ test-business \ test-address \ diff --git a/src/calculation/test/Makefile.am b/src/calculation/test/Makefile.am index d187797a1d..80f06bb9f2 100644 --- a/src/calculation/test/Makefile.am +++ b/src/calculation/test/Makefile.am @@ -1,6 +1,6 @@ TESTS=test-link -noinst_PROGRAMS=test-link +check_PROGRAMS=test-link test_link_SOURCES=test-link.c test_link_LDADD= \ diff --git a/src/engine/test-core/Makefile.am b/src/engine/test-core/Makefile.am index ae4639b855..e23ad18700 100644 --- a/src/engine/test-core/Makefile.am +++ b/src/engine/test-core/Makefile.am @@ -1,4 +1,4 @@ -noinst_LTLIBRARIES=libgncmod-test-engine.la +check_LTLIBRARIES=libgncmod-test-engine.la LDADD = \ ${top_builddir}/src/gnc-module/libgncmodule.la \ diff --git a/src/engine/test/Makefile.am b/src/engine/test/Makefile.am index 1b4f6eeade..e9fb06de7a 100644 --- a/src/engine/test/Makefile.am +++ b/src/engine/test/Makefile.am @@ -61,7 +61,7 @@ TESTS_ENVIRONMENT := \ SRCDIR=${srcdir} \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-link \ test-commodities \ test-date \ diff --git a/src/gnc-module/test/Makefile.am b/src/gnc-module/test/Makefile.am index 0849bbe767..c813f7aeef 100644 --- a/src/gnc-module/test/Makefile.am +++ b/src/gnc-module/test/Makefile.am @@ -37,7 +37,7 @@ GNC_TEST_DEPS := \ TESTS_ENVIRONMENT := \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-load-c \ test-modsysver \ test-incompatdep \ diff --git a/src/gnc-module/test/misc-mods/Makefile.am b/src/gnc-module/test/misc-mods/Makefile.am index 0f915affa5..7abce8acb1 100644 --- a/src/gnc-module/test/misc-mods/Makefile.am +++ b/src/gnc-module/test/misc-mods/Makefile.am @@ -7,25 +7,22 @@ AM_CFLAGS = \ LDADD = -L../.. -L../../.libs PWD := $(shell pwd) -checklibdir=${PWD} -checklib_LTLIBRARIES=libfuturemodsys.la libincompatdep.la libagedver.la +check_LTLIBRARIES=libfuturemodsys.la libincompatdep.la libagedver.la libfuturemodsys_la_SOURCES=futuremodsys.c +libfuturemodsys_la_LDFLAGS=-rpath ${PWD} libfuturemodsys_la_LIBADD = \ $(GLIB_LIBS) libincompatdep_la_SOURCES=incompatdep.c -libincompatdep_la_LDFLAGS=-module +libincompatdep_la_LDFLAGS=-module -rpath ${PWD} libincompatdep_la_LIBADD = \ ../../libgncmodule.la \ $(GLIB_LIBS) libagedver_la_SOURCES=agedver.c +libagedver_la_LDFLAGS=-rpath ${PWD} libagedver_la_LIBADD = \ $(GLIB_LIBS) CLEANFILES = *.so* *.a - -# Keep automake from generating install targets for test libs -install-checklibLTLIBRARIES: -uninstall-checklibLTLIBRARIES: diff --git a/src/gnc-module/test/mod-bar/Makefile.am b/src/gnc-module/test/mod-bar/Makefile.am index 8108f18c9e..d1c79b94b5 100644 --- a/src/gnc-module/test/mod-bar/Makefile.am +++ b/src/gnc-module/test/mod-bar/Makefile.am @@ -5,10 +5,10 @@ AM_CFLAGS = \ ${GLIB_CFLAGS} PWD := $(shell pwd) -checklibdir=${PWD} -checklib_LTLIBRARIES = libbar.la libgncmodbar.la +check_LTLIBRARIES = libbar.la libgncmodbar.la libbar_la_SOURCES = bar.c +libbar_la_LDFLAGS = -rpath ${PWD} # Make swig-bar.c for dist. It is an automatic dependency # of gnc-mod-bar.c @@ -17,7 +17,7 @@ noinst_HEADERS = \ swig-bar.c libgncmodbar_la_SOURCES=gnc-mod-bar.c - +libgncmodbar_la_LDFLAGS=-rpath ${PWD} libgncmodbar_la_LIBADD=libbar.la \ $(GUILE_LIBS) \ $(GLIB_LIBS) @@ -33,7 +33,3 @@ EXTRA_DIST = \ BUILT_SOURCES = swig-bar.c MAINTAINERCLEANFILES = swig-bar.c - -# Keep automake from generating install targets for test libs -install-checklibLTLIBRARIES: -uninstall-checklibLTLIBRARIES: diff --git a/src/gnc-module/test/mod-baz/Makefile.am b/src/gnc-module/test/mod-baz/Makefile.am index 13d249ee09..dbb0fbc90c 100644 --- a/src/gnc-module/test/mod-baz/Makefile.am +++ b/src/gnc-module/test/mod-baz/Makefile.am @@ -6,10 +6,10 @@ AM_CFLAGS = \ ${GUILE_INCS} PWD := $(shell pwd) -checklibdir = ${PWD} -checklib_LTLIBRARIES = libbaz.la libgncmodbaz.la +check_LTLIBRARIES = libbaz.la libgncmodbaz.la libbaz_la_SOURCES = baz.c +libbaz_la_LDFLAGS = -rpath ${PWD} libbaz_la_LIBADD = ../mod-foo/libfoo.la # Make swig-baz.c for dist. It is an automatic dependency @@ -19,7 +19,7 @@ noinst_HEADERS = \ swig-baz.c libgncmodbaz_la_SOURCES = gnc-mod-baz.c - +libgncmodbaz_la_LDFLAGS = -rpath ${PWD} libgncmodbaz_la_LIBADD = \ libbaz.la \ ../../libgncmodule.la \ @@ -37,7 +37,3 @@ EXTRA_DIST = \ BUILT_SOURCES = swig-baz.c MAINTAINERCLEANFILES = swig-baz.c - -# Keep automake from generating install targets for test libs -install-checklibLTLIBRARIES: -uninstall-checklibLTLIBRARIES: diff --git a/src/gnc-module/test/mod-foo/Makefile.am b/src/gnc-module/test/mod-foo/Makefile.am index be06601d5a..ff1032b364 100644 --- a/src/gnc-module/test/mod-foo/Makefile.am +++ b/src/gnc-module/test/mod-foo/Makefile.am @@ -5,10 +5,10 @@ AM_CFLAGS=\ ${GLIB_CFLAGS} PWD := $(shell pwd) -checklibdir=${PWD} -checklib_LTLIBRARIES=libfoo.la libgncmodfoo.la +check_LTLIBRARIES=libfoo.la libgncmodfoo.la libfoo_la_SOURCES = foo.c +libfoo_la_LDFLAGS = -rpath ${PWD} # Make swig-foo.c for dist. It is an automatic dependency # of gnc-mod-foo.c @@ -17,7 +17,7 @@ noinst_HEADERS = \ swig-foo.c libgncmodfoo_la_SOURCES = gnc-mod-foo.c - +libgncmodfoo_la_LDFLAGS = -rpath ${PWD} libgncmodfoo_la_LIBADD = \ libfoo.la \ $(GUILE_LIBS) \ @@ -34,7 +34,3 @@ endif BUILT_SOURCES = swig-foo.c MAINTAINERCLEANFILES = swig-foo.c - -# Keep automake from generating install targets for test libs -install-checklibLTLIBRARIES: -uninstall-checklibLTLIBRARIES: diff --git a/src/gnome-utils/test/Makefile.am b/src/gnome-utils/test/Makefile.am index dedf3a4ccd..e371fcc36f 100644 --- a/src/gnome-utils/test/Makefile.am +++ b/src/gnome-utils/test/Makefile.am @@ -28,7 +28,7 @@ GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ TESTS_ENVIRONMENT := \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-link-module test-gnc-recurrence test-gnc-dialog INCLUDES= \ diff --git a/src/import-export/hbci/test/Makefile.am b/src/import-export/hbci/test/Makefile.am index 6df2ff746b..0b9cf6f4e6 100644 --- a/src/import-export/hbci/test/Makefile.am +++ b/src/import-export/hbci/test/Makefile.am @@ -1,6 +1,6 @@ TESTS=test-link-module -noinst_PROGRAMS=test-link-module +check_PROGRAMS=test-link-module test_link_module_SOURCES=test-link-module.c test_link_module_LDADD=../libgncmod-hbci.la diff --git a/src/import-export/ofx/test/Makefile.am b/src/import-export/ofx/test/Makefile.am index e67297a5b2..99b2739140 100644 --- a/src/import-export/ofx/test/Makefile.am +++ b/src/import-export/ofx/test/Makefile.am @@ -1,7 +1,7 @@ TESTS=test-link AM_CFLAGS=${LIBOFX_CFLAGS} -noinst_PROGRAMS=test-link +check_PROGRAMS=test-link test_link_SOURCES=test-link.c test_link_LDADD=../libgncmod-ofx.la diff --git a/src/import-export/qif-import/test/Makefile.am b/src/import-export/qif-import/test/Makefile.am index 11413732db..bf6108f482 100644 --- a/src/import-export/qif-import/test/Makefile.am +++ b/src/import-export/qif-import/test/Makefile.am @@ -1,6 +1,6 @@ TESTS=test-link -noinst_PROGRAMS=test-link +check_PROGRAMS=test-link test_link_SOURCES = \ test-link.c diff --git a/src/import-export/qif/test/Makefile.am b/src/import-export/qif/test/Makefile.am index 7fb63d6cb3..1150e8d7e9 100644 --- a/src/import-export/qif/test/Makefile.am +++ b/src/import-export/qif/test/Makefile.am @@ -46,7 +46,7 @@ TESTS_ENVIRONMENT := \ GNC_TEST_FILES=${srcdir}/test-files \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-link \ test-qif diff --git a/src/import-export/test/Makefile.am b/src/import-export/test/Makefile.am index 5af2dc4a85..d5d731912d 100644 --- a/src/import-export/test/Makefile.am +++ b/src/import-export/test/Makefile.am @@ -44,6 +44,6 @@ GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ TESTS_ENVIRONMENT := \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-link \ test-import-parse diff --git a/src/network-utils/test/Makefile.am b/src/network-utils/test/Makefile.am index c4404b1684..e122c52c5c 100644 --- a/src/network-utils/test/Makefile.am +++ b/src/network-utils/test/Makefile.am @@ -14,7 +14,7 @@ GNC_TEST_DEPS := \ TESTS_ENVIRONMENT := \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-link-module test_link_module_SOURCES=test-link-module.c diff --git a/src/register/ledger-core/test/Makefile.am b/src/register/ledger-core/test/Makefile.am index 844985aa5e..3fc7845463 100644 --- a/src/register/ledger-core/test/Makefile.am +++ b/src/register/ledger-core/test/Makefile.am @@ -1,6 +1,6 @@ TESTS = test-link-module -noinst_PROGRAMS = test-link-module +check_PROGRAMS = test-link-module test_link_module_SOURCES=test-link-module.c test_link_module_LDADD=../libgncmod-ledger-core.la diff --git a/src/register/register-core/test/Makefile.am b/src/register/register-core/test/Makefile.am index cbefd96b38..e7bac13ceb 100644 --- a/src/register/register-core/test/Makefile.am +++ b/src/register/register-core/test/Makefile.am @@ -8,7 +8,7 @@ TESTS_ENVIRONMENT= \ LTDL_LIBRARY_PATH=.. \ LD_LIBRARY_PATH=${top_builddir}/src/gnc-module:${top_builddir}/src/gnc-module/.libs:${top_builddir}/src/engine:${top_builddir}/src/engine/.libs:${top_builddir}/src/calculation:${top_builddir}/src/calculation/.libs:${top_builddir}/src/network-utils:${top_builddir}/src/network-utils/.libs -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-link-module test_link_module_SOURCES=test-link-module.c diff --git a/src/register/register-gnome/test/Makefile.am b/src/register/register-gnome/test/Makefile.am index 6d4ed1002d..480046e58f 100644 --- a/src/register/register-gnome/test/Makefile.am +++ b/src/register/register-gnome/test/Makefile.am @@ -8,7 +8,7 @@ TESTS_ENVIRONMENT= \ LTDL_LIBRARY_PATH=.. \ LD_LIBRARY_PATH=${top_builddir}/src/gnc-module:${top_builddir}/src/gnc-module/.libs:${top_builddir}/src/engine:${top_builddir}/src/engine/.libs:${top_builddir}/src/calculation:${top_builddir}/src/calculation/.libs:${top_builddir}/src/network-utils:${top_builddir}/src/network-utils/.libs -noinst_PROGRAMS = \ +check_PROGRAMS = \ test-link-module test_link_module_SOURCES = test-link-module.c diff --git a/src/report/locale-specific/us/test/Makefile.am b/src/report/locale-specific/us/test/Makefile.am index 2d22aed06b..d12f157158 100644 --- a/src/report/locale-specific/us/test/Makefile.am +++ b/src/report/locale-specific/us/test/Makefile.am @@ -30,7 +30,7 @@ TESTS_ENVIRONMENT := \ EXTRA_DIST = test-load-module -noinst_PROGRAMS = test-link-module +check_PROGRAMS = test-link-module testit: ${TESTS_ENVIRONMENT} gdb guile diff --git a/src/report/report-gnome/test/Makefile.am b/src/report/report-gnome/test/Makefile.am index 006e5c6920..53a6d852e1 100644 --- a/src/report/report-gnome/test/Makefile.am +++ b/src/report/report-gnome/test/Makefile.am @@ -28,6 +28,6 @@ TESTS_ENVIRONMENT := \ LDADD = ../libgncmod-report-gnome.la -noinst_PROGRAMS = test-link-module +check_PROGRAMS = test-link-module EXTRA_DIST = test-load-module diff --git a/src/report/report-system/test/Makefile.am b/src/report/report-system/test/Makefile.am index 0e8d2c52b2..a5bf63eaae 100644 --- a/src/report/report-system/test/Makefile.am +++ b/src/report/report-system/test/Makefile.am @@ -29,6 +29,6 @@ TESTS_ENVIRONMENT := \ LDADD = ../libgncmod-report-system.la -noinst_PROGRAMS = test-link-module +check_PROGRAMS = test-link-module EXTRA_DIST = test-load-module diff --git a/src/tax/us/test/Makefile.am b/src/tax/us/test/Makefile.am index 294fbf1710..346722177a 100644 --- a/src/tax/us/test/Makefile.am +++ b/src/tax/us/test/Makefile.am @@ -23,6 +23,6 @@ TESTS_ENVIRONMENT := \ EXTRA_DIST = test-load-module -noinst_PROGRAMS=test-link-module +check_PROGRAMS=test-link-module test_link_module_SOURCES=test-link-module.c test_link_module_LDADD=../libgncmod-tax-us.la ${GUILE_LIBS} ${GLIB_LIBS}