Always install libpthread.* symlinks if at least one of

the threading libraries is built.  This simplifies the
logic in makefiles that need to check if the pthreads
support is present.  It also fixes a bug where we would
build a threading library that we shouldn't have built:
for example, building with WITHOUT_LIBTHR and the default
value of DEFAULT_THREADING_LIB (libthr) would mistakenly
build the libthr library, but not install it.

Approved by:	re (kensmith)
This commit is contained in:
Ruslan Ermilov 2007-10-01 18:22:32 +00:00
parent 0376869747
commit 152f2a4a96
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172403
7 changed files with 23 additions and 25 deletions

View file

@ -1027,12 +1027,20 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \
${_lib_libgssapi} ${_lib_libipx} \
lib/libkiconv lib/libkvm lib/libmd \
lib/ncurses/ncurses lib/ncurses/ncursesw \
lib/libopie lib/libpam lib/${DEFAULT_THREAD_LIB} \
lib/libopie lib/libpam ${_default_thread_lib} \
lib/libradius lib/libsbuf lib/libtacplus lib/libutil \
${_lib_libypclnt} lib/libz lib/msun \
${_secure_lib_libcrypto} ${_secure_lib_libssh} \
${_secure_lib_libssl}
.if ${MK_LIBTHR} != "no" && ${MK_LIBPTHREAD} != "no"
_default_thread_lib= lib/${DEFAULT_THREAD_LIB}
.elif ${MK_LIBTHR} != "no"
_default_thread_lib= lib/libthr
.elif ${MK_LIBPTHREAD} != "no"
_default_thread_lib= lib/libpthread
.endif
_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib
lib/libopie__L lib/libtacplus__L: lib/libmd__L

View file

@ -10,7 +10,8 @@
.include <bsd.own.mk>
.if ${DEFAULT_THREAD_LIB} == "libpthread" && ${SHLIBDIR} == "/usr/lib"
.if (${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no") && \
${SHLIBDIR} == "/usr/lib"
SHLIBDIR= /lib
.endif
@ -46,7 +47,7 @@ PRECIOUSLIB=
.include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/thread/Makefile.inc"
.if ${DEFAULT_THREAD_LIB} == "libpthread"
.if ${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no"
SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
.if !defined(NO_PIC)
SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so

View file

@ -10,7 +10,8 @@
.include <bsd.own.mk>
.if ${DEFAULT_THREAD_LIB} == "libpthread" && ${SHLIBDIR} == "/usr/lib"
.if (${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no") && \
${SHLIBDIR} == "/usr/lib"
SHLIBDIR= /lib
.endif
@ -46,7 +47,7 @@ PRECIOUSLIB=
.include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/thread/Makefile.inc"
.if ${DEFAULT_THREAD_LIB} == "libpthread"
.if ${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no"
SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
.if !defined(NO_PIC)
SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so

View file

@ -6,8 +6,7 @@ SUBDIR= ${_ggatec} \
${_ggated} \
ggatel
.if ${MK_LIBTHR} != "no" || \
(${MACHINE_ARCH} != "sparc64" && ${MK_LIBPTHREAD} != "no")
.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no"
_ggatec= ggatec
_ggated= ggated
.endif

View file

@ -260,8 +260,7 @@ _calendar= calendar
.if ${MK_OPENSSL} != "no"
_chkey= chkey
_newkey= newkey
.if ${MK_LIBTHR} != "no" || \
(${MACHINE_ARCH} != "sparc64" && ${MK_LIBPTHREAD} != "no")
.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no"
_csup= csup
.endif
.endif

View file

@ -268,13 +268,16 @@ _ypset= ypset
_authpf= authpf
.endif
.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no"
_pppctl= pppctl
.endif
.if ${MK_LPR} != "no"
_lpr= lpr
.endif
.if ${MK_NS_CACHING} != "no"
.if ${MK_LIBTHR} != "no" || \
(${MACHINE_ARCH} != "sparc64" && ${MK_LIBPTHREAD} != "no")
.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no"
_nscd= nscd
.endif
.endif
@ -313,9 +316,6 @@ _mount_smbfs= mount_smbfs
_mptable= mptable
_ndiscvt= ndiscvt
_pnpinfo= pnpinfo
.if ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no"
_pppctl= pppctl
.endif
_sicontrol= sicontrol
_spkrtest= spkrtest
_zzz= zzz
@ -349,9 +349,6 @@ _mount_nwfs= mount_nwfs
_mount_smbfs= mount_smbfs
_mptable= mptable
_ndiscvt= ndiscvt
.if ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no"
_pppctl= pppctl
.endif
_sicontrol= sicontrol
_spkrtest= spkrtest
_zzz= zzz
@ -363,9 +360,6 @@ _acpi= acpi
.endif
_kgmon= kgmon
_mount_smbfs= mount_smbfs
.if ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no"
_pppctl= pppctl
.endif
_zzz= zzz
.endif
@ -377,9 +371,6 @@ _nvram= nvram
.if ${MACHINE_ARCH} == "sparc64"
_eeprom= eeprom
_ofwdump= ofwdump
.if ${MK_LIBTHR} != "no"
_pppctl= pppctl
.endif
.endif
.include <bsd.subdir.mk>

View file

@ -13,8 +13,7 @@ WARNS?= 3
NGCTL_NO_LIBEDIT=
.endif
.if ${MK_LIBTHR} == "no" && \
(${MACHINE_ARCH} == "sparc64" || ${MK_LIBPTHREAD} == "no")
.if ${MK_LIBTHR} == "no" && ${MK_LIBPTHREAD} == "no"
NGCTL_NO_LIBEDIT=
.endif