]> err.no Git - systemd/commitdiff
volume_id: create relative links
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 30 Jul 2008 13:50:12 +0000 (15:50 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 30 Jul 2008 13:50:12 +0000 (15:50 +0200)
extras/volume_id/lib/Makefile.am

index 592b390987040fa92ef55e6587f1910394e304cd..6313962e68bbb5171c2cfaf0603b5b4f735b4469 100644 (file)
@@ -55,8 +55,10 @@ install-data-hook:
        if test "$(prefix)" != "$(exec_prefix)"; then \
                mkdir -p $(DESTDIR)$(prefix)/$(libdir_name); \
                mv $(DESTDIR)$(rootlibdir)/libvolume_id.a $(DESTDIR)$(prefix)/$(libdir_name)/; \
+               so_img_name=$$(readlink $(DESTDIR)$(rootlibdir)/libvolume_id.so); \
                rm $(DESTDIR)$(rootlibdir)/libvolume_id.so; \
-               ln -sf $(rootlibdir)/libvolume_id.so.$(VOLID_LT_CURRENT).$(VOLID_LT_AGE).$(VOLID_LT_REVISION) \
+               so_img_rel_target_prefix=$$(echo $(prefix)/$(libdir_name) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
+               ln -sf  $$so_img_rel_target_prefix$(exec_prefix)/$(libdir_name)/$$so_img_name \
                        $(DESTDIR)$(prefix)/$(libdir_name)/libvolume_id.so; \
        fi