From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6589F15800A for ; Tue, 25 Jul 2023 04:50:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 18ED0E08D0; Tue, 25 Jul 2023 04:50:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D31DDE08CA for ; Tue, 25 Jul 2023 04:50:13 +0000 (UTC) Message-ID: <30ac5261f9bd6fc771ee4b117b7ad23fcbb6db7f.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH 1/3] multiprocessing.eclass: search also GNUMAKEFLAGS for --load-average From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: Florian Schmaus Date: Tue, 25 Jul 2023 06:50:09 +0200 In-Reply-To: <20230724185800.288216-1-flow@gentoo.org> References: <20230724185800.288216-1-flow@gentoo.org> Organization: Gentoo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 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 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: 0760dc3d-5d8b-48f5-a2ca-219ef1fedef6 X-Archives-Hash: 5ea6e64cf2cfcf71c86e3a672cae2365 On Mon, 2023-07-24 at 20:57 +0200, Florian Schmaus wrote: > Since --load-average may not be found in other Make implementations > besides GNU MAKE, it is potentially found in GNUMAKEFLAGS and not in > MAKEOPTS. >=20 > Signed-off-by: Florian Schmaus > --- > eclass/multiprocessing.eclass | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/eclass/multiprocessing.eclass b/eclass/multiprocessing.eclas= s > index e55be636a02c..6489ecbb44a6 100644 > --- a/eclass/multiprocessing.eclass > +++ b/eclass/multiprocessing.eclass > @@ -1,4 +1,4 @@ > -# Copyright 1999-2022 Gentoo Authors > +# Copyright 1999-2023 Gentoo Authors > # Distributed under the terms of the GNU General Public License v2 > =20 > # @ECLASS: multiprocessing.eclass > @@ -86,7 +86,7 @@ makeopts_jobs() { > # @FUNCTION: makeopts_loadavg > # @USAGE: [${MAKEOPTS}] [${inf:-999}] > # @DESCRIPTION: > -# Searches the arguments (defaults to ${MAKEOPTS}) and extracts the valu= e set > +# Searches the arguments (defaults to ${MAKEOPTS} ${GNUMAKEFLAGS}) and e= xtracts the value set > # for load-average. For make and ninja based builds this will mean new j= obs are > # not only limited by the jobs-value, but also by the current load - whi= ch might > # get excessive due to I/O and not just due to CPU load. > @@ -95,7 +95,7 @@ makeopts_jobs() { > # If no limit is specified or --load-average is used without a number, $= {inf} > # (defaults to 999) is returned. > makeopts_loadavg() { > - [[ $# -eq 0 ]] && set -- "${MAKEOPTS}" > + [[ $# -eq 0 ]] && set -- "${MAKEOPTS} ${GNUMAKEFLAGS}" > # This assumes the first .* will be more greedy than the second .* > # since POSIX doesn't specify a non-greedy match (i.e. ".*?"). > local lavg=3D$(echo " $* " | sed -r -n \ I'm pretty sure [GNU]MAKEFLAGS has incompatible format, in particular it makes hyphens optional. --=20 Best regards, Micha=C5=82 G=C3=B3rny