Subject: Re: Changing resolution of $^ in make
From: "Paul D. Smith" <[email-masked]>
To: Robert Mecklenburg <[email-masked]>
Cc: [email-masked], Cygwin Users List <[email-masked]>
Date: Tue, 8 Oct 2002 16:36:16 -0400

%% 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 <[email-masked]>          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/