svn commit: r345238 - head

Ian Lepore ian at freebsd.org
Sat Mar 16 22:37:20 UTC 2019


On Sat, 2019-03-16 at 20:02 +0000, 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 "------------------------------------------------------
> --------"
>  
>  NO_INSTALLEXTRAKERNELS?=	yes
>  
> 

Does this really report the buildkernel time, or the time from when
make starts until when the kernel portion of the make finishes?  Will
the result be right when you do "make buildworld buildkernel"?

-- Ian



More information about the svn-src-all mailing list