Subject: Re: make seems to find the wrong source file
To: Greywolf <greywolf@starwolf.com>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-toolchain
Date: 01/11/2004 14:40:46
On Sun, 11 Jan 2004, Frederick Bruckman wrote:
> David's beef is
> that the implied source is calculated differently when there are
> explicit dependencies, evidently being always the first source in that
> case, which is not intuitive.
Actually, that's not the case at all. Consider:
.SUFFIXES:
.SUFFIXES: .a .b
x.b: foo.a bar.a
.a.b:
echo $<
Now "touch foo.a bar.a; make" gives
echo x.a
x.a
While with
.x.a: foo.a dir/x.a
it's the same as in David's example. So it looks like make is trying
to "do what I mean" with the "dir/".
Frederick