New port needs review: net/erlyvideo

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Jan 17 21:49:21 UTC 2011


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= /var/lib/${PORTNAME}/movies     \
      /var/lib/${PORTNAME}/plugins    \
      /var/log/${PORTNAME}            \
      ${ETCDIR}  ${ERLYDIR} ${WWWDIR}

.for dir  in $DIRS

dirs :: ${dir}
	${MKDIR} ${.TARGET}

.endfor


Or you could have just one target and put a shell loop as the action:

DIRS= ...

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:
> 
>     ${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

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20110117/309913b9/signature.pgp


More information about the freebsd-ports mailing list