Date: Mon, 18 Mar 2019 09:35:27 -0700 From: John Baldwin <jhb@FreeBSD.org> To: Wolfram Schneider <wosch@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345238 - head Message-ID: <87798c27-8546-2c3b-0f23-83beca25ee7e@FreeBSD.org> In-Reply-To: <201903162002.x2GK2vmA013275@repo.freebsd.org> References: <201903162002.x2GK2vmA013275@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3/16/19 1:02 PM, Wolfram Schneider wrote: > Author: wosch > Date: Sat Mar 16 20:02:57 2019 > New Revision: 345238 > URL: https://svnweb.freebsd.org/changeset/base/345238 > > Log: > `make buildkernel' should display the build time in seconds > > PR: 224433 > Approved by: cem > Differential Revision: https://reviews.freebsd.org/D13910 > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Sat Mar 16 17:55:22 2019 (r345237) > +++ head/Makefile.inc1 Sat Mar 16 20:02:57 2019 (r345238) > @@ -1584,6 +1584,11 @@ _cleankernobj_fast_depend_hack: .PHONY > > ${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY > > +# record kernel(s) build time in seconds > +.if make(buildkernel) > +_BUILDKERNEL_START!= date '+%s' > +.endif > + > # > # buildkernel > # > @@ -1640,7 +1645,12 @@ buildkernel: .MAKE .PHONY > @echo "--------------------------------------------------------------" > @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" > @echo "--------------------------------------------------------------" > + > .endfor > + @seconds=$$(($$(date '+%s') - ${_BUILDKERNEL_START})); \ > + echo -n ">>> Kernel(s) build for${BUILDKERNELS} in $$seconds seconds, "; \ > + echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make -j/}" > + @echo "--------------------------------------------------------------" Both this and the previous message for buildworld should use 'built' instead of 'build' so that the message is something like "World built in 47 seconds" rather than "World build in 47 seconds". This sentence is also somewhat odd: "Kernel(s) build for FOO BAR BAZ in 47 seconds" Even with 'built' fixed, I feel like it should be more like: "FOO BAR BAZ kernel(s) built in 47 seconds" by moving ${BUILDKERNELS} to the start of the message? -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87798c27-8546-2c3b-0f23-83beca25ee7e>