Page MenuHomeFreeBSD

Add jobs.mk to allow for target-jobs
ClosedPublic

Authored by sjg on Apr 19 2023, 4:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 10, 5:33 AM
Unknown Object (File)
Mon, Jun 10, 5:33 AM
Unknown Object (File)
Mon, Jun 10, 5:33 AM
Unknown Object (File)
May 9 2024, 2:25 AM
Unknown Object (File)
May 8 2024, 2:15 PM
Unknown Object (File)
May 1 2024, 4:38 PM
Unknown Object (File)
Apr 29 2024, 3:27 AM
Unknown Object (File)
Apr 23 2024, 4:04 AM

Details

Summary

jobs.mk automates -j$JOB_MAX and capturing build log based on target.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sjg requested review of this revision.Apr 19 2023, 4:08 AM
Makefile
122

This seems out of place relative to the above comment. Maybe move it to before this comment and add a comment saying what the heck is going on.

share/mk/jobs.mk
34

is that 'normal' done inside of make(1) or a user's build env?

37

how does this even work? There's no date command...

Makefile
122

I took the preceding comment as general info for the whole makefile?
I can certainly add a comment, but moving up above that big comment didn't seem appropriate . I could move it later, but you sort of want to do this include early to avoid wasting effort.

share/mk/jobs.mk
34

You could do it either way - we do it in env, but you could just as easily put something in local.sys.mk or any other makefile via sys.mk

FYI in the past when we had shared build machines the logic to set JOB_MAX took into account how many builds were already running on a machine.

37

:gmtime is a bmake modifier, the above is equivalent to doing strftime %s

Add comment to src/Makefile

OK. I'm a little nervous about -j 8 being the default. Isn't there some way that the default could be derived from hw.ncpu?

And cool about the gmtime... I learned a thing.

This revision is now accepted and ready to land.Apr 19 2023, 10:42 PM
In D39683#903570, @imp wrote:

OK. I'm a little nervous about -j 8 being the default. Isn't there some way that the default could be derived from hw.ncpu?

And cool about the gmtime... I learned a thing.

I can add something to local.sys.env.mk or similar to do that

Provide JOB_MAX default derrived from ncpu

This revision now requires review to proceed.Apr 20 2023, 12:22 AM

Use JOB_MAX_FACTOR 1.33 and add UPDATING entry

This revision is now accepted and ready to land.Apr 20 2023, 4:39 PM
This revision was automatically updated to reflect the committed changes.