From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1L8L0K-00052O-AK for garchives@archives.gentoo.org; Thu, 04 Dec 2008 20:40:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5C653E0558; Thu, 4 Dec 2008 20:40:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 357B0E0558 for ; Thu, 4 Dec 2008 20:40:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B7C1D64965 for ; Thu, 4 Dec 2008 20:40:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -3.599 X-Spam-Level: X-Spam-Status: No, score=-3.599 required=5.5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oT11za3TejvS for ; Thu, 4 Dec 2008 20:40:47 +0000 (UTC) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id B7BBE6495A for ; Thu, 4 Dec 2008 20:40:44 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L8L04-0004mP-8q for gentoo-dev@gentoo.org; Thu, 04 Dec 2008 20:40:40 +0000 Received: from 22-20.77-83.cust.bluewin.ch ([83.77.20.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 04 Dec 2008 20:40:40 +0000 Received: from dev-zero by 22-20.77-83.cust.bluewin.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 04 Dec 2008 20:40:40 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Tiziano =?utf-8?q?M=C3=BCller?= Subject: [gentoo-dev] Re: [RFC] Create a JOBS variable to replace -jX in MAKEOPTS Date: Thu, 4 Dec 2008 20:40:33 +0000 (UTC) Message-ID: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 22-20.77-83.cust.bluewin.ch User-Agent: XPN/1.2.5 (Emancipation ; Linux) Sender: news Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 7062a82d-e954-458e-a065-9036b80491a6 X-Archives-Hash: 04fe021225208a608a2ec9977e6c719c Diego 'Flameeyes' =3D?utf-8?Q?Petten=3DC3=3DB2?=3D wrote: > > Since not all the buildsystem we support use make for the actual build, > and they don't necessarily support make-like options (-jX -s and so on)= , > it would be nice to be able to express a JOBS variable that could be > used for parallel build with any build systems. > > Right now there are ebuilds like openoffice or some scons-based ebuilds > that parse MAKEOPTS and get out of that the number of jobs from the -j > option, but this is a) suboptimal b) error-prone. > > One has to consider people might be using -l for parallel building too, > for which reasons I'd be suggesting doing something like this to make > the change transparent: > > - ebuilds using non-make build systems would use JOBS; > - ebuilds using make builds systems would just use emake as usual; > - Portage takes care, if JOBS is unset, to parse it out of MAKEOPTS; > - if user has set JOBS but not MAKEOPTS this defaults to -j${JOBS}; > - if user has JOBS and MAKEOPTS, MAKEOPTS keeps the same (for -l). > > The result is that you can finally combine -l with parallel build on > OpenOffice and other packages, with a fallback number of maximum jobs > instead of using load-based decisions. Sounds good for me. What do you do for other build systems which also decide on load-basis how many jobs to run? Parse again? In that case I'd like to see a more abstract definition of "how many jobs to run in parallel" which gets translated to the correct make-options for emake and which is query'able either via a variable or a function (something like JOBS=3D"load=3D0.7||max=3D3" maybe?).