summaryrefslogtreecommitdiffstats
path: root/shlibs/uuid/src/Makefile.am
diff options
context:
space:
mode:
authorKarel Zak2009-07-04 01:10:15 +0200
committerKarel Zak2009-07-04 01:10:15 +0200
commit15fe69251862d880c6103d9c1646ccae7201dd60 (patch)
tree33e6c1281e429ad617ea9a3bc6099a87364fbdb5 /shlibs/uuid/src/Makefile.am
parentbuild-sys: fix exec/data install hooks (diff)
downloadkernel-qcow2-util-linux-15fe69251862d880c6103d9c1646ccae7201dd60.tar.gz
kernel-qcow2-util-linux-15fe69251862d880c6103d9c1646ccae7201dd60.tar.xz
kernel-qcow2-util-linux-15fe69251862d880c6103d9c1646ccae7201dd60.zip
build-sys: improve symlinks creation in shlibs/
It's more safe to create symlinks in the target directory and use $(LN_S) rather than directly call "ln -sf". Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/uuid/src/Makefile.am')
-rw-r--r--shlibs/uuid/src/Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/shlibs/uuid/src/Makefile.am b/shlibs/uuid/src/Makefile.am
index 264e6adc8..81aa18650 100644
--- a/shlibs/uuid/src/Makefile.am
+++ b/shlibs/uuid/src/Makefile.am
@@ -37,7 +37,9 @@ install-exec-hook:
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; \
+ (cd $(DESTDIR)$(usrlibexecdir) && \
+ rm -f libuuid.so && \
+ $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libuuid.so); \
fi
uninstall-hook: