From: Karel Zak Date: Tue, 20 Dec 2011 12:07:54 +0000 (+0100) Subject: losetup: move to sys-utils directory X-Git-Tag: v2.21-rc1~106 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd6d0d039c311b4f31f1c2a1312ff414dfbd020a;p=thirdparty%2Futil-linux.git losetup: move to sys-utils directory Now losetup(8) is independent on mount/ stuff at all. Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index c0d61aceeb..aa4af08801 100644 --- a/configure.ac +++ b/configure.ac @@ -687,6 +687,15 @@ UL_REQUIRES_BUILD([mount], [libblkid]) AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes) +AC_ARG_ENABLE([losetup], + AS_HELP_STRING([--disable-losetup], [do not build losetup]), + [], enable_losetup=check +) +UL_BUILD_INIT([losetup]) +UL_REQUIRES_LINUX([losetup]) +AM_CONDITIONAL(BUILD_LOSETUP, test "x$build_losetup" = xyes) + + AC_ARG_ENABLE([libmount-mount], AS_HELP_STRING([--enable-libmount-mount], [link mount(8) with libmount (EXPERIMENTAL)]), [], enable_libmount_mount=no diff --git a/mount/.gitignore b/mount/.gitignore index db657c719b..629b07fcda 100644 --- a/mount/.gitignore +++ b/mount/.gitignore @@ -1,4 +1,3 @@ -losetup mount mtab_lock_test swapon diff --git a/mount/Makefile.am b/mount/Makefile.am index a2d496dcd7..073f055450 100644 --- a/mount/Makefile.am +++ b/mount/Makefile.am @@ -1,8 +1,8 @@ include $(top_srcdir)/config/include-Makefile.am bin_PROGRAMS = mount umount -sbin_PROGRAMS = losetup swapon -dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 +sbin_PROGRAMS = swapon +dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 # generic sources for all programs (mount, umount) srcs_common = sundries.c $(top_srcdir)/lib/canonicalize.c sundries.h @@ -50,10 +50,6 @@ swapon_SOURCES = swapon.c swap_constants.h $(top_srcdir)/lib/linux_version.c \ swapon_CFLAGS = $(cflags_common) swapon_LDADD = $(ldadd_common) -losetup_SOURCES = lomount.c \ - $(top_srcdir)/lib/canonicalize.c \ - $(top_srcdir)/lib/strutils.c - mount_static_LDADD = if HAVE_STATIC_MOUNT @@ -72,13 +68,6 @@ 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) -endif - - if HAVE_SELINUX mount_LDADD += $(SELINUX_LIBS) mount_static_LDADD += $(SELINUX_LIBS_STATIC) diff --git a/sys-utils/.gitignore b/sys-utils/.gitignore index 01a3df9860..3426674b09 100644 --- a/sys-utils/.gitignore +++ b/sys-utils/.gitignore @@ -14,6 +14,7 @@ ipcs ldattach linux32.8 linux64.8 +losetup lscpu mips32.8 mips64.8 diff --git a/sys-utils/Makefile.am b/sys-utils/Makefile.am index 7285bcb7e4..8f2f12ec44 100644 --- a/sys-utils/Makefile.am +++ b/sys-utils/Makefile.am @@ -18,6 +18,23 @@ dist_man_MANS += dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \ ldattach.8 tunelp.8 rtcwake.8 fsfreeze.8 fstrim.8 endif +if BUILD_LOSETUP +sbin_PROGRAMS += losetup +dist_man_MANS += losetup.8 + +losetup_SOURCES = losetup.c \ + $(top_srcdir)/lib/canonicalize.c \ + $(top_srcdir)/lib/strutils.c + +if HAVE_STATIC_LOSETUP +bin_PROGRAMS += losetup.static +losetup_static_SOURCES = $(losetup_SOURCES) +losetup_static_LDFLAGS = -all-static +endif + +endif # BUILD_LOSETUP + + if BUILD_PRLIMIT usrbin_exec_PROGRAMS += prlimit dist_man_MANS += prlimit.1 diff --git a/mount/losetup.8 b/sys-utils/losetup.8 similarity index 100% rename from mount/losetup.8 rename to sys-utils/losetup.8 diff --git a/mount/lomount.c b/sys-utils/losetup.c similarity index 100% rename from mount/lomount.c rename to sys-utils/losetup.c