if exists statement

Coleman Kane zombyfork at gmail.com
Mon Dec 18 22:42:52 PST 2006


On 12/18/06, Beech Rintoul <freebsd at alaskaparadise.com> wrote:
>
> I'm trying to write an if exists for a port makefile.
>
> I tried:
>
> .if exists= ${PREFIX}/etc/rc.d
> exit
> else
> ${MKDIR} ${PREFIX}/etc/rc.d
> .endif
>
> but it doesn't work.
>
> Can someone give me the right syntax?
>
> TIA
>
> Beech
> --


I think you want something like:
.if exists($(PREFIX)/etc/rc.d)

...


--
Coleman Kane


More information about the freebsd-hackers mailing list