kbuild: reduce KBUILD_SINGLE_TARGETS as descending into subdirectories
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 16 Oct 2019 05:15:46 +0000 (14:15 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 11 Nov 2019 11:10:01 +0000 (20:10 +0900)
KBUILD_SINGLE_TARGETS does not need to contain all the targets.
Change it to keep track the targets only from the current directory
and its subdirectories.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/Makefile.build

index a9e4795..dcbb012 100644 (file)
@@ -469,15 +469,15 @@ targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \
 
 ifdef single-build
 
+KBUILD_SINGLE_TARGETS := $(filter $(obj)/%, $(KBUILD_SINGLE_TARGETS))
+
 curdir-single := $(sort $(foreach x, $(KBUILD_SINGLE_TARGETS), \
                        $(if $(filter $(x) $(basename $(x)).o, $(targets)), $(x))))
 
 # Handle single targets without any rule: show "Nothing to be done for ..." or
 # "No rule to make target ..." depending on whether the target exists.
 unknown-single := $(filter-out $(addsuffix /%, $(subdir-ym)), \
-                       $(filter $(obj)/%, \
-                               $(filter-out $(curdir-single), \
-                                       $(KBUILD_SINGLE_TARGETS))))
+                       $(filter-out $(curdir-single), $(KBUILD_SINGLE_TARGETS)))
 
 __build: $(curdir-single) $(subdir-ym)
 ifneq ($(unknown-single),)