sys/modules: MODULES_OVERRIDE takes precedence over EXTRA_MODULES and WITHOUT_MODULES

MODULES_OVERRIDE has traditionally taken precedence over EXTRA_MODULES
and WITHOUT_MODULES as the exact list of modules to build. Over time,
things have been added that has broken this. Move the .endif that makes
this the case to the right place. The so called 'ALL_MODULES' option is
the only thing with higher precedence, but it's not quite all the
options anymore (though it is much more of them, and doesn't quite
work on !x86).

Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2022-10-29 08:34:16 -06:00
parent 25b1b63dba
commit f7026fbbb2

View File

@ -848,8 +848,6 @@ _nvram= opal_nvram
_nvram+= powermac_nvram
.endif
.endif
.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64"
_bcm283x_clkman= bcm283x_clkman
_bcm283x_pwm= bcm283x_pwm
@ -867,6 +865,8 @@ SUBDIR+=${MODULES_EXTRA}
SUBDIR:= ${SUBDIR:N${reject}}
.endfor
.endif # MODULES_OVERRIDE -- Keep last
# Calling kldxref(8) for each module is expensive.
.if !defined(NO_XREF)
.MAKEFLAGS+= -DNO_XREF