From 6e2c394852e5d0d40beeffe0fd7949e3660417f6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 11 Jan 2010 13:42:45 +0100 Subject: [PATCH] libmount: proper tests definition in Makefile.am Signed-off-by: Karel Zak --- shlibs/mount/src/Makefile.am | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/shlibs/mount/src/Makefile.am b/shlibs/mount/src/Makefile.am index 8a265ecf..b525bf73 100644 --- a/shlibs/mount/src/Makefile.am +++ b/shlibs/mount/src/Makefile.am @@ -22,16 +22,9 @@ libmount_la_DEPENDENCIES = $(libmount_la_LIBADD) mount.sym mount.h.in libmount_la_LDFLAGS = -Wl,--version-script=$(ul_libmount_srcdir)/mount.sym \ -version-info $(LIBMOUNT_VERSION_INFO) -tests = test_version test_cache test_optstr test_optls - EXTRA_DIST = mount.sym mount.h.in CLEANFILES = $(tests) -tests: all $(tests) -test_%: %.c - $(COMPILE) -DTEST_PROGRAM $< .libs/libmount.a -o $@ $(BLKID_LIBS) - - # move lib from $(usrlib_execdir) to $(libdir) if needed install-exec-hook: if test "$(usrlib_execdir)" != "$(libdir)"; then \ @@ -46,3 +39,24 @@ install-exec-hook: uninstall-hook: rm -f $(DESTDIR)$(libdir)/libmount.so* + +# tests +noinst_PROGRAMS = test_version test_cache test_optstr test_optls +tests_cppflags = $(AM_CPPFLAGS) -DTEST_PROGRAM +tests_ldadd = .libs/libmount.a $(ul_libblkid_la) + +test_version_SOURCES = version.c +test_version_CPPFLAGS = $(tests_cppflags) +test_version_LDADD = $(tests_ldadd) + +test_cache_SOURCES = cache.c +test_cache_CPPFLAGS = $(tests_cppflags) +test_cache_LDADD = $(tests_ldadd) + +test_optstr_SOURCES = optstr.c +test_optstr_CPPFLAGS = $(tests_cppflags) +test_optstr_LDADD = $(tests_ldadd) + +test_optls_SOURCES = optls.c +test_optls_CPPFLAGS = $(tests_cppflags) +test_optls_LDADD = $(tests_ldadd) -- 2.39.5