]> git.karo-electronics.de Git - linux-beck.git/commitdiff
kbuild: use mixed-targets when two or more config targets are given
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 11 Dec 2014 10:12:34 +0000 (19:12 +0900)
committerMichal Marek <mmarek@suse.cz>
Thu, 8 Jan 2015 14:05:28 +0000 (15:05 +0100)
"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>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Makefile

index b1c3254441f3f3353465ef8b3cf2e563abe70bf4..dd3ecc0fb8e7bec51fb1882c360fedf19a969ead 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -501,7 +501,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