Paul D. Smith wrote:

%% Ronald Landheer-Cieslak <[EMAIL PROTECTED]> writes:

  rl> %.d : $(srcdir)/$(subst .d,.c,$@)
  rl>        blah

  rl> $@, however, is empty here (as the docs duely indicate).

Why not just use the obvious:

    %.d : $(srcdir)/%.c

?  That's what pattern rules are for, after all...

because the obvious doesn't work if there's a pathname in the target filename (i.e. target == dir/file.d, prereq would become dir/$(srcdir)/file.c because the stem of the pattern is "file", not "dir/file").

rlc



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

Reply via email to