diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-02-11 09:40:29 +0100 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-25 19:01:20 +0200 |
commit | 22340a06534a10296209bc2d02365a2770ded8fc (patch) | |
tree | 283e1209267a71ab902b1128fa1eeb4f57c3bc23 /Makefile | |
parent | kbuild: rename built-in.o to built-in.a (diff) | |
download | linux-22340a06534a10296209bc2d02365a2770ded8fc.tar.xz linux-22340a06534a10296209bc2d02365a2770ded8fc.zip |
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 version_h := include/generated/uapi/linux/version.h old_version_h := include/linux/version.h -no-dot-config-targets := clean mrproper distclean \ +clean-targets := %clean mrproper cleandocs +no-dot-config-targets := $(clean-targets) \ cscope gtags TAGS tags help% %docs check% coccicheck \ $(version_h) headers_% archheaders archscripts \ kernelversion %src-pkg @@ -243,6 +244,14 @@ ifeq ($(KBUILD_EXTMOD),) endif endif endif + +# For "make -j clean all", "make -j mrproper defconfig all", etc. +ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),) + ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),) + mixed-targets := 1 + endif +endif + # install and modules_install need also be processed one by one ifneq ($(filter install,$(MAKECMDGOALS)),) ifneq ($(filter modules_install,$(MAKECMDGOALS)),) |