Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@xxxxxxxxx> --- Makefile.am | 5 +-- configure.ac | 1 - mount/Makefile.am | 101 --------------------------------------------------- mount/module.am | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 105 insertions(+), 106 deletions(-) delete mode 100644 mount/Makefile.am create mode 100644 mount/module.am diff --git a/Makefile.am b/Makefile.am index c167fc2..ce0ffd0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -58,10 +58,6 @@ if LINUX linux_version_srcs = lib/linux_version.c endif -if BUILD_MOUNT -SUBDIRS += mount -endif - ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ @@ -108,6 +104,7 @@ include login-utils/module.am include misc-utils/module.am include schedutils/module.am include text-utils/module.am +include mount/module.am clean-local: rm -rf tests/output tests/diff diff --git a/configure.ac b/configure.ac index fb71974..8d364ec 100644 --- a/configure.ac +++ b/configure.ac @@ -1134,7 +1134,6 @@ AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([ Makefile misc-utils/chkdupexe:misc-utils/chkdupexe.pl -mount/Makefile po/Makefile.in shlibs/blkid/blkid.pc shlibs/blkid/Makefile diff --git a/mount/Makefile.am b/mount/Makefile.am deleted file mode 100644 index 83e1fcd..0000000 --- a/mount/Makefile.am +++ /dev/null @@ -1,101 +0,0 @@ -include $(top_srcdir)/config/include-Makefile.am - -EXTRA_DIST = README.mount - -bin_PROGRAMS = mount umount -sbin_PROGRAMS = losetup swapon -dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 - -# generic sources for all programs (mount, umount, losetup) -srcs_common = sundries.c xmalloc.c $(top_srcdir)/lib/canonicalize.c sundries.h xmalloc.h - -# generic header for mount and umount -hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ - lomount.h getusername.h loop.h - -# generic sources for mount and umount -srcs_mount = fstab.c mount_mntent.c getusername.c lomount.c devname.c devname.h \ - $(srcs_common) $(hdrs_mount) $(top_srcdir)/lib/env.c \ - $(top_srcdir)/lib/linux_version.c $(top_srcdir)/lib/blkdev.c \ - $(top_srcdir)/lib/fsprobe.c $(top_srcdir)/lib/mangle.c - -# generic flags for all programs (except losetup) -# -- note that pkg-config autoconf macros (pkg.m4) does not differentiate -# between CFLAGS and CPPFLAGS, we follow this behaviour and use CFLAGS only. -ldadd_common = -ldadd_static = -cflags_common = $(AM_CFLAGS) -ldflags_static = -all-static - -mount_SOURCES = mount.c $(srcs_mount) $(top_srcdir)/lib/setproctitle.c \ - $(top_srcdir)/lib/strtosize.c -mount_CFLAGS = $(SUID_CFLAGS) $(cflags_common) -mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) -mount_LDADD = $(ldadd_common) - -umount_SOURCES = umount.c $(srcs_mount) -umount_CFLAGS = $(SUID_CFLAGS) $(cflags_common) -umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) -umount_LDADD = $(ldadd_common) - -swapon_SOURCES = swapon.c swap_constants.h $(top_srcdir)/lib/linux_version.c \ - $(top_srcdir)/lib/blkdev.c $(top_srcdir)/lib/fsprobe.c \ - $(top_srcdir)/lib/canonicalize.c $(top_srcdir)/lib/mangle.c -swapon_CFLAGS = $(cflags_common) -swapon_LDADD = $(ldadd_common) - -losetup_SOURCES = lomount.c $(srcs_common) loop.h lomount.h \ - $(top_srcdir)/lib/strtosize.c -losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) - -mount_static_LDADD = - -if HAVE_STATIC_MOUNT -bin_PROGRAMS += mount.static -mount_static_SOURCES = $(mount_SOURCES) -mount_static_CFLAGS = $(cflags_common) -mount_static_LDFLAGS = $(ldflags_static) -mount_static_LDADD += $(ldadd_static) -endif - -if HAVE_STATIC_UMOUNT -bin_PROGRAMS += umount.static -umount_static_SOURCES = $(umount_SOURCES) -umount_static_CFLAGS = $(cflags_common) -umount_static_LDFLAGS = $(ldflags_static) -umount_static_LDADD = $(ldadd_static) -endif - -if HAVE_STATIC_LOSETUP -bin_PROGRAMS += losetup.static -losetup_static_SOURCES = $(losetup_SOURCES) -losetup_static_LDFLAGS = $(ldflags_static) -losetup_static_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) -endif - -if BUILD_LIBBLKID -ldadd_common += $(ul_libblkid_la) -ldadd_static += $(ul_libblkid_la) -cflags_common += -I$(ul_libblkid_incdir) -else -ldadd_common += $(BLKID_LIBS) -ldadd_static += $(BLKID_LIBS_STATIC) -cflags_common += $(BLKID_CFLAGS) -endif - -if HAVE_SELINUX -mount_LDADD += $(SELINUX_LIBS) -mount_static_LDADD += $(SELINUX_LIBS_STATIC) -endif - -noinst_PROGRAMS = mtab_lock_test -mtab_lock_test_SOURCES = fstab.c $(srcs_common) $(hdrs_mount) -mtab_lock_test_CPPFLAGS = -DMAIN_TEST_MTABLOCK $(AM_CPPFLAGS) - -install-exec-hook: - cd $(DESTDIR)$(sbindir) && ln -sf swapon swapoff -if MAKEINSTALL_DO_SETUID - chmod 4755 $(DESTDIR)$(bindir)/mount - chmod 4755 $(DESTDIR)$(bindir)/umount -endif - diff --git a/mount/module.am b/mount/module.am new file mode 100644 index 0000000..6537491 --- /dev/null +++ b/mount/module.am @@ -0,0 +1,104 @@ +EXTRA_DIST += mount/README.mount + +# generic sources for all programs (mount, umount, losetup) +srcs_common = mount/sundries.c mount/xmalloc.c lib/canonicalize.c \ + mount/sundries.h mount/xmalloc.h + +# generic header for mount and umount +hdrs_mount = mount/fstab.h mount/mount_mntent.h mount/loop.h \ + mount/mount_constants.h mount/lomount.h mount/getusername.h + +# generic sources for mount and umount +srcs_mount = mount/fstab.c mount/mount_mntent.c mount/getusername.c \ + mount/lomount.c mount/devname.c mount/devname.h $(srcs_common) \ + $(hdrs_mount) lib/env.c lib/linux_version.c lib/blkdev.c \ + lib/fsprobe.c lib/mangle.c + +# generic flags for all programs (except losetup) +# -- note that pkg-config autoconf macros (pkg.m4) does not differentiate +# between CFLAGS and CPPFLAGS, we follow this behaviour and use CFLAGS only. +ldadd_common = +ldadd_static = +cflags_common = $(AM_CFLAGS) +ldflags_static = -all-static + +mount_mount_SOURCES = mount/mount.c $(srcs_mount) lib/setproctitle.c \ + lib/strtosize.c +mount_mount_CFLAGS = $(SUID_CFLAGS) $(cflags_common) +mount_mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) +mount_mount_LDADD = $(ldadd_common) + +mount_umount_SOURCES = mount/umount.c $(srcs_mount) +mount_umount_CFLAGS = $(SUID_CFLAGS) $(cflags_common) +mount_umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) +mount_umount_LDADD = $(ldadd_common) + +mount_swapon_SOURCES = mount/swapon.c mount/swap_constants.h \ + lib/linux_version.c lib/blkdev.c lib/fsprobe.c \ + lib/canonicalize.c lib/mangle.c +mount_swapon_CFLAGS = $(cflags_common) +mount_swapon_LDADD = $(ldadd_common) + +mount_losetup_SOURCES = mount/lomount.c $(srcs_common) mount/loop.h \ + mount/lomount.h lib/strtosize.c +mount_losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) + +mount_mount_static_LDADD = + +if HAVE_STATIC_MOUNT +bin_PROGRAMS += mount/mount.static +mount_mount_static_SOURCES = $(mount_mount_SOURCES) +mount_mount_static_CFLAGS = $(cflags_common) +mount_mount_static_LDFLAGS = $(ldflags_static) +mount_mount_static_LDADD += $(ldadd_static) +endif + +if HAVE_STATIC_UMOUNT +bin_PROGRAMS += mount/umount.static +mount_umount_static_SOURCES = $(mount_umount_SOURCES) +mount_umount_static_CFLAGS = $(cflags_common) +mount_umount_static_LDFLAGS = $(ldflags_static) +mount_umount_static_LDADD = $(ldadd_static) +endif + +if HAVE_STATIC_LOSETUP +bin_PROGRAMS += mount/losetup.static +mount_losetup_static_SOURCES = $(mount_losetup_SOURCES) +mount_losetup_static_LDFLAGS = $(ldflags_static) +mount_losetup_static_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) +endif + +if BUILD_LIBBLKID +ldadd_common += $(ul_libblkid_la) +ldadd_static += $(ul_libblkid_la) +cflags_common += -I$(ul_libblkid_incdir) +else +ldadd_common += $(BLKID_LIBS) +ldadd_static += $(BLKID_LIBS_STATIC) +cflags_common += $(BLKID_CFLAGS) +endif + +if HAVE_SELINUX +mount_mount_LDADD += $(SELINUX_LIBS) +mount_mount_static_LDADD += $(SELINUX_LIBS_STATIC) +endif + +noinst_PROGRAMS += mount/mtab_lock_test +mount_mtab_lock_test_SOURCES = mount/fstab.c $(srcs_common) $(hdrs_mount) +mount_mtab_lock_test_CPPFLAGS = -DMAIN_TEST_MTABLOCK $(AM_CPPFLAGS) + +if BUILD_MOUNT +bin_PROGRAMS += mount/mount mount/umount +sbin_PROGRAMS += mount/losetup mount/swapon +dist_man_MANS += mount/fstab.5 mount/mount.8 mount/swapoff.8 mount/swapon.8 mount/umount.8 mount/losetup.8 + +install-exec-hook-mount: + cd $(DESTDIR)$(sbindir) && ln -sf swapon swapoff +if MAKEINSTALL_DO_SETUID + chmod 4755 $(DESTDIR)$(bindir)/mount + chmod 4755 $(DESTDIR)$(bindir)/umount +endif + +INSTALL_EXEC_HOOKS += install-exec-hook-mount + +endif # BUILD_MOUNT -- 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