Page MenuHomeFreeBSD

`make buildkernel' should display the build time in seconds
ClosedPublic

Authored by wosch on Jan 14 2018, 8:06 PM.

Details

Summary

As described in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224433

the top level `make buildkernel' target should display the build time in seconds

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

wosch created this revision.Jan 14 2018, 8:06 PM
cem added a comment.Jan 14 2018, 8:37 PM

Thanks. Please re-upload with context. You can either use arc diff --create or simply generate a patch with huge amounts of context ([git] diff -U999999).

wosch updated this revision to Diff 38481.Jan 26 2018, 12:02 PM

I updated the patch to cleanup the time temp file after build.

See also D13911. I like @bdrewery's suggestion that avoids needing a temp file.

See also D13911. I like @bdrewery's suggestion that avoids needing a temp file.

I would love to get rid of the the temp file. However, it is not easy as it sounds.

The timestamp needs to be stored in a global Makefile variable, and changed when the targets actually runs, not when we start the make command. The variable needs to be changed from a sub-shell, and later read by a another sub-shell. The whole point of a subshell is that it doesn't affect the calling session.

A temp file in this case is the simple solution.

wosch updated this revision to Diff 54899.Mar 10 2019, 7:13 PM

The updated patch works without a temp file.

Note: there is a small semantic change. We display the time in seconds for all kernels build, not per kernel. For most users this is a non-issue, because they usually build only one kernel at a time.

cem accepted this revision.Mar 16 2019, 5:43 PM

Thanks, LGTM

This revision is now accepted and ready to land.Mar 16 2019, 5:43 PM
This revision was automatically updated to reflect the committed changes.