`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
This commit is contained in:
Wolfram Schneider 2019-03-12 07:40:38 +00:00
parent ed651a7496
commit 328dcc68a6

View File

@ -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 "--------------------------------------------------------------"
#