bsd.lib.mk: Fix SHLIB_LINK handling.
authorzrj <rimvydas.jasinskas@gmail.com>
Mon, 15 Apr 2019 17:37:14 +0000 (20:37 +0300)
committerzrj <zrj@dragonflybsd.org>
Mon, 15 Apr 2019 17:48:20 +0000 (20:48 +0300)
Checks should be for TARGETs. Also .so should be created in LIBDIR version.

No functional change intended on master.

share/mk/bsd.lib.mk

index 3e74cc2..a21f0b0 100644 (file)
@@ -245,8 +245,8 @@ _libinstall:
            ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
            ${SHLIB_NAME} ${DESTDIR}${TARGET_SHLIBDIR}
 .if defined(SHLIB_LINK)
-.if ${SHLIBDIR} == ${LIBDIR}
-       ${LN} -fs ${SHLIB_NAME} ${DESTDIR}${TARGET_SHLIBDIR}/${SHLIB_LINK}
+.if ${TARGET_SHLIBDIR} == ${TARGET_LIBDIR}
+       ${LN} -fs ${SHLIB_NAME} ${DESTDIR}${TARGET_LIBDIR}/${SHLIB_LINK}
 .else
        ${LN} -fs ${_SHLIBDIRPREFIX}${TARGET_SHLIBDIR}/${SHLIB_NAME} \
            ${DESTDIR}${TARGET_LIBDIR}/${SHLIB_LINK}