summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorgordon <gordon@FreeBSD.org>2003-08-17 07:42:50 +0000
committergordon <gordon@FreeBSD.org>2003-08-17 07:42:50 +0000
commitc455fd684d603189c03edb7cde0fdd7500927b75 (patch)
tree6e2056575cbbf769bd4361fd2618791f64c949b0 /share
parent7db6a715d6d16fc45da983ae9d2f40c08e8d44a5 (diff)
downloadFreeBSD-src-c455fd684d603189c03edb7cde0fdd7500927b75.zip
FreeBSD-src-c455fd684d603189c03edb7cde0fdd7500927b75.tar.gz
Handle the case where SHLIBDIR != LIBDIR. When creating links, we
need relative pathing to work correctly. This is s necessary step for putting libraries in /lib while the .so symlinks still live in /usr/lib. This should be a big NOOP in the case where SHLIBDIR == LIBDIR.
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.lib.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index f4d6437..19cbbe1 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -206,7 +206,12 @@ _libinstall:
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
.if defined(SHLIB_LINK)
- ln -fs ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIB_LINK}
+.if (${LIBDIR} == ${SHLIBDIR})
+ ln -fs ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
+.else
+ ln -fs ${LIBDIR:C|/[^/]+|/..|g:S|^/||}${SHLIBDIR}/${SHLIB_NAME} \
+ ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
+.endif
.endif
.endif
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
OpenPOWER on IntegriCloud