From owner-freebsd-current@FreeBSD.ORG Thu Feb 10 15:06:16 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8797106564A; Thu, 10 Feb 2011 15:06:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 606008FC18; Thu, 10 Feb 2011 15:06:16 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E610946B1A; Thu, 10 Feb 2011 10:06:15 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.10]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1EB1F8A009; Thu, 10 Feb 2011 10:06:11 -0500 (EST) From: John Baldwin To: "Bjoern A. Zeeb" Date: Thu, 10 Feb 2011 10:06:10 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201102100813.13803.jhb@freebsd.org> <20110210131731.P80258@maildrop.int.zabbadoz.net> In-Reply-To: <20110210131731.P80258@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102101006.10579.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 10 Feb 2011 10:06:11 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.5 required=4.2 tests=BAYES_00,MAY_BE_FORGED, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Alexander Kabaev , FreeBSD current mailing list Subject: Re: [PATCH] Add a 'make toolchains' target X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2011 15:06:16 -0000 On Thursday, February 10, 2011 8:22:00 am Bjoern A. Zeeb wrote: > On Thu, 10 Feb 2011, John Baldwin wrote: > > > This patch adds a 'make toolchains' target that invokes 'make toolchain' for > > each target. The use case I want it for is a cheaper way to just test kernels > > via make tinderbox so I can do: > > > > make toolchains > > make MAKE_JUST_KERNELS=yes tinderbox > > > > It is implemented by adding a new frob to tweak the target that make universe > > builds for the world stage of universe (UNIVERSE_TARGET). If that frob is > > set, then the kernel build step for a universe is skipped. With this, the > > toolchains target is a simple wrapper for: > > > > make UNIVERSE_TARGET=toolchains universe > > > > Index: Makefile > > =================================================================== > > --- Makefile (revision 218481) > > +++ Makefile (working copy) > > @@ -30,6 +30,7 @@ > > # delete-old-libs - Delete obsolete libraries. > > # targets - Print a list of supported TARGET/TARGET_ARCH pairs > > # for world and kernel targets. > > +# toolchains - Build a toolchain for all world and kernel targets. > > Should also go to build(7). Patch for this. It documents the previously undocumented variables for 'make universe' and also describes UNIVERSE_TARGET: Index: build.7 =================================================================== --- build.7 (revision 218481) +++ build.7 (working copy) @@ -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 @@ -240,6 +241,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 @@ -508,6 +511,29 @@ If set, restricts the documentation build to the l 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 -- John Baldwin