From f7b7de3bb14d29ab02d1e713036467adc6b9cb56 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 15 Jun 2011 11:41:27 +0100 Subject: [PATCH] Don't explicitly link thread and network libs into various tests These tests get everything they need from the public or internal API of libdbus-internal.la, and libtool knows how to pull in libraries' dependencies, so we don't need explicit linking. spawn-test and break-loader don't actually need test-utils.[ch] either. --- configure.ac | 3 --- dbus/Makefile.am | 2 +- test/Makefile.am | 15 +++++++-------- test/name-test/Makefile.am | 16 ++++++++-------- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/configure.ac b/configure.ac index 4a7ac3e..aed3a77 100644 --- a/configure.ac +++ b/configure.ac @@ -1137,9 +1137,6 @@ AC_SUBST([NETWORK_libs]) LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs" AC_SUBST([LIBDBUS_LIBS]) -DBUS_TEST_LIBS="$THREAD_LIBS $NETWORK_libs" -AC_SUBST(DBUS_TEST_LIBS) - ### X11 detection DBUS_X_LIBS= DBUS_X_CFLAGS= diff --git a/dbus/Makefile.am b/dbus/Makefile.am index af34bd4..c33cb61 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -280,7 +280,7 @@ endif dbus_test_SOURCES= \ dbus-test-main.c -dbus_test_LDADD=libdbus-internal.la $(DBUS_TEST_LIBS) +dbus_test_LDADD = libdbus-internal.la ## mop up the gcov files clean-local: diff --git a/test/Makefile.am b/test/Makefile.am index 36feca1..ad8b6a1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -85,14 +85,13 @@ test_sleep_forever_SOURCES = \ # This assumes that most tests will be linked to libdbus-internal; # tests linked to only the public libdbus have their own CPPFLAGS. AM_CPPFLAGS=-DDBUS_STATIC_BUILD -TEST_LIBS=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) - -test_service_LDADD=libdbus-testutils.la $(TEST_LIBS) -test_names_LDADD=libdbus-testutils.la $(TEST_LIBS) -## break_loader_LDADD= $(TEST_LIBS) -test_shell_service_LDADD=libdbus-testutils.la $(TEST_LIBS) -shell_test_LDADD=libdbus-testutils.la $(TEST_LIBS) -spawn_test_LDADD=$(TEST_LIBS) + +test_service_LDADD = libdbus-testutils.la $(top_builddir)/dbus/libdbus-internal.la +test_names_LDADD = libdbus-testutils.la $(top_builddir)/dbus/libdbus-internal.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 +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 46ad3c3..226a2b7 100644 --- a/test/name-test/Makefile.am +++ b/test/name-test/Makefile.am @@ -25,45 +25,45 @@ AM_CPPFLAGS = -DDBUS_STATIC_BUILD test_pending_call_dispatch_SOURCES = \ test-pending-call-dispatch.c -test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) +test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-internal.la test_pending_call_timeout_SOURCES = \ test-pending-call-timeout.c -test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) +test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-internal.la test_threads_init_SOURCES = \ test-threads-init.c -test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) +test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-internal.la test_ids_SOURCES = \ test-ids.c -test_ids_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) +test_ids_LDADD=$(top_builddir)/dbus/libdbus-internal.la test_shutdown_SOURCES = \ test-shutdown.c test_shutdown_CFLAGS= -test_shutdown_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_shutdown_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la test_privserver_SOURCES = \ test-privserver.c test_privserver_CFLAGS= -test_privserver_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_privserver_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../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 $(DBUS_TEST_LIBS) +test_privserver_client_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la test_autolaunch_SOURCES = \ test-autolaunch.c test_autolaunch_CFLAGS= -test_autolaunch_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_autolaunch_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la endif -- 2.7.4