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 <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
This commit is contained in:
Masahiro Yamada authored and Michal Marek committed 2015-01-08 15:05:28 +01:00
1 parent 343d3e6cc8
commit d0d38cd9e8
1 file changed
+1 -1
+1 -1
View File
@@ -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