summaryrefslogtreecommitdiffstats
path: root/shlibs/uuid/src/Makefile.am
diff options
context:
space:
mode:
authorKay Sievers2009-07-03 23:18:36 +0200
committerKarel Zak2009-07-04 00:16:10 +0200
commit999f44307005466f9507c01fb2a707042b242287 (patch)
tree1c2790a50107a213000b0b4ed4308c16a3b36dcd /shlibs/uuid/src/Makefile.am
parentbuild-sys: release++ (v2.16-rc2) (diff)
downloadkernel-qcow2-util-linux-999f44307005466f9507c01fb2a707042b242287.tar.gz
kernel-qcow2-util-linux-999f44307005466f9507c01fb2a707042b242287.tar.xz
kernel-qcow2-util-linux-999f44307005466f9507c01fb2a707042b242287.zip
build-sys: reverse shlibs installation
[kzak@redhat.com: Unfortunately, libtool does not provide a way how to install real libraries to /lib and devel libs (symlinks) to /usr/lib. We have to use install hooks to move these files. Currently we install to /lib and move devel files to /usr/lib. This concept is wrong, because the libdir= in .la libtool files must to match with the place where we install the devel .so libs. It means we have to install everything to /usr/lib and then move (by install hook) the real .so libs to /lib. This change is necessary to fix "make install", otherwise the install process will not work in clean change root. ] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/uuid/src/Makefile.am')
-rw-r--r--shlibs/uuid/src/Makefile.am18
1 files changed, 7 insertions, 11 deletions
diff --git a/shlibs/uuid/src/Makefile.am b/shlibs/uuid/src/Makefile.am
index fff115263..ddb55921c 100644
--- a/shlibs/uuid/src/Makefile.am
+++ b/shlibs/uuid/src/Makefile.am
@@ -10,7 +10,7 @@ tst_uuid_CFLAGS = -I$(ul_libuuid_srcdir)
uuidincdir = $(includedir)/uuid
uuidinc_HEADERS = uuid.h
-lib_LTLIBRARIES = libuuid.la
+usrlibexec_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)
@@ -30,20 +30,16 @@ test_%: %.c
$(COMPILE) -DTEST_PROGRAM $< .libs/libuuid.a -o $@
-# move devel files from $(libdir) to $(usrlibexecdir) if needed
+# move lib from $(usrlibexecdir) to $(libdir) if needed
install-data-hook:
- rm $(DESTDIR)$(libdir)/$(lib_LTLIBRARIES)
if test "$(usrlibexecdir)" != "$(libdir)"; then \
- mkdir -p $(DESTDIR)$(usrlibexecdir); \
- mv $(DESTDIR)$(libdir)/libuuid.a $(DESTDIR)$(usrlibexecdir)/; \
- so_img_name=$$(readlink $(DESTDIR)$(libdir)/libuuid.so); \
- rm $(DESTDIR)$(libdir)/libuuid.so; \
+ mkdir -p $(DESTDIR)$(libdir); \
+ mv $(DESTDIR)$(usrlibexecdir)/libuuid.so.* $(DESTDIR)$(libdir); \
+ so_img_name=$$(readlink $(DESTDIR)$(usrlibexecdir)/libuuid.so); \
so_img_rel_target=$$(echo $(usrlibexecdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
- ln -sf $$so_img_rel_target$(libdir)/$$so_img_name \
- $(DESTDIR)$(usrlibexecdir)/libuuid.so; \
+ ln -sf $$so_img_rel_target$(libdir)/$$so_img_name $(DESTDIR)$(usrlibexecdir)/libuuid.so; \
fi
uninstall-hook:
- rm -f $(DESTDIR)$(usrlibexecdir)/libuuid.a
- rm -f $(DESTDIR)$(usrlibexecdir)/libuuid.so*
+ rm -f $(DESTDIR)$(libdir)/libuuid.so*