Page MenuHomeFreeBSD

Introduce MODULES_EXCLUDE
ClosedPublic

Authored by manu on Dec 14 2021, 5:08 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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

manu requested review of this revision.Dec 14 2021, 5:08 PM
pauamma added inline comments.
share/man/man5/make.conf.5
274–276

What happens if both MODULES_EXCLUDE and MODULES_OVERRIDE are present?

Love the idea

share/mk/bsd.kmod.mk
5

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

share/man/man5/make.conf.5
274–276

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
5

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
274–276

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.