I have some targets which are relative pathnames with directory components.
I want to generate the prerequisite such that the full path is taken as a stem, without being split, and then the prefix added to that, e.g.: %.target : $(srcdir)/%.source I couldn't figure out why this does not work; I did a make -d and saw some strange reversals. Then I found in the info manual that when the stem is being substituted into the prerequisite pattern, the directory part is split off and put before the prefix! What is the point of this feature? If someone wanted the splitting, could it not have been expressed something like this? $(dir %)/prefix-part/$(basename %)/suffix Nice and self-documenting. Aha! This workaround works for me, but it's a hack: %.target : %.source Why it works is that I already have this: VPATH := $(srcdir) So, the target is generated without the $(srcdir), and then the VPATH logic tacks it on later during the prerequisite search. Any other tricks? _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
