From 9319f4539c18ada539d37a1b4398c636b877c027 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 9 Apr 2014 15:51:35 +0900 Subject: 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 Cc: Michal Marek CC: Sam Ravnborg Signed-off-by: Michal Marek --- scripts/mkmakefile | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'scripts') 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 %/,%,\$ MAKEFLAGS += --no-print-directory -.PHONY: all \$(MAKECMDGOALS) +.PHONY: __sub-make \$(MAKECMDGOALS) -all := \$(filter-out all Makefile,\$(MAKECMDGOALS)) +__sub-make: + \$(Q)\$(MAKE) \$(MAKEARGS) \$(MAKECMDGOALS) -all: - \$(Q)\$(MAKE) \$(MAKEARGS) \$(all) - -Makefile:; - -\$(all): all - @: - -%/: all +\$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make @: EOF -- cgit v1.2.3-59-g8ed1b