Subject: Re: make: .if exists weirdness
To: Jan Schaumann <>
From: Todd Vierling <>
List: tech-pkg
Date: 07/11/2003 23:41:57
On Fri, 11 Jul 2003, Jan Schaumann wrote:

: > > : FILE1=  ${PREFIX}/lib/
: > > : FILE2=  /usr/pkg/lib/
: > > : .if exists(${FILE1})

: Aaaarg, but the file in question did actually set PREFIX=${LOCALBASE} at
: the end of the Makefile, *after*  I had not noticed that.
: If I put the test below that, it works as one would expect.
: Still, I'm puzzled as to why it would work on some files but not on
: others.

If it's not working on "${PREFIX}/lib/":  Print the value that this
has at .if time, and look at it carefully.  Is PREFIX ending up as
${X11BASE} before it is reset, and do you happen also to have a
/usr/X11R6/lib/ that points at never-never land?  One thing to check
is that the XF86 v4 sets have a .so pointing to "", but you might
not have that in the directory.

-- Todd Vierling <>