浏览代码

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

"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>
Masahiro Yamada 11 年之前
父节点
当前提交
d0d38cd9e8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Makefile

+ 1 - 1
Makefile

@@ -501,7 +501,7 @@ endif
 ifeq ($(KBUILD_EXTMOD),)
 ifeq ($(KBUILD_EXTMOD),)
         ifneq ($(filter config %config,$(MAKECMDGOALS)),)
         ifneq ($(filter config %config,$(MAKECMDGOALS)),)
                 config-targets := 1
                 config-targets := 1
-                ifneq ($(filter-out config %config,$(MAKECMDGOALS)),)
+                ifneq ($(words $(MAKECMDGOALS)),1)
                         mixed-targets := 1
                         mixed-targets := 1
                 endif
                 endif
         endif
         endif