kbuild: fix single directory build

commit 3753af778d upstream.

Commit f110e5a250 ("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: f110e5a250 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Masahiro Yamada 2022-10-15 05:18:11 +09:00 коммит произвёл Greg Kroah-Hartman
Родитель 326b80bd22
Коммит b97e4100be
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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)