Subject: Re: Makefile targets and variables
To: Mike M. Volokhov <mishka@terabyte.com.ua>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-pkg
Date: 09/08/2003 17:26:41
On Mon, 08 Sep 2003 18:11:40 +0300
"Mike M. Volokhov" <mishka@terabyte.com.ua> wrote:
> > make evaluates expressions while the file is beeing read. If the variable
> > is not defined at that point (which happens with WRKSRC, which is defined by
> > bsd.pkg.mk), then its value will be unset, and this is why make tries to
> > locate /some-file.
>
> Aha! A'll see now. Many thanks. :)
>
> But it is impossible declare targets *after* inclusion of other files due
> to duplication of target definitions. What might be common workaround for
> this problem? In my own case I can use shell and test(1), but it is possible
> to use make(1) builtins?
Why do you need to check for the presence of a file in WRKSRC?
--
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/