aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-11 03:40:29 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-03-25 13:01:20 -0400
commit22340a06534a10296209bc2d02365a2770ded8fc (patch)
tree283e1209267a71ab902b1128fa1eeb4f57c3bc23 /Makefile
parentf49821ee32b76b1a356fab17316eb62430182ecf (diff)
kbuild: process mixture of clean/build targets one by one
Support parallel building of clean, config, and build targets in a single command. For example, make -j<N> clean all or make -j<N> mrproper defconfig all They should be handled one by one. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3cb5d10c7aa9..bfd09bc0da91 100644
--- a/Makefile
+++ b/Makefile
@@ -220,7 +220,8 @@ export srctree objtree VPATH
220version_h := include/generated/uapi/linux/version.h 220version_h := include/generated/uapi/linux/version.h
221old_version_h := include/linux/version.h 221old_version_h := include/linux/version.h
222 222
223no-dot-config-targets := clean mrproper distclean \ 223clean-targets := %clean mrproper cleandocs
224no-dot-config-targets := $(clean-targets) \
224 cscope gtags TAGS tags help% %docs check% coccicheck \ 225 cscope gtags TAGS tags help% %docs check% coccicheck \
225 $(version_h) headers_% archheaders archscripts \ 226 $(version_h) headers_% archheaders archscripts \
226 kernelversion %src-pkg 227 kernelversion %src-pkg
@@ -243,6 +244,14 @@ ifeq ($(KBUILD_EXTMOD),)
243 endif 244 endif
244 endif 245 endif
245endif 246endif
247
248# For "make -j clean all", "make -j mrproper defconfig all", etc.
249ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),)
250 ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),)
251 mixed-targets := 1
252 endif
253endif
254
246# install and modules_install need also be processed one by one 255# install and modules_install need also be processed one by one
247ifneq ($(filter install,$(MAKECMDGOALS)),) 256ifneq ($(filter install,$(MAKECMDGOALS)),)
248 ifneq ($(filter modules_install,$(MAKECMDGOALS)),) 257 ifneq ($(filter modules_install,$(MAKECMDGOALS)),)