svn commit: r345054 - head

Wolfram Schneider wosch at FreeBSD.org
Tue Mar 12 07:40:39 UTC 2019


Author: wosch
Date: Tue Mar 12 07:40:38 2019
New Revision: 345054
URL: https://svnweb.freebsd.org/changeset/base/345054

Log:
  `make buildworld' should display the build time in seconds
  
  PR:		224433
  Reviewed by:	emaste, @bdrewery
  Approved by:	cem
  Differential Revision: https://reviews.freebsd.org/D13911

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Tue Mar 12 06:01:43 2019	(r345053)
+++ head/Makefile.inc1	Tue Mar 12 07:40:38 2019	(r345054)
@@ -1143,6 +1143,12 @@ WMAKE_TGTS+=	everything
 WMAKE_TGTS+=	build${libcompat}
 .endif
 
+# record buildworld time in seconds
+.if make(buildworld)
+_BUILDWORLD_START!= date '+%s'
+.export _BUILDWORLD_START
+.endif
+
 buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY
 .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
 
@@ -1155,6 +1161,9 @@ buildworld_epilogue: .PHONY
 	@echo
 	@echo "--------------------------------------------------------------"
 	@echo ">>> World build completed on `LC_ALL=C date`"
+	@seconds=$$(($$(date '+%s') - ${_BUILDWORLD_START})); \
+	  echo -n ">>> World build in $$seconds seconds, "; \
+	  echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make -j/}"
 	@echo "--------------------------------------------------------------"
 
 #


More information about the svn-src-head mailing list