Technically its not that I want make to guess, but I wanted it to follow the rules sequentially, not read it all at once :)
Thanks for your explanation and especially for your link, it was interesting. If you've got any other links please send. Med vennlig hilsen Odne Hellebø On 26 January 2015 at 05:19, Paul Smith <psm...@gnu.org> wrote: > 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