Commit 2dffd23f authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: make single target builds much faster

Since commit 394053f4 ("kbuild: make single targets work more
correctly"), building single targets is really slow.

Speed it up by not descending into unrelated directories.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 20312629
...@@ -479,7 +479,10 @@ curdir-single := $(sort $(foreach x, $(KBUILD_SINGLE_TARGETS), \ ...@@ -479,7 +479,10 @@ curdir-single := $(sort $(foreach x, $(KBUILD_SINGLE_TARGETS), \
unknown-single := $(filter-out $(addsuffix /%, $(subdir-ym)), \ unknown-single := $(filter-out $(addsuffix /%, $(subdir-ym)), \
$(filter-out $(curdir-single), $(KBUILD_SINGLE_TARGETS))) $(filter-out $(curdir-single), $(KBUILD_SINGLE_TARGETS)))
__build: $(curdir-single) $(subdir-ym) single-subdirs := $(foreach d, $(subdir-ym), \
$(if $(filter $(d)/%, $(KBUILD_SINGLE_TARGETS)), $(d)))
__build: $(curdir-single) $(single-subdirs)
ifneq ($(unknown-single),) ifneq ($(unknown-single),)
$(Q)$(MAKE) -f /dev/null $(unknown-single) $(Q)$(MAKE) -f /dev/null $(unknown-single)
endif endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment