help-make
[Top][All Lists]
Advanced

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

Re: Target search paths?


From: Paul D. Smith
Subject: Re: Target search paths?
Date: Tue, 18 Mar 2003 11:20:19 -0500

%% Randall Meadows <address@hidden> writes:

  rm> I'm trying to add header file dependency knowledge to this Makefile. 
  rm> I've used mkdep to generate a .depend file, and I'm including it in 
  rm> the Makefile. a typical line in it looks like:

  rm> QdBufferedIO.o: ../src/core/QdBufferedIO.c ../inc/QdPlatform.h

  rm> The problem is, the target "QdBufferedIO.o" does not include any path 
  rm> information.  Since there is not ./QdBufferedIO.o relative to the 
  rm> location of the Makefile, it doesn't do anything.  If I include the 
  rm> path information, like

  rm> ../src/core/QdBufferedIO.o: ../src/core/QdBufferedIO.c ../inc/QdPlatform.h

  rm> make then does the right thing.  There doesn't seem to be a way to 
  rm> get mkdep to include the path information for each target, so I 
  rm> figure there must be way to get make to look in various paths for 
  rm> each target.

No.  The right answer is to (a) fix "mkdep", (b) fix the output of mkdep
after you run it, or (c) get a better dependency generator which will
DTRT for paths.

  rm> I see in the GNU Make Manual there is a VPATH variable, but I
  rm> gather it only applies to prerequisites, not to targets.  Is there
  rm> anything analogous for targets?

VPATH is for finding sources (only).  It can't be used to find derived
objects of any sort.

-- 
-------------------------------------------------------------------------------
 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]