[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VPATH & implicit rule searches.
From: |
Tristan Van Berkom |
Subject: |
Re: VPATH & implicit rule searches. |
Date: |
Tue, 15 Mar 2005 13:06:18 -0500 |
User-agent: |
Mozilla Thunderbird 0.8 (X11/20040913) |
Paul D. Smith wrote:
[...]
whew, I figured out the problem and got my makefiles to work :)
/me wipes the sweat from his brow
%% Tristan Van Berkom <address@hidden> writes:
tvb> vpath %.d $(THIS_DIR)$(PATCONF) # These expand to relative paths
tvb> vpath %.c $(THIS_DIR)$(PATSRCDIR) # to the config & src directories
tvb> # dependancies from C files
tvb> %.d::%.c
tvb> $(mkdep)
If the pathnames to the %.d and %.c files are different then this rule
cannot work. The stem must be IDENTICAL or the pattern does not match.
But the rule *does* work, only the VPATH mechanism strips the leading
pathname in order to make the match (if I understand correctly that is).
Printing the $@ in the rule yeilds the `file.d' without the path anyway.
The problem turned out to be quite complex, since I include dependancy
files from other directories (for my generated rule set to recurse and
build those dirs if need be), this was stomping my $(CURDIR)/config/*.d
dependancies, I found that if I omit the current directory of dep files
from the include list of external dependancies; everything magicly
works. I only ran into this problem now because I only just started
supporting inter-library dependancies (i.e. only applications used to
include the list of dep files generated in the library subdirs, now
libs include deps from other libs).
Cheers,
-Tristan