From owner-freebsd-arch Sat Mar 15 14:19: 9 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7842337B404 for ; Sat, 15 Mar 2003 14:19:07 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id E465143F85 for ; Sat, 15 Mar 2003 14:19:03 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) by whale.sunbay.crimea.ua (8.12.8/8.12.8/Sunbay) with ESMTP id h2FMIveK056076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 16 Mar 2003 00:18:57 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.8/8.12.8/Submit) id h2FMIuHS056071; Sun, 16 Mar 2003 00:18:56 +0200 (EET) (envelope-from ru) Date: Sun, 16 Mar 2003 00:18:56 +0200 From: Ruslan Ermilov To: Alexander Leidinger Cc: arch@FreeBSD.ORG Subject: Re: Bug in our make or undocumented feature? Message-ID: <20030315221856.GB54789@sunbay.com> References: <20030315165221.27d3d424.Alexander@Leidinger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8GpibOaaTibBMecb" Content-Disposition: inline In-Reply-To: <20030315165221.27d3d424.Alexander@Leidinger.net> User-Agent: Mutt/1.5.3i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --8GpibOaaTibBMecb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 15, 2003 at 04:52:21PM +0100, Alexander Leidinger wrote: > Hi, >=20 > this part of a makefile doesn't work for me: > ---snip--- > WANTED_PORTS=3D shells/zsh lang/perl5 >=20 > mytarget: > .for i in ${WANTED_PORTS} > @echo "${i}" > .if ${i} =3D=3D lang/perl5 =20 > @echo "Yep, perl5." > .endif > .endfor > ---snip--- >=20 This is the nasty implementation of the .for operator. It works by duplicating the lines for each argument, substituting the value, so the above would be evaluate like this, so that i isn't a real variable: mytarget: @echo "shells/zsh" =2Eif shells/zsh =3D=3D lang/perl5 =20 @echo "Yep, perl5." =2Eendif @echo "lang/perl5" =2Eif lang/perl5 =3D=3D lang/perl5 =20 @echo "Yep, perl5." =2Eendif After that, the (recently documented) rule requiring the LHS of the test to be a variable should be applied. P.S. -arch was a bad choice for mailing this. Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --8GpibOaaTibBMecb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+c6bQUkv4P6juNwoRApO1AJoCGeZcVdY0H11Za834BbbSWD7TtwCfdUUs ptSxLDEydClutHzucH5sEL0= =wzER -----END PGP SIGNATURE----- --8GpibOaaTibBMecb-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message