Date: Sun, 16 Mar 2003 00:18:56 +0200 From: Ruslan Ermilov <ru@FreeBSD.ORG> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: arch@FreeBSD.ORG Subject: Re: Bug in our make or undocumented feature? Message-ID: <20030315221856.GB54789@sunbay.com> In-Reply-To: <20030315165221.27d3d424.Alexander@Leidinger.net> References: <20030315165221.27d3d424.Alexander@Leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030315221856.GB54789>