All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: process mixture of clean/build targets one by one
@ 2018-02-11  8:40 Masahiro Yamada
  2018-02-18 23:44 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2018-02-11  8:40 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Sam Ravnborg, Michal Marek, Thomas Meyer, Masahiro Yamada, linux-kernel

I sometimes receive a question why "make -j<N> clean all" does not
work.  It is actually possible to make it work by handling targets
one by one.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 Makefile | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index cd9145c..31d138e 100644
--- a/Makefile
+++ b/Makefile
@@ -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)),)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: process mixture of clean/build targets one by one
  2018-02-11  8:40 [PATCH] kbuild: process mixture of clean/build targets one by one Masahiro Yamada
@ 2018-02-18 23:44 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2018-02-18 23:44 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Sam Ravnborg, Michal Marek, Thomas Meyer, Masahiro Yamada,
	Linux Kernel Mailing List

2018-02-11 17:40 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> I sometimes receive a question why "make -j<N> clean all" does not
> work.  It is actually possible to make it work by handling targets
> one by one.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>

Applied to linux-kbuild/kbuild.

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-18 23:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-11  8:40 [PATCH] kbuild: process mixture of clean/build targets one by one Masahiro Yamada
2018-02-18 23:44 ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.