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 <[EMAIL PROTECTED]> 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



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to