Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-devhelp
Navigation:
Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-devhelp@g.o
From: Nikos Chantziaras <realnc@...>
Subject: Re: How do I get just the "-j" part from MAKEOPTS?
Date: Tue, 27 Mar 2012 08:55:45 +0300
On 27/03/12 08:37, Nathan Phillip Brink wrote:
> On Tue, Mar 27, 2012 at 05:43:43AM +0300, Nikos Chantziaras wrote:
>> I have an ebuild that uses jam as its build system.  jam supports
>> parallel builds with -jN.  However, other make options are not
>> recognized.  So in the ebuild, I can't just pass ${MAKEOPTS}.
>>
>> Is there a way to filter out just the "-jN" part of MAKEOPTS and pass it on?
>
> It looks like some eclasses just resort to sed for that:
>
> ohnobinki@ohnopublishing ~/portage $ grep -Re 'MAKEOPTS.*-j' /usr/portage/eclass
> /usr/portage/eclass/toolchain.eclass:           export MAKEOPTS="${MAKEOPTS} -j1"
> /usr/portage/eclass/waf-utils.eclass:   local jobs=$(echo -j1 ${MAKEOPTS} | sed -r "s/.*(-j\s*|--jobs=)([0-9]+).*/--jobs=\2/" )
> /usr/portage/eclass/perl-module.eclass:                 export HARNESS_OPTIONS=j$(echo -j1 ${MAKEOPTS} | sed -r "s/.*(-j\s*|--jobs=)([0-9]+).*/\2/" )
>
> So if you did something dirty like that, it would be enough to make
> people happy ;-).

Mr. Bones pointed out that the ebuild for games-simulation/lincity-ng 
provides a usable sed line I can use:

$(echo "${MAKEOPTS}" | sed -ne "/-j/ { 
s/.*\(-j[[:space:]]*[0-9]\+\).*/\1/; p }")

Indeed it does the job.



References:
How do I get just the "-j" part from MAKEOPTS?
-- Nikos Chantziaras
Re: How do I get just the "-j" part from MAKEOPTS?
-- Nathan Phillip Brink
Navigation:
Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: How do I get just the "-j" part from MAKEOPTS?
Next by thread:
Re: How do I get just the "-j" part from MAKEOPTS?
Previous by date:
Re: How do I get just the "-j" part from MAKEOPTS?
Next by date:
Re: How do I get just the "-j" part from MAKEOPTS?


Updated Jun 03, 2012

Summary: Archive of the gentoo-devhelp mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.