Skip to content

Commit 2dffd23

Browse files
committed
kbuild: make single target builds much faster
Since commit 394053f ("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: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent 2031262 commit 2dffd23

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎scripts/Makefile.build‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,10 @@ curdir-single := $(sort $(foreach x, $(KBUILD_SINGLE_TARGETS), \
479479
unknown-single := $(filter-out $(addsuffix /%, $(subdir-ym)), \
480480
$(filter-out $(curdir-single), $(KBUILD_SINGLE_TARGETS)))
481481

482-
__build: $(curdir-single) $(subdir-ym)
482+
single-subdirs := $(foreach d, $(subdir-ym), \
483+
$(if $(filter $(d)/%, $(KBUILD_SINGLE_TARGETS)), $(d)))
484+
485+
__build: $(curdir-single) $(single-subdirs)
483486
ifneq ($(unknown-single),)
484487
$(Q)$(MAKE) -f /dev/null $(unknown-single)
485488
endif

0 commit comments

Comments
 (0)