From owner-svn-src-all@FreeBSD.ORG Thu Mar 3 18:52:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E36F1065670; Thu, 3 Mar 2011 18:52:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BEBB8FC13; Thu, 3 Mar 2011 18:52:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p23IqDHt062611; Thu, 3 Mar 2011 18:52:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p23IqCUo062608; Thu, 3 Mar 2011 18:52:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201103031852.p23IqCUo062608@svn.freebsd.org> From: John Baldwin Date: Thu, 3 Mar 2011 18:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219245 - in stable/8: . share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2011 18:52:13 -0000 Author: jhb Date: Thu Mar 3 18:52:11 2011 New Revision: 219245 URL: http://svn.freebsd.org/changeset/base/219245 Log: MFC 216487,217754,218524: - Pass JFLAG as JFLAG from tinderbox to universe. - For `make tinderbox` there is no need to print the extra commands. - Add a new UNIVERSE_TARGET variable for 'make universe'. If it is set, then that target is invoked for each architecture rather than the default action of building world and kernels for each architecture. - Add a 'make toolchains' wrapper which uses UNIVERSE_TARGET to build toolchains for all architectures. - Document JFLAG, MAKE_JUST_KERNELS, and MAKE_JUST_WORLDS variables for 'make universe'. Modified: stable/8/Makefile (contents, props changed) stable/8/share/man/man7/build.7 Directory Properties: stable/8/share/man/man7/ (props changed) Modified: stable/8/Makefile ============================================================================== --- stable/8/Makefile Thu Mar 3 18:49:46 2011 (r219244) +++ stable/8/Makefile Thu Mar 3 18:52:11 2011 (r219245) @@ -25,6 +25,7 @@ # delete-old-dirs - Delete obsolete directories. # delete-old-files - Delete obsolete files. # delete-old-libs - Delete obsolete libraries. +# toolchains - Build a toolchain for all world and kernel targets. # # This makefile is simple by design. The FreeBSD make automatically reads # the /usr/share/mk/sys.mk unless the -m argument is specified on the @@ -268,8 +269,10 @@ make: .PHONY ${MMAKE} install DESTDIR=${MAKEPATH} BINDIR= tinderbox: - cd ${.CURDIR} && \ - DOING_TINDERBOX=YES ${MAKE} ${JFLAG} universe + @cd ${.CURDIR} && ${MAKE} DOING_TINDERBOX=YES universe + +toolchains: + @cd ${.CURDIR} && ${MAKE} UNIVERSE_TARGET=toolchain universe # # universe @@ -281,6 +284,12 @@ tinderbox: .if make(universe) || make(universe_kernels) || make(tinderbox) TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v +.if defined(UNIVERSE_TARGET) +MAKE_JUST_WORLDS= YES +.else +UNIVERSE_TARGET?= buildworld +.endif + .if defined(DOING_TINDERBOX) FAILFILE=tinderbox.failed MAKEFAIL=tee -a ${FAILFILE} @@ -294,21 +303,22 @@ universe_prologue: @echo ">>> make universe started on ${STARTTIME}" @echo "--------------------------------------------------------------" .if defined(DOING_TINDERBOX) - rm -f ${FAILFILE} + @rm -f ${FAILFILE} .endif .for target in ${TARGETS} universe: universe_${target} .ORDER: universe_prologue universe_${target} universe_epilogue universe_${target}: -.if !defined(MAKE_JUST_KERNELS) @echo ">> ${target} started on `LC_ALL=C date`" +.if !defined(MAKE_JUST_KERNELS) + @echo ">> ${target} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} buildworld \ + ${MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ TARGET=${target} \ - > _.${target}.buildworld 2>&1 || \ - (echo "${target} world failed," \ - "check _.${target}.buildworld for details" | ${MAKEFAIL})) - @echo ">> ${target} buildworld completed on `LC_ALL=C date`" + > _.${target}.${UNIVERSE_TARGET} 2>&1 || \ + (echo "${target} ${UNIVERSE_TARGET} failed," \ + "check _.${target}.${UNIVERSE_TARGET} for details" | ${MAKEFAIL})) + @echo ">> ${target} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`" .endif .if !defined(MAKE_JUST_WORLDS) .if exists(${.CURDIR}/sys/${target}/conf/NOTES) Modified: stable/8/share/man/man7/build.7 ============================================================================== --- stable/8/share/man/man7/build.7 Thu Mar 3 18:49:46 2011 (r219244) +++ stable/8/share/man/man7/build.7 Thu Mar 3 18:52:11 2011 (r219245) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 22, 2011 +.Dd February 10, 2011 .Dt BUILD 7 .Os .Sh NAME @@ -218,13 +218,14 @@ on how to make it start at boot time. Create the build toolchain needed to build the rest of the system. For cross-architecture builds, this step creates a cross-toolchain. .It Cm universe -Execute a +For each architecture, +execute a .Cm buildworld -and +followed by a .Cm buildkernel -for all kernels including -.Pa LINT , -for each architecture supported by the build system. +for all kernels for that architecture, +including +.Pa LINT . This command takes a long time. .It Cm update Get updated sources as configured in @@ -234,6 +235,8 @@ Execute the same targets as .Cm universe . In addition print a summary of all failed targets at the end and exit with an error if there were any. +.It Cm toolchains +Create a build toolchain for each architecture supported by the build system. .El .Pp Kernel specific build targets in @@ -493,6 +496,29 @@ If set, restricts the documentation buil specified as its content. The default action is to build documentation for all languages. .El +.Pp +Builds using the +.Cm universe +target are influenced by the following +.Xr make 1 +variables: +.Bl -tag -width ".Va MAKE_JUST_KERNELS" +.It Va JFLAG +Pass the value of this variable to each +.Xr make 1 +invocation used to build worlds and kernels. +This can be used to enable multiple jobs within a single architecture's build +while still building each architecture serially. +.It Va MAKE_JUST_KERNELS +Only build kernels for each supported architecture. +.It Va MAKE_JUST_WORLDS +Only build worlds for each supported architecture. +.It Va UNIVERSE_TARGET +Execute the specified +.Xr make 1 +target for each supported architecture instead of the default action of +building a world and one or more kernels. +.El .Sh FILES .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact .It Pa /usr/doc/Makefile