aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-10-16 14:15:47 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-11 20:10:01 +0900
commit2dffd23f81a365307c0edcf9cb40b6ddae2b481e (patch)
tree6116175293c80bf50bc18af8da829501a7fabcbf /scripts/Makefile.build
parentkbuild: reduce KBUILD_SINGLE_TARGETS as descending into subdirectories (diff)
downloadlinux-dev-2dffd23f81a365307c0edcf9cb40b6ddae2b481e.tar.xz
linux-dev-2dffd23f81a365307c0edcf9cb40b6ddae2b481e.zip
kbuild: make single target builds much faster
Since commit 394053f4a4b3 ("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>
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index dcbb0124dac4..7eabbb66a65c 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -479,7 +479,10 @@ curdir-single := $(sort $(foreach x, $(KBUILD_SINGLE_TARGETS), \
unknown-single := $(filter-out $(addsuffix /%, $(subdir-ym)), \
$(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),)
$(Q)$(MAKE) -f /dev/null $(unknown-single)
endif