Subject: Re: CVS commit: src/usr.bin/make
To: David Laight <dsl@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: source-changes
Date: 10/15/2007 13:01:10
On Sat, 13 Oct 2007, David Laight wrote:
> 	src/usr.bin/make: parse.c
>
> When processing .include "../../foo.mk" lexically process the leading ../
> against the directory name of the makefile being processed.

I see the attraction of this lexical processing, but it won't always
work in the presence of symlinks to directories.

You could use stat(2) to check that the paths before and after lexically
removing "." or ".." components actually refer to the same directory,
and give up on the lexical processing if they are different.

--apb (Alan Barrett)