Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@xxxxxxxxx> --- Makefile.am | 8 ++++- configure.ac | 1 - disk-utils/Makefile.am | 83 ------------------------------------------------ disk-utils/module.am | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+), 85 deletions(-) delete mode 100644 disk-utils/Makefile.am create mode 100644 disk-utils/module.am diff --git a/Makefile.am b/Makefile.am index 69b5b37..a526a1b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,7 +44,6 @@ SHLIBS_DIRS += shlibs/mount endif SUBDIRS = \ - disk-utils \ fdisk \ getopt \ $(SHLIBS_DIRS) \ @@ -90,15 +89,22 @@ EXTRA_DIST = \ tools \ docs +dist_man_MANS = + TESTS = tests/run.sh check_PROGRAMS = tests/helpers/test_sysinfo tests/helpers/test_pathnames tests/helpers/test_byteswap \ tests/helpers/test_md5 noinst_PROGRAMS = +sbin_PROGRAMS = +usrbin_exec_PROGRAMS = +usrsbin_exec_PROGRAMS = + tests_helpers_test_md5_SOURCES = tests/helpers/test_md5.c lib/md5.c include lib/module.am +include disk-utils/module.am clean-local: rm -rf tests/output tests/diff diff --git a/configure.ac b/configure.ac index ef8d753..8488275 100644 --- a/configure.ac +++ b/configure.ac @@ -1132,7 +1132,6 @@ LIBS="" AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([ -disk-utils/Makefile fdisk/Makefile fsck/Makefile getopt/Makefile diff --git a/disk-utils/Makefile.am b/disk-utils/Makefile.am deleted file mode 100644 index 664c998..0000000 --- a/disk-utils/Makefile.am +++ /dev/null @@ -1,83 +0,0 @@ -include $(top_srcdir)/config/include-Makefile.am - -utils_common = $(top_srcdir)/lib/blkdev.c -if LINUX -utils_common += $(top_srcdir)/lib/linux_version.c -endif - -if HAVE_UUID -if BUILD_LIBUUID -uuid_cflags = -I$(ul_libuuid_srcdir) -uuid_ldadd = $(ul_libuuid_la) -else -uuid_cflags = $(UUID_CFLAGS) -uuid_ldadd = $(UUID_LIBS) -endif -endif - -dist_man_MANS = isosize.8 mkfs.8 mkswap.8 \ - fsck.minix.8 mkfs.minix.8 mkfs.bfs.8 - -sbin_PROGRAMS = mkfs mkswap fsck.minix mkfs.minix mkfs.bfs - -fsck_minix_SOURCES = fsck.minix.c minix.h -mkfs_minix_SOURCES = mkfs.minix.c minix.h $(utils_common) -mkfs_bfs_SOURCES = mkfs.bfs.c $(utils_common) - -swaplabel_SOURCES = swaplabel.c $(utils_common) -swaplabel_LDADD = $(uuid_ldadd) -swaplabel_CFLAGS = $(AM_CFLAGS) $(uuid_cflags) - -mkswap_SOURCES = mkswap.c $(utils_common) $(top_srcdir)/lib/wholedisk.c -mkswap_LDADD = $(uuid_ldadd) -mkswap_CFLAGS = $(AM_CFLAGS) $(uuid_cflags) - -usrbin_exec_PROGRAMS = isosize -usrsbin_exec_PROGRAMS = - -if LINUX -dist_man_MANS += fdformat.8 blockdev.8 -sbin_PROGRAMS += blockdev -usrsbin_exec_PROGRAMS += fdformat -blockdev_SOURCES = blockdev.c $(utils_common) -endif - -if BUILD_LIBBLKID -sbin_PROGRAMS += swaplabel -dist_man_MANS += swaplabel.8 -swaplabel_LDADD += $(ul_libblkid_la) -swaplabel_CFLAGS += -I$(ul_libblkid_incdir) -endif - -if BUILD_ELVTUNE -sbin_PROGRAMS += elvtune -dist_man_MANS += elvtune.8 -elvtune_SOURCES = elvtune.c $(top_srcdir)/lib/linux_version.c -endif - -if HAVE_RAW -if BUILD_RAW -sbin_PROGRAMS += raw -dist_man_MANS += raw.8 -endif -endif - -if BUILD_CRAMFS -cramfs_common = $(utils_common) cramfs.h cramfs_common.c cramfs_common.h -sbin_PROGRAMS += fsck.cramfs mkfs.cramfs -fsck_cramfs_SOURCES = fsck.cramfs.c $(cramfs_common) -mkfs_cramfs_SOURCES = mkfs.cramfs.c $(cramfs_common) $(top_srcdir)/lib/md5.c -fsck_cramfs_LDADD = -lz -mkfs_cramfs_LDADD = -lz -endif - -if BUILD_LIBBLKID -# only in-tree libblkid has partitions parsing support -mkswap_LDADD += $(ul_libblkid_la) -mkswap_CFLAGS += -I$(ul_libblkid_incdir) -endif - -if HAVE_SELINUX -mkswap_LDADD += -lselinux -endif - diff --git a/disk-utils/module.am b/disk-utils/module.am new file mode 100644 index 0000000..c504f3a --- /dev/null +++ b/disk-utils/module.am @@ -0,0 +1,80 @@ +disk_utils_common = lib/blkdev.c +if LINUX +disk_utils_common += lib/linux_version.c +endif + +if HAVE_UUID +if BUILD_LIBUUID +uuid_cflags = -I$(ul_libuuid_srcdir) +uuid_ldadd = $(ul_libuuid_la) +else +uuid_cflags = $(UUID_CFLAGS) +uuid_ldadd = $(UUID_LIBS) +endif +endif + +dist_man_MANS += disk-utils/isosize.8 disk-utils/mkfs.8 disk-utils/mkswap.8 \ + disk-utils/fsck.minix.8 disk-utils/mkfs.minix.8 disk-utils/mkfs.bfs.8 + +sbin_PROGRAMS += disk-utils/mkfs disk-utils/mkswap disk-utils/fsck.minix disk-utils/mkfs.minix disk-utils/mkfs.bfs + +disk_utils_fsck_minix_SOURCES = disk-utils/fsck.minix.c disk-utils/minix.h +disk_utils_mkfs_minix_SOURCES = disk-utils/mkfs.minix.c disk-utils/minix.h $(disk_utils_common) +disk_utils_mkfs_bfs_SOURCES = disk-utils/mkfs.bfs.c $(disk_utils_common) + +disk_utils_swaplabel_SOURCES = disk-utils/swaplabel.c $(disk_utils_common) +disk_utils_swaplabel_LDADD = $(uuid_ldadd) +disk_utils_swaplabel_CFLAGS = $(AM_CFLAGS) $(uuid_cflags) + +disk_utils_mkswap_SOURCES = disk-utils/mkswap.c $(disk_utils_common) lib/wholedisk.c +disk_utils_mkswap_LDADD = $(uuid_ldadd) +disk_utils_mkswap_CFLAGS = $(AM_CFLAGS) $(uuid_cflags) + +usrbin_exec_PROGRAMS += disk-utils/isosize + +if LINUX +dist_man_MANS += disk-utils/fdformat.8 disk-utils/blockdev.8 +sbin_PROGRAMS += disk-utils/blockdev +usrsbin_exec_PROGRAMS += disk-utils/fdformat +disk_utils_blockdev_SOURCES = disk-utils/blockdev.c $(disk_utils_common) +endif + +if BUILD_LIBBLKID +sbin_PROGRAMS += disk-utils/swaplabel +dist_man_MANS += disk-utils/swaplabel.8 +disk_utils_swaplabel_LDADD += $(ul_libblkid_la) +disk_utils_swaplabel_CFLAGS += -I$(ul_libblkid_incdir) +endif + +if BUILD_ELVTUNE +sbin_PROGRAMS += disk-utils/elvtune +dist_man_MANS += disk-utils/elvtune.8 +disk_utils_elvtune_SOURCES = disk-utils/elvtune.c lib/linux_version.c +endif + +if HAVE_RAW +if BUILD_RAW +sbin_PROGRAMS += disk-utils/raw +dist_man_MANS += disk-utils/raw.8 +endif +endif + +if BUILD_CRAMFS +cramfs_common = $(disk_utils_common) disk-utils/cramfs.h disk-utils/cramfs_common.c disk-utils/cramfs_common.h +sbin_PROGRAMS += disk-utils/fsck.cramfs disk-utils/mkfs.cramfs +disk_utils_fsck_cramfs_SOURCES = disk-utils/fsck.cramfs.c $(cramfs_common) +disk_utils_mkfs_cramfs_SOURCES = disk-utils/mkfs.cramfs.c $(cramfs_common) lib/md5.c +disk_utils_fsck_cramfs_LDADD = -lz +disk_utils_mkfs_cramfs_LDADD = -lz +endif + +if BUILD_LIBBLKID +# only in-tree libblkid has partitions parsing support +disk_utils_mkswap_LDADD += $(ul_libblkid_la) +disk_utils_mkswap_CFLAGS += -I$(ul_libblkid_incdir) +endif + +if HAVE_SELINUX +disk_utils_mkswap_LDADD += -lselinux +endif + -- 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