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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C0F6A138334 for ; Thu, 10 Jan 2019 08:55:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 993EEE09E0; Thu, 10 Jan 2019 08:55:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 48088E088F for ; Thu, 10 Jan 2019 08:55:42 +0000 (UTC) Received: from [IPv6:2a01:4c8:1418:47ae:7e64:5bcd:52d1:400d] (unknown [IPv6:2a01:4c8:1418:47ae:7e64:5bcd:52d1:400d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: chewi) by smtp.gentoo.org (Postfix) with ESMTPSA id BDF8F335C07 for ; Thu, 10 Jan 2019 08:55:40 +0000 (UTC) Date: Thu, 10 Jan 2019 08:55:37 +0000 User-Agent: K-9 Mail for Android In-Reply-To: <1547091236.880.0.camel@gentoo.org> References: <20190109220817.12006-1-chewi@gentoo.org> <1547091236.880.0.camel@gentoo.org> 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [gentoo-dev] [PATCH 1/2] waf-utils.eclass: Simplify output of configure command and arguments To: gentoo-dev@lists.gentoo.org From: James Le Cuirot Message-ID: X-Archives-Salt: d96d4184-922f-4960-84ef-f4de3d97321e X-Archives-Hash: d344878424bfd32fe42b9555595b189e On 10 January 2019 03:33:56 GMT, "Micha=C5=82 G=C3=B3rny" wrote: >On Wed, 2019-01-09 at 22:08 +0000, James Le Cuirot wrote: >> We can just assign these to an array and echo before executing=2E Using >> @Q makes Bash quote the output=2E This only works in Bash 4=2E4 and lat= er >> but on earlier versions, it simply doesn't quote=2E >>=20 >> Signed-off-by: James Le Cuirot >> --- >> eclass/waf-utils=2Eeclass | 20 +++++++++++++------- >> 1 file changed, 13 insertions(+), 7 deletions(-) >>=20 >> diff --git a/eclass/waf-utils=2Eeclass b/eclass/waf-utils=2Eeclass >> index 878068fc9f4f=2E=2E8387829648a3 100644 >> --- a/eclass/waf-utils=2Eeclass >> +++ b/eclass/waf-utils=2Eeclass >> @@ -1,4 +1,4 @@ >> -# Copyright 1999-2015 Gentoo Foundation >> +# Copyright 1999-2019 Gentoo Authors >> # Distributed under the terms of the GNU General Public License v2 >> =20 >> # @ECLASS: waf-utils=2Eeclass >> @@ -84,13 +84,19 @@ waf-utils_src_configure() { >> [[ -z ${NO_WAF_LIBDIR} ]] && >libdir=3D(--libdir=3D"${EPREFIX}/usr/$(get_libdir)") >> =20 >> tc-export AR CC CPP CXX RANLIB >> - echo "CCFLAGS=3D\"${CFLAGS}\" LINKFLAGS=3D\"${CFLAGS} ${LDFLAGS}\" >\"${WAF_BINARY}\" --prefix=3D${EPREFIX}/usr ${libdir[@]} $@ configure" >> =20 >> - CCFLAGS=3D"${CFLAGS}" LINKFLAGS=3D"${CFLAGS} ${LDFLAGS}" >"${WAF_BINARY}" \ >> - "--prefix=3D${EPREFIX}/usr" \ >> - "${libdir[@]}" \ >> - "${@}" \ >> - configure || die "configure failed" >> + local CMD=3D( >> + CCFLAGS=3D"${CFLAGS}" >> + LINKFLAGS=3D"${CFLAGS} ${LDFLAGS}" >> + "${WAF_BINARY}" >> + "--prefix=3D${EPREFIX}/usr" >> + "${libdir[@]}" >> + "${@}" >> + configure >> + ) >> + >> + echo "${CMD[@]@Q}" > >>&2 > >> + env "${CMD[@]}" || die "configure failed" >> } >> =20 >> # @FUNCTION: waf-utils_src_compile Obviously that wasn't there before but good call=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E