On 10/04/2011 05:00 PM, Christian Weisgerber wrote:
David Cantrell<david.l.cantr...@gmail.com>  wrote:

pre-fetch:
.if !exists(${DISTDIR}/${DISTNAME}.tar.gz)

The problem I'm hitting is that !exists() is not working as I
think it should.

.if conditions are evaluated on the spot and...

exists() ignores ${DISTDIR} entirely.

... I bet DISTDIR simply isn't set when the condition is evaluated,
because the variable is only assigned a value later on when bsd.port.mk
is included.

make(1) usually uses lazy evaluation, but .if, .for, and := are
evaluated right when their lines are parsed.

Ah, yeah, that makes sense.  I bet that's exactly what's happening.

Thanks,

--
David Cantrell <david.l.cantr...@gmail.com>
WH6DSN | http://blog.burdell.org/

Reply via email to