help-make
[Top][All Lists]
Advanced

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

confused about VPATH/vpath and how directory searches work for targets


From: Robert P. J. Day
Subject: confused about VPATH/vpath and how directory searches work for targets
Date: Mon, 14 Jun 2004 14:17:43 -0400 (EDT)

  i've read the section on "How Directory Searches are Performed", and i'm
still suitably confused about how directory searches relate to *targets*.

  with pre-reqs, it seems straightforward -- vpath's and VPATH's are used 
to find the pre-requisites and, according to section 4.5.1, if i have a 
rule that reads:

foo.o : foo.c

and a directory search is run for foo.c, then the eventual rule might be 
interpreted as 

foo.o : src/foo.c

which is fine.  

  but i'm still unsure how directory search applies to targets.  in 
section 4.5.3, point 1. reads:

" 1. If a target file does not exist at the path specified in the
makefile, directory search is performed."

but if the target file doesn't exist in the current directory, it might 
just be because someone did a clean.   but according to the algorithm, a 
missing target file results in a directory search.  it seems to me that 
this might cause problems if, coincidentally, a target file by that name 
just happens to exist in one of the vpath/VPATH directories, totally 
unbeknownst to the programmer.

doesn't this have the potential to confuse the build process?

rday




reply via email to

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