From patchwork Tue Sep 25 10:17:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christophe PLAGNIOL-VILLARD X-Patchwork-Id: 186829 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 6B1F22C007D for ; Wed, 26 Sep 2012 00:34:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C52FAA03A5; Tue, 25 Sep 2012 14:34:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HfZxFiGynDww; Tue, 25 Sep 2012 14:34:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0F032A00FE; Tue, 25 Sep 2012 14:34:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A4A518F74B for ; Tue, 25 Sep 2012 14:34:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BAC5D8A3E8 for ; Tue, 25 Sep 2012 14:34:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zzHF-c22meBK for ; Tue, 25 Sep 2012 14:34:37 +0000 (UTC) X-Greylist: delayed 04:15:01 by SQLgrey-1.7.6 Received: from mo5.mail-out.ovh.net (18.mo5.mail-out.ovh.net [178.33.45.10]) by whitealder.osuosl.org (Postfix) with ESMTP id 5FF968A3BC for ; Tue, 25 Sep 2012 14:34:37 +0000 (UTC) Received: from mail404.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo5.mail-out.ovh.net (Postfix) with SMTP id A7C8DFFABAD for ; Tue, 25 Sep 2012 12:25:34 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 25 Sep 2012 12:19:38 +0200 Received: from ns32433.ovh.net (HELO localhost) (plagnioj%jcrosoft.com@213.251.161.87) by ns0.ovh.net with SMTP; 25 Sep 2012 12:19:37 +0200 From: Jean-Christophe PLAGNIOL-VILLARD To: buildroot@busybox.net X-Ovh-Mailout: 178.32.228.5 (mo5.mail-out.ovh.net) Date: Tue, 25 Sep 2012 12:17:03 +0200 Message-Id: <1348568223-13874-1-git-send-email-plagnioj@jcrosoft.com> X-Mailer: git-send-email 1.7.10 X-Ovh-Tracer-Id: 9599704081251871702 X-Ovh-Remote: 213.251.161.87 (ns32433.ovh.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehtddrkeejucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecunecuhfhrohhmpeflvggrnhdqvehhrhhishhtohhphhgvucfrnfetiffpkffqnfdqggfknffnteftffcuoehplhgrghhnihhojhesjhgtrhhoshhofhhtrdgtohhmqeenucfjughrpefhvffufffkofestddtredtredttd X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehtddrkeejucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecunecuhfhrohhmpeflvggrnhdqvehhrhhishhtohhphhgvucfrnfetiffpkffqnfdqggfknffnteftffcuoehplhgrghhnihhojhesjhgtrhhoshhofhhtrdgtohhmqeenucfjughrpefhvffufffkofestddtredtredttd Subject: [Buildroot] [PATCH 1/1] allow to pass the number of parallel jobs via command line X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net use PARALLEL_JOBS=x for this This will overwrite the value in BR2_JLEVEL Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- Makefile | 2 ++ package/Makefile.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 6536bca..13e8139 100644 --- a/Makefile +++ b/Makefile @@ -730,6 +730,8 @@ endif @echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build' @echo ' make O=dir - Locate all output files in "dir", including .config' @echo + @echo ' make PARALLEL_JOBS=x - X => number of jobs for each package this overwrite the KConfig BR2_JLEVEL' + @echo @$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \ printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);) @echo diff --git a/package/Makefile.in b/package/Makefile.in index 64508b2..fcf5b13 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -9,12 +9,14 @@ HOSTMAKE :=$(shell which $(HOSTMAKE) || type -p $(HOSTMAKE) || echo make) # If BR2_LEVEL is 0, scale the maximum concurrency with the number of # CPUs. A coefficient of 2 is used in order to keep processors busy # while waiting on I/O. +ifeq ($(PARALLEL_JOBS),) ifeq ($(BR2_JLEVEL),0) PARALLEL_JOBS:=$(shell echo \ $$((2 * `getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1`))) else PARALLEL_JOBS:=$(BR2_JLEVEL) endif +endif MAKE1:=$(HOSTMAKE) -j1 MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)