svn commit: r257848 - in head: . share/mk

Julio Merino jmmv at FreeBSD.org
Fri Nov 8 14:20:23 UTC 2013


Author: jmmv
Date: Fri Nov  8 14:20:22 2013
New Revision: 257848
URL: http://svnweb.freebsd.org/changeset/base/257848

Log:
  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)

Modified:
  head/Makefile.inc1
  head/share/mk/bsd.own.mk

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Fri Nov  8 13:23:26 2013	(r257847)
+++ head/Makefile.inc1	Fri Nov  8 14:20:22 2013	(r257848)
@@ -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/}

Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk	Fri Nov  8 13:23:26 2013	(r257847)
+++ head/share/mk/bsd.own.mk	Fri Nov  8 14:20:22 2013	(r257848)
@@ -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.
 #


More information about the svn-src-head mailing list