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 /scripts/mkmakefile | |
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 'scripts/mkmakefile')
-rw-r--r-- | scripts/mkmakefile | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 0cc044260744..84af27bf0f99 100644 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile | |||
@@ -42,18 +42,11 @@ MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$ | |||
42 | 42 | ||
43 | MAKEFLAGS += --no-print-directory | 43 | MAKEFLAGS += --no-print-directory |
44 | 44 | ||
45 | .PHONY: all \$(MAKECMDGOALS) | 45 | .PHONY: __sub-make \$(MAKECMDGOALS) |
46 | 46 | ||
47 | all := \$(filter-out all Makefile,\$(MAKECMDGOALS)) | 47 | __sub-make: |
48 | \$(Q)\$(MAKE) \$(MAKEARGS) \$(MAKECMDGOALS) | ||
48 | 49 | ||
49 | all: | 50 | \$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make |
50 | \$(Q)\$(MAKE) \$(MAKEARGS) \$(all) | ||
51 | |||
52 | Makefile:; | ||
53 | |||
54 | \$(all): all | ||
55 | @: | ||
56 | |||
57 | %/: all | ||
58 | @: | 51 | @: |
59 | EOF | 52 | EOF |