Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@xxxxxxxxx> --- Makefile.am | 1 + config/include-Makefile.am | 3 - config/include-sub-Makefile.am | 3 + configure.ac | 1 - shlibs/mount/Makefile.am | 2 +- shlibs/mount/src/Makefile.am | 56 ---------------------- shlibs/mount/src/module.am | 101 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 106 insertions(+), 61 deletions(-) delete mode 100644 shlibs/mount/src/Makefile.am create mode 100644 shlibs/mount/src/module.am diff --git a/Makefile.am b/Makefile.am index 25d6f2a..5ee1df1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -106,6 +106,7 @@ include text-utils/module.am include mount/module.am include sys-utils/module.am include shlibs/blkid/src/module.am +include shlibs/mount/src/module.am clean-local: rm -rf tests/output tests/diff diff --git a/config/include-Makefile.am b/config/include-Makefile.am index 3ce4090..fdd2600 100644 --- a/config/include-Makefile.am +++ b/config/include-Makefile.am @@ -35,6 +35,3 @@ ul_libmount_la = $(top_builddir)/shlibs/mount/src/libmount.la # mount.h is generated by ./configure script and stored in build directory ul_libmount_incdir = $(ul_libmount_builddir) - -$(ul_libmount_la): - $(MAKE) -C $(ul_libmount_builddir) diff --git a/config/include-sub-Makefile.am b/config/include-sub-Makefile.am index 4a38462..f9cc8e5 100644 --- a/config/include-sub-Makefile.am +++ b/config/include-sub-Makefile.am @@ -2,3 +2,6 @@ include $(top_srcdir)/config/include-Makefile.am $(ul_libblkid_la): $(MAKE) -C $(top_builddir) $(ul_libblkid_la) + +$(ul_libmount_la): + $(MAKE) -C $(top_builddir) $(ul_libmount_la) diff --git a/configure.ac b/configure.ac index f931159..9e6bee8 100644 --- a/configure.ac +++ b/configure.ac @@ -1144,7 +1144,6 @@ shlibs/blkid/src/blkid.h shlibs/blkid/samples/Makefile shlibs/mount/mount.pc shlibs/mount/Makefile -shlibs/mount/src/Makefile shlibs/mount/src/mount.h shlibs/mount/docs/Makefile shlibs/mount/docs/version.xml diff --git a/shlibs/mount/Makefile.am b/shlibs/mount/Makefile.am index 33e082f..9de67c0 100644 --- a/shlibs/mount/Makefile.am +++ b/shlibs/mount/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/config/include-sub-Makefile.am -SUBDIRS = src +SUBDIRS = if ENABLE_GTK_DOC SUBDIRS += docs diff --git a/shlibs/mount/src/Makefile.am b/shlibs/mount/src/Makefile.am deleted file mode 100644 index 78a946d..0000000 --- a/shlibs/mount/src/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -include $(top_srcdir)/config/include-sub-Makefile.am - -AM_CPPFLAGS += -I$(ul_libmount_incdir) \ - -I$(ul_libmount_srcdir) \ - -I$(ul_libblkid_incdir) - -# includes -mountincdir = $(includedir)/mount -nodist_mountinc_HEADERS = mount.h - -usrlib_exec_LTLIBRARIES = libmount.la -libmount_la_SOURCES = mountP.h version.c utils.c test.c init.c cache.c \ - optstr.c optmap.c optent.c optls.c iter.c lock.c \ - fs.c tab.c tab_parse.c \ - $(mountinc_HEADERS) \ - $(top_srcdir)/include/list.h \ - $(top_srcdir)/lib/mangle.c \ - $(top_srcdir)/lib/canonicalize.c - -nodist_libmount_la_SOURCES = mountP.h - -libmount_la_LIBADD = $(ul_libblkid_la) - -libmount_la_DEPENDENCIES = $(libmount_la_LIBADD) mount.sym mount.h.in - -libmount_la_LDFLAGS = -Wl,--version-script=$(ul_libmount_srcdir)/mount.sym \ - -version-info $(LIBMOUNT_VERSION_INFO) - -EXTRA_DIST = mount.sym mount.h.in -CLEANFILES = $(tests) - -# move lib from $(usrlib_execdir) to $(libdir) if needed -install-exec-hook: - if test "$(usrlib_execdir)" != "$(libdir)"; then \ - mkdir -p $(DESTDIR)$(libdir); \ - mv $(DESTDIR)$(usrlib_execdir)/libmount.so.* $(DESTDIR)$(libdir); \ - so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libmount.so); \ - so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ - (cd $(DESTDIR)$(usrlib_execdir) && \ - rm -f libmount.so && \ - $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libmount.so); \ - fi - -uninstall-hook: - rm -f $(DESTDIR)$(libdir)/libmount.so* - - -tests = test_version test_cache test_optstr test_optls test_lock \ - test_tab test_utils - -tests: all $(tests) -test_%: %.c - $(COMPILE) -DTEST_PROGRAM $< .libs/libmount.a \ - $(ul_libblkid_builddir)/.libs/libblkid.a -o $@ \ - $(UUID_LIBS) - diff --git a/shlibs/mount/src/module.am b/shlibs/mount/src/module.am new file mode 100644 index 0000000..1c50bd5 --- /dev/null +++ b/shlibs/mount/src/module.am @@ -0,0 +1,101 @@ +AM_CPPFLAGS += -I$(ul_libmount_incdir) \ + -I$(ul_libmount_srcdir) \ + -I$(ul_libblkid_incdir) + +# includes +mountincdir = $(includedir)/mount +nodist_mountinc_HEADERS = shlibs/mount/src/mount.h + +shlibs_mount_src_libmount_la_SOURCES = shlibs/mount/src/mountP.h \ + shlibs/mount/src/version.c \ + shlibs/mount/src/utils.c \ + shlibs/mount/src/test.c \ + shlibs/mount/src/init.c \ + shlibs/mount/src/cache.c \ + shlibs/mount/src/optstr.c \ + shlibs/mount/src/optmap.c \ + shlibs/mount/src/optent.c \ + shlibs/mount/src/optls.c \ + shlibs/mount/src/iter.c \ + shlibs/mount/src/lock.c shlibs/mount/src/fs.c \ + shlibs/mount/src/tab.c \ + shlibs/mount/src/tab_parse.c \ + $(mountinc_HEADERS) include/list.h \ + lib/mangle.c lib/canonicalize.c + +shlibs_mount_src_libmount_la_LIBADD = shlibs/blkid/src/libblkid.la + +shlibs_mount_src_libmount_la_DEPENDENCIES = $(shlibs_mount_src_libmount_la_LIBADD) \ + shlibs/mount/src/mount.sym shlibs/mount/src/mount.h.in + +shlibs_mount_src_libmount_la_LDFLAGS = -Wl,--version-script=$(ul_libmount_srcdir)/mount.sym \ + -version-info $(LIBMOUNT_VERSION_INFO) + +EXTRA_DIST += shlibs/mount/src/mount.sym shlibs/mount/src/mount.h.in + +LIBMOUNT_TESTS_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_PROGRAM +LIBMOUNT_TESTS_LDADD = shlibs/mount/src/libmount.la $(UUID_LIBS) + +shlibs_mount_src_test_cache_CPPFLAGS = $(LIBMOUNT_TESTS_CPPFLAGS) +shlibs_mount_src_test_cache_LDADD = $(LIBMOUNT_TESTS_LDADD) +shlibs_mount_src_test_cache_LDFLAGS = -static +shlibs_mount_src_test_cache_SOURCES = shlibs/mount/src/cache.c + +shlibs_mount_src_test_lock_CPPFLAGS = $(LIBMOUNT_TESTS_CPPFLAGS) +shlibs_mount_src_test_lock_LDADD = $(LIBMOUNT_TESTS_LDADD) +shlibs_mount_src_test_lock_LDFLAGS = -static +shlibs_mount_src_test_lock_SOURCES = shlibs/mount/src/lock.c + +shlibs_mount_src_test_optls_CPPFLAGS = $(LIBMOUNT_TESTS_CPPFLAGS) +shlibs_mount_src_test_optls_LDADD = $(LIBMOUNT_TESTS_LDADD) +shlibs_mount_src_test_optls_LDFLAGS = -static +shlibs_mount_src_test_optls_SOURCES = shlibs/mount/src/optls.c + +shlibs_mount_src_test_optstr_CPPFLAGS = $(LIBMOUNT_TESTS_CPPFLAGS) +shlibs_mount_src_test_optstr_LDADD = $(LIBMOUNT_TESTS_LDADD) +shlibs_mount_src_test_optstr_LDFLAGS = -static +shlibs_mount_src_test_optstr_SOURCES = shlibs/mount/src/optstr.c + +shlibs_mount_src_test_tab_CPPFLAGS = $(LIBMOUNT_TESTS_CPPFLAGS) +shlibs_mount_src_test_tab_LDADD = $(LIBMOUNT_TESTS_LDADD) +shlibs_mount_src_test_tab_LDFLAGS = -static +shlibs_mount_src_test_tab_SOURCES = shlibs/mount/src/tab.c + +shlibs_mount_src_test_utils_CPPFLAGS = $(LIBMOUNT_TESTS_CPPFLAGS) +shlibs_mount_src_test_utils_LDADD = $(LIBMOUNT_TESTS_LDADD) +shlibs_mount_src_test_utils_LDFLAGS = -static +shlibs_mount_src_test_utils_SOURCES = shlibs/mount/src/utils.c + +shlibs_mount_src_test_version_CPPFLAGS = $(LIBMOUNT_TESTS_CPPFLAGS) +shlibs_mount_src_test_version_LDADD = $(LIBMOUNT_TESTS_LDADD) +shlibs_mount_src_test_version_LDFLAGS = -static +shlibs_mount_src_test_version_SOURCES = shlibs/mount/src/version.c + +if BUILD_LIBMOUNT +usrlib_exec_LTLIBRARIES += shlibs/mount/src/libmount.la + +check_PROGRAMS += shlibs/mount/src/test_version \ + shlibs/mount/src/test_cache \ + shlibs/mount/src/test_optstr \ + shlibs/mount/src/test_optls \ + shlibs/mount/src/test_lock shlibs/mount/src/test_tab \ + shlibs/mount/src/test_utils + +# move lib from $(usrlib_execdir) to $(libdir) if needed +install-exec-hook-libmount: + if test "$(usrlib_execdir)" != "$(libdir)"; then \ + mkdir -p $(DESTDIR)$(libdir); \ + mv $(DESTDIR)$(usrlib_execdir)/libmount.so.* $(DESTDIR)$(libdir); \ + so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libmount.so); \ + so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ + (cd $(DESTDIR)$(usrlib_execdir) && \ + rm -f libmount.so && \ + $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libmount.so); \ + fi + +uninstall-hook-libmount: + rm -f $(DESTDIR)$(libdir)/libmount.so* + +INSTALL_EXEC_HOOKS += install-exec-hook-libmount +UNINSTALL_HOOKS += uninstall-hook-libmount +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