From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R3Mex-00053B-Jw for garchives@archives.gentoo.org; Tue, 13 Sep 2011 06:39:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A4EDB21C1D7; Tue, 13 Sep 2011 06:39:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 44A9621C0E2 for ; Tue, 13 Sep 2011 06:39:11 +0000 (UTC) Received: from pomiocik.lan (77-255-22-60.adsl.inetia.pl [77.255.22.60]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id F13B31B400E; Tue, 13 Sep 2011 06:39:08 +0000 (UTC) Date: Tue, 13 Sep 2011 08:40:59 +0200 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: dberkholz@gentoo.org Subject: Re: [gentoo-dev] [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs. Message-ID: <20110913084059.74b410c0@pomiocik.lan> In-Reply-To: <20110912221049.GC31178@comet> References: <1315857465-8179-1-git-send-email-mgorny@gentoo.org> <20110912210020.GA31178@comet> <20110912235827.43dfb959@pomiocik.lan> <20110912221049.GC31178@comet> Organization: Gentoo X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; x86_64-pc-linux-gnu) 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: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/RGQbFaXUvgJ3x7N0wd9VoMZ"; protocol="application/pgp-signature" X-Archives-Salt: X-Archives-Hash: ec9f701c8e294b63f8e27f4215898f75 --Sig_/RGQbFaXUvgJ3x7N0wd9VoMZ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 12 Sep 2011 17:10:49 -0500 Donnie Berkholz wrote: > On 23:58 Mon 12 Sep , Micha=C5=82 G=C3=B3rny wrote: > > On Mon, 12 Sep 2011 16:00:20 -0500 > > Donnie Berkholz wrote: > > > > local f > > > > for f in $(find "${D}" -type f -name '*.la'); do > > > > # Keep only .la files with shouldnotlink=3Dyes - > > > > likely plugins local shouldnotlink=3D$(sed -ne > > > > '/^shouldnotlink=3Dyes$/p' "${f}") if [[ "$1" =3D=3D 'all' || -z > > > > ${shouldnotlink} ]]; then > > > > + if [[ "$1" =3D=3D 'only-not-required' ]]; > > > > then > > >=20 > > > Is there a case where one of those arguments might be $2 but you'd > > > still want to run this? > >=20 > > Er? What are you referring to? >=20 > Two things. >=20 > 1. This is only reached if shouldnotlink is false. That means it's > only the things that you are already assuming are plugins, right? If > so, why is this even done? That simply means that we're never removing .la files for plugins (right now) because plugin loaders may need them with shared linking. The other case are regular libraries where .la files are removed as described above. > 2. What happens if I call it with `remove_libtool_files all=20 > only-not-required`? Nobody ever does any checking of the # of args. Will add. > > > > + # remove .la files only > > > > when .pc files provide the libs > > > > + # already or they don't give > > > > any information > > > > + ! has $(basename "${f}") > > > > ${pc_libs} \ > > > > + && [[ -n > > > > "$(sed -n \ > > >=20 > > > The comment says "or" but I see an "and" here. > >=20 > > Because everything's negated here. Boolean magic :D. >=20 > OK, got it. Stop writing confusing logic. =3DP It's confusing because of that 'continue', I guess ;P. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/RGQbFaXUvgJ3x7N0wd9VoMZ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iJwEAQEIAAYFAk5u+v8ACgkQfXuS5UK5QB3xyQQAnscr0BMpm/FR2vGtn83AsUP2 SOjQ6oR8DgNxGSoY/I1t+kPgE0ovtHtzYIv4fToJTfnPZI2/D5Wp0y8HMrlwTMIC xNJpAsqcnrHDAnrSgx/bM7T1AXwb5Femeno8IUqdAfbFxrT++kdhQ/HybqB9k8/X HKdjBxqhE4VPoWSir78= =sNrd -----END PGP SIGNATURE----- --Sig_/RGQbFaXUvgJ3x7N0wd9VoMZ--