This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Changing resolution of $^ in make
- From: "Paul D. Smith" <psmith at gnu dot org>
- To: Robert Mecklenburg <mecklen at cimsoft dot com>
- Cc: bug-make at gnu dot org, Cygwin Users List <cygwin at cygwin dot com>
- Date: Tue, 8 Oct 2002 16:36:16 -0400
- Subject: Re: Changing resolution of $^ in make
- Organization: GNU's Not Unix!
- References: <200210082030.g98KUMF26088@wolf.cimsoft.com>
- Reply-to: "Paul D. Smith" <psmith at gnu dot org>
%% Regarding Changing resolution of $^ in make; you wrote:
rm> vpath %.in /c/work/tmp/src
rm> vpath %.out /c/work/tmp/out
rm> default: stuff/foo.out
rm> # $^
rm> %.out: %.in
rm> touch /c/work/tmp/out/$@
rm> the first time (when the prerequisite "stuff/foo.out" doesn't
rm> exist) , $^ is resolved to "stuff/foo.out". But the second time,
rm> when stuff/foo.out already exists, it is resolved to
rm> "/c/work/tmp/out/stuff/foo.out". Is this behavior correct?
Yes. VPATH/vpath is not appropriate for finding targets, only for
finding source files (that is, files which are not built by make but
which exist a priori).
See my web site below for a longer description of how VPATH/vpath
works.
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/