Subject: Re: Regexp with "exists" expression? (BSD make)
To: Juan RP <juan@netbsd.graffitipr.org>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-pkg
Date: 06/21/2004 09:03:27
On Mon, 21 Jun 2004 00:48:27 +0200
Juan RP <juan@netbsd.graffitipr.org> wrote:

> 
> Hi,
> 
> There is a problem with OpenBSD and mk/pthread.buildlink3.mk, the
> pthread library is just installed as "libpthread.so.X.X" but there are not
> "foo.so" or "foo.so.X", and BUILDLINK_LDADD.pthread is empty...
> 
> I would like to use a regexp with the "exists" option in BSD make, like:
> 
> .if exists(/foo.*)
> 	<blah>
> .endif
> 
> Is it possible? is there any other way to solve this problem?

I guess something like...

_FILES!= ${LS} -d /some/directory/foo.*
.if !empty(_FILES)
blahblah
.endif

can do the trick.

-- 
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/