Gentoo Archives: gentoo-dev

From: flameeyes@gmail.com (Diego 'Flameeyes' =?utf-8?Q?Petten=C3=B2?=)
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [RFC] Create a JOBS variable to replace -jX in MAKEOPTS
Date: Thu, 04 Dec 2008 20:30:12
Message-Id: m2wsef4rbg.fsf@gmail.com
1 Since not all the buildsystem we support use make for the actual build,
2 and they don't necessarily support make-like options (-jX -s and so on),
3 it would be nice to be able to express a JOBS variable that could be
4 used for parallel build with any build systems.
5
6 Right now there are ebuilds like openoffice or some scons-based ebuilds
7 that parse MAKEOPTS and get out of that the number of jobs from the -j
8 option, but this is a) suboptimal b) error-prone.
9
10 One has to consider people might be using -l for parallel building too,
11 for which reasons I'd be suggesting doing something like this to make
12 the change transparent:
13
14 - ebuilds using non-make build systems would use JOBS;
15 - ebuilds using make builds systems would just use emake as usual;
16 - Portage takes care, if JOBS is unset, to parse it out of MAKEOPTS;
17 - if user has set JOBS but not MAKEOPTS this defaults to -j${JOBS};
18 - if user has JOBS and MAKEOPTS, MAKEOPTS keeps the same (for -l).
19
20 The result is that you can finally combine -l with parallel build on
21 OpenOffice and other packages, with a fallback number of maximum jobs
22 instead of using load-based decisions.
23
24 --
25 Diego "Flameeyes" Pettenò
26 http://blog.flameeyes.eu/

Replies