Date: Mon, 17 Jan 2011 21:49:01 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Jason Helfman <jhelfman@e-e.com> Cc: ports@freebsd.org, Ruslan Mahmatkhanov <cvs-src@yandex.ru> Subject: Re: New port needs review: net/erlyvideo Message-ID: <4D34B94D.305@infracaninophile.co.uk> In-Reply-To: <20110117202625.GA55917@eggman.experts-exchange.com> References: <11111295127072@web122.yandex.ru> <4D3329FE.7020901@yandex.ru> <20110116204416.GA1654@eggman.experts-exchange.com> <4D3361B3.40201@yandex.ru> <20110116214557.GA2179@eggman.experts-exchange.com> <4D34A312.8060808@yandex.ru> <20110117202625.GA55917@eggman.experts-exchange.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig459B8F78EF5E4277F1914CD0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 17/01/2011 20:26, Jason Helfman wrote: >> .for dir in /var/lib/${PORTNAME}/movies /var/lib/${PORTNAME}/plugins >> \ /var/log/${PORTNAME} ${ETCDIR} ${ERLYDIR} ${WWWDIR} >> ${MKDIR} ${dir} >> .endfor >> """ This snippet needs to be associated with some sort of make target or it will never get run. You can do something like this: DIRS=3D /var/lib/${PORTNAME}/movies \ /var/lib/${PORTNAME}/plugins \ /var/log/${PORTNAME} \ ${ETCDIR} ${ERLYDIR} ${WWWDIR} =2Efor dir in $DIRS dirs :: ${dir} ${MKDIR} ${.TARGET} =2Eendfor Or you could have just one target and put a shell loop as the action: DIRS=3D ... dirs : for d in ${DIRS} ; do \ ${MKDIR} $$d ; \ done Note the backslashes so that make(1) executes all of that as one command, and the required use of ';' to mark the end of the different shell statements. > I believe you need to do this: >=20 > ${MKDIR} $${dir} No -- that's not the case here. You need to do this if you have a shell for-loop as part of the action of a target (the second example above), as $$ causes make to pass a literal $ through to the underlying shell, rather than expanding it as a make(1) variable. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig459B8F78EF5E4277F1914CD0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk00uVcACgkQ8Mjk52CukIw1UACgjoiPiam5A9S6unZ5LtEcYVrf jGMAnjGbsX9hmOs8jzKS8HiCpQpqAHBh =Ofqq -----END PGP SIGNATURE----- --------------enig459B8F78EF5E4277F1914CD0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D34B94D.305>