From f7026fbbb2bd72176d73921dd2dd5e4b263d5103 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 29 Oct 2022 08:34:16 -0600 Subject: [PATCH] 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 --- sys/modules/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 00afbffb1ba..3a009f071ca 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -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