On Mon, 2015-01-26 at 04:15 +0100, Odne Helleb� wrote: > I've narrowed my problem down to this makefile: > > VPATH = folder > > all : test > > > > test : foo > > echo $< > > > > foo : > > touch folder/foo > > > (with formatting here http://sprunge.us/ifWI ) > doing make twice will echo foo and then folder/foo, but I was hoping that > it would be possible to get make to expand rule 3 first so that rule 2 > always give folder/foo
That's not how VPATH works. How should make guess that this is what you want to happen? It turns out that VPATH is only useful for finding _source files_ (that is, files that exist before make starts), not files that are created by make as the result of running rules. It might be helpful to read this: http://make.mad-scientist.net/papers/how-not-to-use-vpath/ _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make