Page MenuHomeFreeBSD

Introduce MODULES_EXCLUDE
ClosedPublic

Authored by manu on Dec 14 2021, 5:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 20, 10:44 AM
Unknown Object (File)
Sep 24 2024, 8:53 AM
Unknown Object (File)
Sep 22 2024, 3:43 AM
Unknown Object (File)
Sep 17 2024, 1:13 PM
Unknown Object (File)
Sep 7 2024, 8:46 AM
Unknown Object (File)
Sep 5 2024, 2:26 PM
Unknown Object (File)
Aug 19 2024, 2:02 AM
Unknown Object (File)
Aug 13 2024, 1:42 PM

Details

Reviewers
emaste
Group Reviewers
manpages
Commits
rG8c0c5bdf9d5e: Introduce MODULES_EXCLUDE
Summary

It's sometimes easier to exclude some modules rather than listing all
possibly needed ones with MODULES_OVERRIDE.
So for this add MODULES_EXCLUDE which do exactly as one would guess, excludes
some modules from the build/install.

For example if one wants to exclude all modules which are only present in the
GENERIC config on amd64 :
export MODULES_EXCLUDE=$(grep -E '^device' sys/amd64/conf/GENERIC | awk '{print $2}' | tr '\n' ' ')

MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43347
Build 40235: arc lint + arc unit

Event Timeline

manu requested review of this revision.Dec 14 2021, 5:08 PM
pauamma_gundo.com added inline comments.
share/man/man5/make.conf.5
275–277

What happens if both MODULES_EXCLUDE and MODULES_OVERRIDE are present?

Love the idea

share/mk/bsd.kmod.mk
6

Don't you need at least a 'clean' target too? What about 'depend'?

share/man/man5/make.conf.5
275–277

I'll test but pretty sure that MODULES_EXCLUDE takes precedence (and I think should).
But I'll update the manpage with more info once I've tested

share/mk/bsd.kmod.mk
6

That's all the targets I needed but only test make buildkernel with and without WITHOUT_CLEAN=y

Given https://reviews.freebsd.org/D33443#inline-206871, and if erroring out or a "both present, ignoring MODULES_OVERRIDE" warning if both are present is an option, I think that would provide better UX. But either way, documenting the behavior as well is good..

share/man/man5/make.conf.5
275–277

I meant to say that MODULES_OVERRIDE takes precedence and this is the case.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 13 2022, 2:17 PM
This revision was automatically updated to reflect the committed changes.