Fix buildworld when WITH_TESTS is enabled.

The addition of the TESTS knob and its enabling of the build of tests in
lib/libcrypt/tests/ broke the build.  The reason is that we cannot descend
into tests/ subdirectories until all prerequisites have been built, which
in the case of tests may be "a lot of things" (libatf-c in this case).

Ensure that we do not walk tests/ directories during the bootstrapping of
the libraries as part of buildworld.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
This commit is contained in:
Julio Merino 2013-11-08 14:20:22 +00:00
parent 3fea9c0d26
commit 57028ca47f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257848
2 changed files with 30 additions and 12 deletions

View File

@ -1602,10 +1602,12 @@ ${_lib}__PL: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
cd ${.CURDIR}/${_lib} && \
${MAKE} DIRPRFX=${_lib}/ obj && \
${MAKE} DIRPRFX=${_lib}/ depend && \
${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all && \
${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install
${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ obj && \
${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ depend && \
${MAKE} -DNO_TESTS -DNO_PROFILE -DNO_PIC \
DIRPRFX=${_lib}/ all && \
${MAKE} -DNO_TESTS -DNO_PROFILE -DNO_PIC \
DIRPRFX=${_lib}/ install
.endif
.endfor
@ -1614,10 +1616,10 @@ ${_lib}__L: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib})
${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
cd ${.CURDIR}/${_lib} && \
${MAKE} DIRPRFX=${_lib}/ obj && \
${MAKE} DIRPRFX=${_lib}/ depend && \
${MAKE} DIRPRFX=${_lib}/ all && \
${MAKE} DIRPRFX=${_lib}/ install
${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ obj && \
${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ depend && \
${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ all && \
${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ install
.endif
.endfor
@ -1627,10 +1629,12 @@ ${_lib}__L: .PHONY .MAKE
lib/libpam__L: .PHONY .MAKE
${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
cd ${.CURDIR}/lib/libpam && \
${MAKE} DIRPRFX=lib/libpam/ obj && \
${MAKE} DIRPRFX=lib/libpam/ depend && \
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all && \
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ obj && \
${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ depend && \
${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ \
-D_NO_LIBPAM_SO_YET all && \
${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ \
-D_NO_LIBPAM_SO_YET install
_prereq_libs: ${_prereq_libs:S/$/__PL/}
_startup_libs: ${_startup_libs:S/$/__L/}

View File

@ -556,6 +556,20 @@ MK_CLANG_FULL:= no
MK_LLDB:= no
.endif
.if defined(NO_TESTS)
# This should be handled above along the handling of all other NO_* options.
# However, the above is broken when WITH_*=yes are passed to make(1) as
# command line arguments. See PR bin/183762.
#
# Because the TESTS option is new and it will default to yes, it's likely
# that people will pass WITHOUT_TESTS=yes to make(1) directly and get a broken
# build. So, just in case, it's better to explicitly handle this case here.
#
# TODO(jmmv): Either fix make to allow us putting this override where it
# belongs above or fix this file to cope with the make bug.
MK_TESTS:= no
.endif
#
# Set defaults for the MK_*_SUPPORT variables.
#