]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Create a relative symlink for .so if libdir and usrlibdir are the same
authorGuillem Jover <guillem@hadrons.org>
Fri, 29 May 2009 00:28:49 +0000 (02:28 +0200)
committerGuillem Jover <guillem@hadrons.org>
Fri, 29 May 2009 00:28:49 +0000 (02:28 +0200)
Makefile

index 53ab4f33d8fce5fca226a8be160aa98b20775582..fbe23c1df057fe4156403517303089649fc4b95c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -157,7 +157,13 @@ install: libs man
        done
        install -m644 $(LIB_MANS) $(DESTDIR)/$(mandir)/man3
        install -m644 $(LIB_PKGCONFIG) $(DESTDIR)/$(pkgconfigdir)
+ifeq ($(libdir),$(usrlibdir))
+       # If both dirs are the same, do a relative symlink.
+       ln -sf $(LIB_SHARED) $(DESTDIR)/$(usrlibdir)/$(LIB_SHARED_SO)
+else
+       # Otherwise, do an absolute one.
        ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)/$(usrlibdir)/$(LIB_SHARED_SO)
+endif
        ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
 
 .PHONY: clean