diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 --- 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 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 --- 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 .include "${SYSDIR}/conf/kmod.mk" +.endif