From: Masahiro Yamada Date: Wed, 18 Dec 2013 15:17:52 +0900 Subject: [U-Boot] [PATCH v2 34/35] Kbuild: support simultaneous board configuration and "make all" In-Reply-To: <1387347473-29146-1-git-send-email-yamada.m@jp.panasonic.com> References: <1387347473-29146-1-git-send-email-yamada.m@jp.panasonic.com> Message-ID: <1387347473-29146-35-git-send-email-yamada.m@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This commit fixes two problems: [1] We could not do board configuration and "make all" in one command line. For example, the following did not work as we expect: $ make sandbox_config all Configuring for sandbox board... make: Nothing to be done for `all'. [2] mixed-target build did not work with -j option For example, the following did not work: $ make -j8 sandbox_config u-boot Makefile:481: *** "System not configured - see README". Stop. make: *** [u-boot] Error 2 make: *** Waiting for unfinished jobs.... Configuring for sandbox board... Going forward, we can do $ make -j8 sandbox_config all This is the same as $ make sandbox_config $ make -j8 Signed-off-by: Masahiro Yamada --- Changes in v2: None Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4e888e8..fc31135 100644 --- a/Makefile +++ b/Makefile @@ -429,8 +429,16 @@ ifeq ($(mixed-targets),1) # We're called with mixed targets (*config and build targets). # Handle them one by one. -%:: FORCE - $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= $@ +PHONY += $(MAKECMDGOALS) build-one-by-one + +$(MAKECMDGOALS): build-one-by-one + @: + +build-one-by-one: + $(Q)set -e; \ + for i in $(MAKECMDGOALS); do \ + $(MAKE) -f $(srctree)/Makefile $$i; \ + done else ifeq ($(config-targets),1) -- 1.8.3.2