kbuild: fix single directory build
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 14 Oct 2022 20:18:11 +0000 (05:18 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 16 Oct 2022 17:03:52 +0000 (02:03 +0900)
Commit f110e5a250e3 ("kbuild: refactor single builds of *.ko") was wrong.

KBUILD_MODULES _is_ needed for single builds.

Otherwise, "make foo/bar/baz/" does not build module objects at all.

Fixes: f110e5a250e3 ("kbuild: refactor single builds of *.ko")
Reported-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: David Sterba <dsterba@suse.com>
Makefile

index 85a63a1..48a005f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1978,6 +1978,8 @@ endif
 
 single-goals := $(addprefix $(build-dir)/, $(single-no-ko))
 
+KBUILD_MODULES := 1
+
 endif
 
 # Preset locale variables to speed up the build process. Limit locale