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.
This commit is contained in:
Gordon Tetlow 2003-08-17 07:42:50 +00:00
parent 3e25ce2310
commit 3d7f3b48c8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119009

View File

@ -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)