Subject: Re: make: Dir_FindFile still broken
To: Christos Zoulas <>
From: Simon J. Gerraty <>
List: tech-toolchain
Date: 11/13/2002 12:34:47
>>On Tue, 12 Nov 2002 10:27:41 -0800 (PST), Simon Gerraty writes:
>>>I'm still looking at the diffs for rev 1.32 and 1.27 to spot what to
>>>do about it.
>>Is the following fix too ugly?

>I'd rather examine why the lookup does not stop when the first
>one is found.

Do you mean when say cat.c was first found as ../../src/bin/cat/cat.c ?
It does, but then ../../src/bin/cat/cat.c ends up in .depend (a side effect
of using gcc's -MD to automatically update dependencies), so on
the next build make looks for ../../src/bin/cat/cat.c instead of cat.c
and absent this change or some other fix, will find 
../../src/bin/cat/../../src/bin/cat/cat.c and so on and so forth.

I guess the real root cause of this is the fact that when you
to clear .PATH, the original 'dot' which has an absolute path is left
which requires a releative path to .CURDIR to be added as well as .DOTLAST
to get the desired behaviour.