diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-04-09 02:51:35 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2014-04-30 10:45:16 -0400 |
commit | 9319f4539c18ada539d37a1b4398c636b877c027 (patch) | |
tree | be640d1c74d95d963e71007713e8b930f78e665d /Makefile | |
parent | a86fe3537350613c0181ce936884036a9695ceea (diff) |
kbuild: support simultaneous "make %config" and "make all"
Kbuild is supposed to support mixed targets. (%config and build targets)
But "make all" did nothing if it was run with configuration targets.
For example,
$ LANG=C make defconfig all
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
make: Nothing to be done for `all'.
This commits allows "make %config all" and makes sure
mixed targets are built one by one in the given order.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Marek <mmarek@suse.cz>
CC: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -500,8 +500,16 @@ ifeq ($(mixed-targets),1) | |||
500 | # We're called with mixed targets (*config and build targets). | 500 | # We're called with mixed targets (*config and build targets). |
501 | # Handle them one by one. | 501 | # Handle them one by one. |
502 | 502 | ||
503 | %:: FORCE | 503 | PHONY += $(MAKECMDGOALS) __build_one_by_one |
504 | $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= $@ | 504 | |
505 | $(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one | ||
506 | @: | ||
507 | |||
508 | __build_one_by_one: | ||
509 | $(Q)set -e; \ | ||
510 | for i in $(MAKECMDGOALS); do \ | ||
511 | $(MAKE) -f $(srctree)/Makefile $$i; \ | ||
512 | done | ||
505 | 513 | ||
506 | else | 514 | else |
507 | ifeq ($(config-targets),1) | 515 | ifeq ($(config-targets),1) |