Page MenuHomeFreeBSD

Introduce MODULES_EXCLUDE
ClosedPublic

Authored by manu on Dec 14 2021, 5:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 8, 9:58 PM
Unknown Object (File)
Fri, Apr 26, 3:28 PM
Unknown Object (File)
Fri, Apr 26, 3:28 PM
Unknown Object (File)
Fri, Apr 26, 3:28 PM
Unknown Object (File)
Fri, Apr 26, 10:07 AM
Unknown Object (File)
Mar 18 2024, 5:10 PM
Unknown Object (File)
Dec 22 2023, 10:48 PM
Unknown Object (File)
Dec 12 2023, 12:55 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.