From 0201cef1c29c640be88cf2d24dea3061e7c243cb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 8 Jun 2010 11:28:26 +0200 Subject: [PATCH] libmount: don't build tests by default Signed-off-by: Karel Zak --- shlibs/mount/src/Makefile.am | 37 +++++++----------------------------- 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/shlibs/mount/src/Makefile.am b/shlibs/mount/src/Makefile.am index 2a93df25..aebd3cc5 100644 --- a/shlibs/mount/src/Makefile.am +++ b/shlibs/mount/src/Makefile.am @@ -44,36 +44,13 @@ install-exec-hook: uninstall-hook: rm -f $(DESTDIR)$(libdir)/libmount.so* -# tests -noinst_PROGRAMS = test_version test_cache test_optstr test_optls test_lock \ - test_tab test_utils -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) - -test_lock_SOURCES = lock.c -test_lock_CPPFLAGS = $(tests_cppflags) -test_lock_LDADD = $(tests_ldadd) +tests = test_version test_cache test_optstr test_optls test_lock \ + test_tab test_utils -test_tab_SOURCES = tab_parse.c tab.c -test_tab_CPPFLAGS = $(tests_cppflags) -test_tab_LDADD = $(tests_ldadd) +tests: all $(tests) +test_%: %.c + $(COMPILE) -DTEST_PROGRAM $< .libs/libmount.a \ + $(ul_libblkid_builddir)/.libs/libblkid.a -o $@ \ + $(UUID_LIBS) -test_utils_SOURCES = utils.c -test_utils_CPPFLAGS = $(tests_cppflags) -test_utils_LDADD = $(tests_ldadd) -- 2.39.5