diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2021-11-06 09:11:58 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2022-01-13 14:16:34 +0000 |
commit | 8c0c5bdf9d5ebe08bb239633c16a567eb8a9f898 (patch) | |
tree | b4cbe8c1ac059d092f23177400bbdc24495fec95 | |
parent | d106f982a54cd299671ccad58bc456138a22ae7b (diff) | |
download | src-8c0c5bdf9d5ebe08bb239633c16a567eb8a9f898.tar.gz src-8c0c5bdf9d5ebe08bb239633c16a567eb8a9f898.zip |
Introduce MODULES_EXCLUDE
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
Differential Revision: https://reviews.freebsd.org/D33443
-rw-r--r-- | share/man/man5/make.conf.5 | 5 | ||||
-rw-r--r-- | share/mk/bsd.kmod.mk | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index b3623b29a950..fd0837ecc121 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2021 +.Dd January 13, 2021 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -272,6 +272,9 @@ It defaults to .It Va MODULES_OVERRIDE .Pq Vt str Set to a list of modules to build instead of all of them. +.It Va MODULES_EXCLUDE +.Pq Vt str +Set to a list of modules to exclude from the build. .It Va NO_KERNELCLEAN .Pq Vt bool Set this to skip running diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk index 683967749e75..2287f447c704 100644 --- a/share/mk/bsd.kmod.mk +++ b/share/mk/bsd.kmod.mk @@ -1,4 +1,10 @@ # $FreeBSD$ +.if defined(MODULES_EXCLUDE) && defined(KMOD) && ${MODULES_EXCLUDE:M${KMOD}} +all: +install: +cleandir: +.else .include <bsd.sysdir.mk> .include "${SYSDIR}/conf/kmod.mk" +.endif |