Index: share/man/man5/make.conf.5 =================================================================== --- share/man/man5/make.conf.5 +++ share/man/man5/make.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2021 +.Dd December 14, 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 Index: share/mk/bsd.kmod.mk =================================================================== --- share/mk/bsd.kmod.mk +++ 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