This allows to separate the more complex build declarations keeping a single non-recursive Makefile. Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@xxxxxxxxx> --- Makefile.am | 4 +++- configure.ac | 1 - lib/Makefile.am | 26 -------------------------- lib/module.am | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 28 deletions(-) delete mode 100644 lib/Makefile.am create mode 100644 lib/module.am diff --git a/Makefile.am b/Makefile.am index b6195fd..69b5b37 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,7 +47,6 @@ SUBDIRS = \ disk-utils \ fdisk \ getopt \ - lib \ $(SHLIBS_DIRS) \ login-utils \ misc-utils \ @@ -95,9 +94,12 @@ TESTS = tests/run.sh check_PROGRAMS = tests/helpers/test_sysinfo tests/helpers/test_pathnames tests/helpers/test_byteswap \ tests/helpers/test_md5 +noinst_PROGRAMS = tests_helpers_test_md5_SOURCES = tests/helpers/test_md5.c lib/md5.c +include lib/module.am + clean-local: rm -rf tests/output tests/diff diff --git a/configure.ac b/configure.ac index 975df77..ef8d753 100644 --- a/configure.ac +++ b/configure.ac @@ -1137,7 +1137,6 @@ fdisk/Makefile fsck/Makefile getopt/Makefile hwclock/Makefile -lib/Makefile login-utils/Makefile Makefile misc-utils/chkdupexe:misc-utils/chkdupexe.pl diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index 2a185f3..0000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -include $(top_srcdir)/config/include-Makefile.am - -AM_CPPFLAGS += -DTEST_PROGRAM - -noinst_PROGRAMS = test_blkdev test_ismounted test_wholedisk test_mangle \ - test_strtosize test_tt -if LINUX -if HAVE_CPU_SET_T -noinst_PROGRAMS += test_cpuset -endif -endif - -test_blkdev_SOURCES = blkdev.c -test_ismounted_SOURCES = ismounted.c -test_wholedisk_SOURCES = wholedisk.c -test_mangle_SOURCES = mangle.c -test_strtosize_SOURCES = strtosize.c -if LINUX -test_cpuset_SOURCES = cpuset.c -endif -test_tt_SOURCES = tt.c - -if LINUX -test_blkdev_SOURCES += linux_version.c -endif - diff --git a/lib/module.am b/lib/module.am new file mode 100644 index 0000000..1b8cd09 --- /dev/null +++ b/lib/module.am @@ -0,0 +1,35 @@ +noinst_PROGRAMS += lib/test_blkdev lib/test_ismounted lib/test_wholedisk lib/test_mangle \ + lib/test_strtosize lib/test_tt + +if LINUX +if HAVE_CPU_SET_T +noinst_PROGRAMS += lib/test_cpuset +endif +endif + +LIB_TESTS_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_PROGRAM + +lib_test_blkdev_SOURCES = lib/blkdev.c +lib_test_blkdev_CPPFLAGS = $(LIB_TESTS_CPPFLAGS) + +if LINUX +lib_test_blkdev_SOURCES += lib/linux_version.c +endif + +lib_test_ismounted_SOURCES = lib/ismounted.c +lib_test_ismounted_CPPFLAGS = $(LIB_TESTS_CPPFLAGS) + +lib_test_wholedisk_SOURCES = lib/wholedisk.c +lib_test_wholedisk_CPPFLAGS = $(LIB_TESTS_CPPFLAGS) + +lib_test_mangle_SOURCES = lib/mangle.c +lib_test_mangle_CPPFLAGS = $(LIB_TESTS_CPPFLAGS) + +lib_test_strtosize_SOURCES = lib/strtosize.c +lib_test_strtosize_CPPFLAGS = $(LIB_TESTS_CPPFLAGS) + +lib_test_cpuset_SOURCES = lib/cpuset.c +lib_test_cpuset_CPPFLAGS = $(LIB_TESTS_CPPFLAGS) + +lib_test_tt_SOURCES = lib/tt.c +lib_test_tt_CPPFLAGS = $(LIB_TESTS_CPPFLAGS) -- 1.7.1.1 -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html