|
From: | Martin d Anjou |
Subject: | Re: dependencies in other folders |
Date: | Sun, 31 Aug 2008 11:01:04 -0400 (EDT) |
User-agent: | Alpine 1.10 (LNX 962 2008-03-14) |
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.cThe the path/filename cannot be the same for targets and their prerequisites otherwise it is circular.
Martin
[Prev in Thread] | Current Thread | [Next in Thread] |