From patchwork Fri Jan 10 06:44:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 309136 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id ED0032C00AC for ; Fri, 10 Jan 2014 17:50:01 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 27FAE4AFFC; Fri, 10 Jan 2014 07:49:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hmsneT4fbUiI; Fri, 10 Jan 2014 07:49:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F254D4AE73; Fri, 10 Jan 2014 07:46:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 155EB4AC3A for ; Fri, 10 Jan 2014 07:45:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lOUKe2JQy2ND for ; Fri, 10 Jan 2014 07:45:28 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 078DF4AC45 for ; Fri, 10 Jan 2014 07:44:47 +0100 (CET) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id s0A6ijkJ011737; Fri, 10 Jan 2014 15:44:45 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili15) with ESMTP id s0A6ijB04206; Fri, 10 Jan 2014 15:44:45 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi14) id s0A6ijWv018366; Fri, 10 Jan 2014 15:44:45 +0900 Received: from poodle by lomi14.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s0A6ii35018329; Fri, 10 Jan 2014 15:44:44 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id B8BA92740043; Fri, 10 Jan 2014 15:44:44 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 10 Jan 2014 15:44:31 +0900 Message-Id: <1389336274-7234-35-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1389336274-7234-1-git-send-email-yamada.m@jp.panasonic.com> References: <1389336274-7234-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini Subject: [U-Boot] [PATCH v4 34/37] kbuild: support simultaneous board configuration and "make all" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@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 v4: None Changes in v3: None Changes in v2: None Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 45af43b..06c7c5f 100644 --- a/Makefile +++ b/Makefile @@ -427,8 +427,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)