diff mbox

kbuild: use mixed-targets when two or more config targets are given

Message ID 1418292754-2987-1-git-send-email-yamada.m@jp.panasonic.com (mailing list archive)
State New, archived
Headers show

Commit Message

Masahiro Yamada Dec. 11, 2014, 10:12 a.m. UTC
"make kvmconfig" expects that the .config has already been created,
but some people might want to create the .config and run kvmconfig
in one shot command, like this:

  $ make defconfig kvmconfig

To make sure this command works correctly even if -j* option is set,
we must handle them one by one.
This commit turns on mixed-targets when $(MAKECMDGOALS) includes
at least one config target and also includes another target.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michal Marek Jan. 8, 2015, 2:06 p.m. UTC | #1
On 2014-12-11 11:12, Masahiro Yamada wrote:
> "make kvmconfig" expects that the .config has already been created,
> but some people might want to create the .config and run kvmconfig
> in one shot command, like this:
> 
>   $ make defconfig kvmconfig
> 
> To make sure this command works correctly even if -j* option is set,
> we must handle them one by one.
> This commit turns on mixed-targets when $(MAKECMDGOALS) includes
> at least one config target and also includes another target.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied to kbuild.git#kbuild, thanks.

Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Makefile b/Makefile
index d9af2be..3272609 100644
--- a/Makefile
+++ b/Makefile
@@ -500,7 +500,7 @@  endif
 ifeq ($(KBUILD_EXTMOD),)
         ifneq ($(filter config %config,$(MAKECMDGOALS)),)
                 config-targets := 1
-                ifneq ($(filter-out config %config,$(MAKECMDGOALS)),)
+                ifneq ($(words $(MAKECMDGOALS)),1)
                         mixed-targets := 1
                 endif
         endif