From b97e4100be37350f1953c897902097cb01347df6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 15 Oct 2022 05:18:11 +0900 Subject: [PATCH] kbuild: fix single directory build commit 3753af778dd9d0d5199d6a7d01b0ead33135d095 upstream. 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 Signed-off-by: Masahiro Yamada Tested-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 4de8cd300451..69c2fa9a1c09 100644 --- a/Makefile +++ b/Makefile @@ -1890,6 +1890,8 @@ export KBUILD_SINGLE_TARGETS := $(addprefix $(extmod_prefix), $(single-no-ko)) build-dirs := $(foreach d, $(build-dirs), \ $(if $(filter $(d)/%, $(KBUILD_SINGLE_TARGETS)), $(d))) +KBUILD_MODULES := 1 + endif # Handle descending into subdirectories listed in $(build-dirs)