Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@xxxxxxxxx> --- Makefile.am | 1 + config/include-Makefile.am | 4 --- config/include-sub-Makefile.am | 3 ++ configure.ac | 1 - shlibs/uuid/Makefile.am | 2 +- shlibs/uuid/src/Makefile.am | 38 ------------------------------- shlibs/uuid/src/module.am | 48 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 53 insertions(+), 44 deletions(-) delete mode 100644 shlibs/uuid/src/Makefile.am create mode 100644 shlibs/uuid/src/module.am diff --git a/Makefile.am b/Makefile.am index 5ee1df1..ff6e4b4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -107,6 +107,7 @@ include mount/module.am include sys-utils/module.am include shlibs/blkid/src/module.am include shlibs/mount/src/module.am +include shlibs/uuid/src/module.am clean-local: rm -rf tests/output tests/diff diff --git a/config/include-Makefile.am b/config/include-Makefile.am index fdd2600..a186bda 100644 --- a/config/include-Makefile.am +++ b/config/include-Makefile.am @@ -24,10 +24,6 @@ ul_libuuid_srcdir = $(top_srcdir)/shlibs/uuid/src ul_libuuid_builddir = $(top_builddir)/shlibs/uuid/src ul_libuuid_la = $(top_builddir)/shlibs/uuid/src/libuuid.la -$(ul_libuuid_la): - $(MAKE) -C $(ul_libuuid_builddir) - - # mount ul_libmount_srcdir = $(top_srcdir)/shlibs/mount/src ul_libmount_builddir = $(top_builddir)/shlibs/mount/src diff --git a/config/include-sub-Makefile.am b/config/include-sub-Makefile.am index f9cc8e5..0444977 100644 --- a/config/include-sub-Makefile.am +++ b/config/include-sub-Makefile.am @@ -5,3 +5,6 @@ $(ul_libblkid_la): $(ul_libmount_la): $(MAKE) -C $(top_builddir) $(ul_libmount_la) + +$(ul_libuuid_la): + $(MAKE) -C $(top_builddir) $(ul_libuuid_la) diff --git a/configure.ac b/configure.ac index 9e6bee8..9288fd0 100644 --- a/configure.ac +++ b/configure.ac @@ -1150,7 +1150,6 @@ shlibs/mount/docs/version.xml shlibs/uuid/uuid.pc shlibs/uuid/Makefile shlibs/uuid/man/Makefile -shlibs/uuid/src/Makefile tests/commands.sh ]) diff --git a/shlibs/uuid/Makefile.am b/shlibs/uuid/Makefile.am index 9559360..73c1a26 100644 --- a/shlibs/uuid/Makefile.am +++ b/shlibs/uuid/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/config/include-sub-Makefile.am -SUBDIRS = src man +SUBDIRS = man # pkg-config stuff pkgconfigdir = $(usrlib_execdir)/pkgconfig diff --git a/shlibs/uuid/src/Makefile.am b/shlibs/uuid/src/Makefile.am deleted file mode 100644 index b994891..0000000 --- a/shlibs/uuid/src/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -include $(top_srcdir)/config/include-sub-Makefile.am - -AM_CPPFLAGS += -I$(ul_libuuid_srcdir) - -noinst_PROGRAMS = tst_uuid -tst_uuid_LDADD = libuuid.la #$(ul_libuuid_la) - -# includes -uuidincdir = $(includedir)/uuid -uuidinc_HEADERS = uuid.h - -usrlib_exec_LTLIBRARIES = libuuid.la -libuuid_la_SOURCES = clear.c compare.c copy.c gen_uuid.c \ - isnull.c pack.c parse.c unpack.c unparse.c uuidd.h \ - uuidd.h uuidP.h uuid_time.c $(uuidinc_HEADERS) - -libuuid_la_DEPENDENCIES = uuid.sym - -libuuid_la_LDFLAGS = -Wl,--version-script=$(ul_libuuid_srcdir)/uuid.sym \ - -version-info $(LIBUUID_VERSION_INFO) - -EXTRA_DIST = uuid.sym gen_uuid_nt.c - -# 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)/libuuid.so.* $(DESTDIR)$(libdir); \ - so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libuuid.so); \ - so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ - (cd $(DESTDIR)$(usrlib_execdir) && \ - rm -f libuuid.so && \ - $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libuuid.so); \ - fi - -uninstall-hook: - rm -f $(DESTDIR)$(libdir)/libuuid.so* - diff --git a/shlibs/uuid/src/module.am b/shlibs/uuid/src/module.am new file mode 100644 index 0000000..12375fe --- /dev/null +++ b/shlibs/uuid/src/module.am @@ -0,0 +1,48 @@ +AM_CPPFLAGS += -I$(ul_libuuid_srcdir) + +shlibs_uuid_src_tst_uuid_LDADD = shlibs/uuid/src/libuuid.la +shlibs_uuid_src_tst_uuid_LDFLAGS = -static + +# includes +uuidincdir = $(includedir)/uuid +uuidinc_HEADERS = shlibs/uuid/src/uuid.h + +shlibs_uuid_src_libuuid_la_SOURCES = shlibs/uuid/src/clear.c \ + shlibs/uuid/src/compare.c shlibs/uuid/src/copy.c \ + shlibs/uuid/src/gen_uuid.c shlibs/uuid/src/isnull.c \ + shlibs/uuid/src/pack.c shlibs/uuid/src/parse.c \ + shlibs/uuid/src/unpack.c shlibs/uuid/src/unparse.c \ + shlibs/uuid/src/uuidd.h shlibs/uuid/src/uuidd.h \ + shlibs/uuid/src/uuidP.h shlibs/uuid/src/uuid_time.c \ + $(uuidinc_HEADERS) + +shlibs_uuid_src_libuuid_la_DEPENDENCIES = shlibs/uuid/src/uuid.sym + +shlibs_uuid_src_libuuid_la_LDFLAGS = -Wl,--version-script=$(ul_libuuid_srcdir)/uuid.sym \ + -version-info $(LIBUUID_VERSION_INFO) + +EXTRA_DIST += shlibs/uuid/src/uuid.sym shlibs/uuid/src/gen_uuid_nt.c + +if BUILD_LIBUUID +usrlib_exec_LTLIBRARIES += shlibs/uuid/src/libuuid.la +check_PROGRAMS += shlibs/uuid/src/tst_uuid + +# move lib from $(usrlib_execdir) to $(libdir) if needed +install-exec-hook-libuuid: + if test "$(usrlib_execdir)" != "$(libdir)"; then \ + mkdir -p $(DESTDIR)$(libdir); \ + mv $(DESTDIR)$(usrlib_execdir)/libuuid.so.* $(DESTDIR)$(libdir); \ + so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libuuid.so); \ + so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ + (cd $(DESTDIR)$(usrlib_execdir) && \ + rm -f libuuid.so && \ + $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libuuid.so); \ + fi + +uninstall-hook-libuuid: + rm -f $(DESTDIR)$(libdir)/libuuid.so* + +INSTALL_EXEC_HOOKS += install-exec-hook-libuuid +UNINSTALL_HOOKS += uninstall-hook-libuuid + +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