%% Randall Meadows <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
