Page MenuHomeFreeBSD

src/Makefile: write time logging to stderr instead of stdout
Needs ReviewPublic

Authored by wosch on Jul 2 2025, 1:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 20, 11:45 AM
Unknown Object (File)
Tue, Jul 7, 3:50 PM
Unknown Object (File)
Sun, Jul 5, 7:35 AM
Unknown Object (File)
Jun 22 2026, 3:08 AM
Unknown Object (File)
Jun 11 2026, 9:07 PM
Unknown Object (File)
May 21 2026, 1:04 AM
Unknown Object (File)
May 20 2026, 12:09 PM
Unknown Object (File)
May 20 2026, 10:44 AM
Subscribers
None

Details

Reviewers
brooks
markj
Group Reviewers
srcmgr
Summary

Write time logging to stderr instead of stdout. This solves a problem that some users parse the output of make, as make makeman'. This is in line with the usual usage of time(1) command time make .... ' which displays the time to stderr.

/usr/bin/time make showconfig | wc

   0.98 real         0.60 user         0.41 sys
244     741    5848

PR: 287274

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

wosch requested review of this revision.Jul 2 2025, 1:46 PM
wosch created this revision.
wosch added reviewers: brooks, markj.
wosch added a reviewer: srcmgr.

I don't think this is really right. Some top-level make targets are designed to be consumed by other programs, especially the ones I listed in D51119. It simply doesn't make sense to print the time for those targets on every invocation.

I have concerns about the implementation:

  • I'm not sure we can count on /usr/bin/time existing on non-FreeBSD systems. At a minimum time_cmd should be overridable, but should really be optional
  • -o is non-portable so this probably breaks cross builds
  • I'm not thrilled about leaking tmp files every time the user interrupts a build