make: Circular foo.c <- foo.c dependency dropped.
make: `../b/foo.c' is up to date.
Is it possible to solve it using VPATH?
I don't think so. VPATH is to find prerequisites, not targets.
The pattern matched by % is the same on both sides of the ":". And since
foo.c: foo.c is the same file, it is circular. In your case, you can fix
it with:
VPATH=../b
../a/%.c: %.c
cp $< $@
Then from test_make/a you type:
make ../a/foo.c
The the path/filename cannot be the same for targets and their
prerequisites otherwise it is circular.
Martin
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make