diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-02-11 03:40:29 -0500 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-25 13:01:20 -0400 |
commit | 22340a06534a10296209bc2d02365a2770ded8fc (patch) | |
tree | 283e1209267a71ab902b1128fa1eeb4f57c3bc23 /Makefile | |
parent | f49821ee32b76b1a356fab17316eb62430182ecf (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-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -220,7 +220,8 @@ export srctree objtree VPATH | |||
220 | version_h := include/generated/uapi/linux/version.h | 220 | version_h := include/generated/uapi/linux/version.h |
221 | old_version_h := include/linux/version.h | 221 | old_version_h := include/linux/version.h |
222 | 222 | ||
223 | no-dot-config-targets := clean mrproper distclean \ | 223 | clean-targets := %clean mrproper cleandocs |
224 | no-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 |
245 | endif | 246 | endif |
247 | |||
248 | # For "make -j clean all", "make -j mrproper defconfig all", etc. | ||
249 | ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),) | ||
250 | ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),) | ||
251 | mixed-targets := 1 | ||
252 | endif | ||
253 | endif | ||
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 |
247 | ifneq ($(filter install,$(MAKECMDGOALS)),) | 256 | ifneq ($(filter install,$(MAKECMDGOALS)),) |
248 | ifneq ($(filter modules_install,$(MAKECMDGOALS)),) | 257 | ifneq ($(filter modules_install,$(MAKECMDGOALS)),) |