diff options
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index f90dfaa..d04886e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = enchant_providers mock_provider +SUBDIRS = enchant_providers AM_CPPFLAGS = -I$(top_srcdir)/src $(ENCHANT_CFLAGS) @@ -12,7 +12,7 @@ AM_TESTS_ENVIRONMENT = \ cp $(top_builddir)/src/libenchant.la $(libdir_subdir)/; \ cp $(top_builddir)/providers/@objdir@/*@shlibext@ $(libdir_subdir)/enchant || :; \ cp $(srcdir)/test.pwl.orig $(builddir)/test.pwl; \ - cp $(builddir)/mock_provider/@objdir@/*@shlibext@ .; \ + cp $(builddir)/@objdir@/*@shlibext@ .; \ chmod +w $(builddir)/test.pwl; main_CPPFLAGS = $(AM_CPPFLAGS) $(UNITTESTPP_CFLAGS) -DLIBDIR_SUBDIR=\"$(libdir_subdir)\" @@ -22,7 +22,7 @@ DISTCLEANFILES = test.pwl *@shlibext@ distclean-local: rm -rf $(libdir_subdir) $(ENCHANT_CONFIG_DIR) -EXTRA_DIST = test.pwl.orig +EXTRA_DIST = test.pwl.orig mock_provider.h LIBENCHANT_COPY = $(builddir)/$(libdir_subdir)/libenchant.la $(LIBENCHANT_COPY): $(top_builddir)/src/libenchant.la @@ -32,8 +32,40 @@ $(LIBENCHANT_COPY): $(top_builddir)/src/libenchant.la cp $(top_builddir)/src/libenchant.la $(libdir_subdir)/ LDADD = $(LIBENCHANT_COPY) $(ENCHANT_LIBS) +LIBADD = $(LIBENCHANT_COPY) DEPS = $(LIBENCHANT_COPY) +check_LTLIBRARIES = \ + libenchant_mock_provider.la \ + libenchant_mock_provider2.la \ + libenchant_null_provider.la \ + libenchant_null_identify.la \ + libenchant_null_describe.la + +# Should not really use _ENCHANT_BUILD here, but seems to be necessary to get correct DLL exports for Windows +libenchant_mock_provider_la_CPPFLAGS=-I$(top_srcdir)/src $(ENCHANT_CFLAGS) -D_ENCHANT_BUILD=1 +# Adding -rpath to LDFLAGS causes the .so to be built even though the lib is not to be installed +libenchant_mock_provider_la_LDFLAGS = -module -avoid-version -no-undefined -rpath /foo $(ENCHANT_LIBS) +libenchant_mock_provider_la_SOURCES = mock_provider.cpp + +# Build distinct libraries rather than copying a single one, to avoid being +# defeated by caching, so we can configure each one differently. +libenchant_mock_provider2_la_CPPFLAGS = $(libenchant_mock_provider_la_CPPFLAGS) +libenchant_mock_provider2_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS) +libenchant_mock_provider2_la_SOURCES = $(libenchant_mock_provider_la_SOURCES) + +libenchant_null_provider_la_CPPFLAGS = $(libenchant_mock_provider_la_CPPFLAGS) -DENCHANT_TEST_NULL_PROVIDER +libenchant_null_provider_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS) +libenchant_null_provider_la_SOURCES = $(libenchant_mock_provider_la_SOURCES) + +libenchant_null_identify_la_CPPFLAGS = $(libenchant_mock_provider_la_CPPFLAGS) -DENCHANT_TEST_NULL_IDENTIFY +libenchant_null_identify_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS) +libenchant_null_identify_la_SOURCES = $(libenchant_mock_provider_la_SOURCES) + +libenchant_null_describe_la_CPPFLAGS = $(libenchant_mock_provider_la_CPPFLAGS) -DENCHANT_TEST_NULL_DESCRIBE +libenchant_null_describe_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS) +libenchant_null_describe_la_SOURCES = $(libenchant_mock_provider_la_SOURCES) + check_PROGRAMS = enchant.test enchantxx.test main enchant_test_SOURCES = enchant.test.c @@ -43,7 +75,7 @@ main_SOURCES = main.cpp \ EnchantBrokerTestFixture.h \ EnchantDictionaryTestFixture.h \ EnchantTestFixture.h \ - mock_provider/mock_provider.h \ + mock_provider.h \ dictionary/enchant_dict_add_tests.cpp \ dictionary/enchant_dict_add_to_session_tests.cpp \ dictionary/enchant_dict_check_tests.cpp \ |