My previous commit exposed an issue as it fixed a different

issue. lib/atf isn't a prereq_lib, since it isn't required for other
libraries to build. Remove it. The old kludge of always building it
had effectively been retired. Since we don't want to build the
libraries with the tests when we're bootstrapping, invent
MK_TESTS_SUPPORT which normally defaults to the current MK_TESTS
value, except when explicitly defined. Make lib/atf depend on it being
yes. When building the libraries set MK_TESTS to no, and
MK_TESTS_SUPPORT to the current value of MK_TESTS so that later stages
of the build work correctly. This should fix (and does for me)
people's issues with parallel builds racing between lib/atf and
libexec/atf. Since lib/atf is built during the libraries phase, the
race disappears.
This commit is contained in:
Warner Losh 2014-10-22 03:39:11 +00:00
parent b1c5d8f7c3
commit b55e8e6e0d
3 changed files with 5 additions and 7 deletions

View File

@ -574,7 +574,7 @@ _libraries:
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; \
${WMAKE} -DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \
MK_PROFILE=no MK_TESTS=no libraries
MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS} libraries
_depend:
@echo
@echo "--------------------------------------------------------------"
@ -1535,7 +1535,6 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \
${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \
${_kerberos5_lib_libroken} \
${_kerberos5_lib_libwind} \
${_lib_atf} \
lib/libbz2 ${_libcom_err} lib/libcrypt \
lib/libelf lib/libexpat \
${_lib_libgssapi} \
@ -1561,10 +1560,6 @@ gnu/lib/libsupc++__L: gnu/lib/libstdc++__L
lib/libgeom__L: lib/libexpat__L
.if ${MK_TESTS} != "no"
_lib_atf= lib/atf
.endif
.if ${MK_LIBTHR} != "no"
_lib_libthr= lib/libthr
.endif

View File

@ -276,8 +276,10 @@ _libsmutil= libsmutil
_libtelnet= libtelnet
.endif
.if ${MK_TESTS} != "no"
.if ${MK_TESTS_SUPPORT} != "no"
_atf= atf
.endif
.if ${MK_TESTS} != "no"
_tests= tests
.endif

View File

@ -330,6 +330,7 @@ MK_CLANG_FULL:= no
KVM \
NETGRAPH \
PAM \
TESTS \
WIRELESS
.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
MK_${var}_SUPPORT:= no