summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-06-15 11:50:33 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-07-29 11:17:17 +0100
commit274e0fbc20a9639201c64830c7eca7a5cea97e73 (patch)
tree082e110bf2ec04fa4672df3b13b34d65526cbb01 /test
parentf7b7de3bb14d29ab02d1e713036467adc6b9cb56 (diff)
downloaddbus-274e0fbc20a9639201c64830c7eca7a5cea97e73.tar.gz
Simplify linking for tests that use libdbus-testutils
This is the library used by tests that link libdbus-internal and DBusLoop. By linking libdbus-internal into it, we can avoid having to repeat that dependency all over the place - libtool and cmake both know how to follow recursive dependencies. In cmake, also use libdbus-testutils for more tests, in preference to repeating its source files.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am16
-rw-r--r--test/name-test/Makefile.am8
2 files changed, 15 insertions, 9 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index ad8b6a1c..0448dca8 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -9,7 +9,13 @@ INCLUDES=-I$(top_srcdir)
# improve backtraces from test stuff
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
-libdbus_testutils_la_SOURCES = test-utils.h test-utils.c
+libdbus_testutils_la_SOURCES = \
+ test-utils.c \
+ test-utils.h \
+ $(NULL)
+libdbus_testutils_la_LIBADD = \
+ $(top_builddir)/dbus/libdbus-internal.la \
+ $(NULL)
noinst_LTLIBRARIES = libdbus-testutils.la
@@ -86,11 +92,11 @@ test_sleep_forever_SOURCES = \
# tests linked to only the public libdbus have their own CPPFLAGS.
AM_CPPFLAGS=-DDBUS_STATIC_BUILD
-test_service_LDADD = libdbus-testutils.la $(top_builddir)/dbus/libdbus-internal.la
-test_names_LDADD = libdbus-testutils.la $(top_builddir)/dbus/libdbus-internal.la
+test_service_LDADD = libdbus-testutils.la
+test_names_LDADD = libdbus-testutils.la
## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la
-test_shell_service_LDADD = libdbus-testutils.la $(top_builddir)/dbus/libdbus-internal.la
-shell_test_LDADD = libdbus-testutils.la $(top_builddir)/dbus/libdbus-internal.la
+test_shell_service_LDADD = libdbus-testutils.la
+shell_test_LDADD = libdbus-testutils.la
spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
EXTRA_DIST = dbus-test-runner
diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am
index 226a2b74..f4754f39 100644
--- a/test/name-test/Makefile.am
+++ b/test/name-test/Makefile.am
@@ -46,24 +46,24 @@ test_shutdown_SOURCES = \
test-shutdown.c
test_shutdown_CFLAGS=
-test_shutdown_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la
+test_shutdown_LDADD=../libdbus-testutils.la
test_privserver_SOURCES = \
test-privserver.c
test_privserver_CFLAGS=
-test_privserver_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la
+test_privserver_LDADD=../libdbus-testutils.la
test_privserver_client_SOURCES = \
test-privserver-client.c
test_privserver_client_CFLAGS=
-test_privserver_client_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la
+test_privserver_client_LDADD=../libdbus-testutils.la
test_autolaunch_SOURCES = \
test-autolaunch.c
test_autolaunch_CFLAGS=
-test_autolaunch_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la
+test_autolaunch_LDADD=../libdbus-testutils.la
endif