bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing resolution of $^ in make


From: Paul D. Smith
Subject: Re: Changing resolution of $^ in make
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 <address@hidden>          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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]