make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett
Often I hear people complain about one lacking in FreeBSD's make(1), if an error is encountered in a Makefile, we only get the base of its name: what is passed to ReadMakefile(). This is confusing for people trying to debug Makefiles, I am told, and really, there's no reason not to always give

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter
Why do people think that a realpath is always available? What is wrong with just extending using pwd? And maybe optionally stripping .. and . elements if wanted. At least pwd doesn't break amd(8) pathnames. It became nearly impossible to use amd(8) today just because of all that realpath

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett
On Sun, May 19, 2002 at 03:21:59PM +0200, Bernd Walter wrote: Why do people think that a realpath is always available? Because the manual page doesn't say it isn't. What is wrong with just extending using pwd? That won't handle . and .. and relative paths spanning symbolic links, which you

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter
On Sun, May 19, 2002 at 02:00:04PM +, J. Mallett wrote: On Sun, May 19, 2002 at 03:21:59PM +0200, Bernd Walter wrote: Why do people think that a realpath is always available? Because the manual page doesn't say it isn't. What is wrong with just extending using pwd? That won't

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett
On Sun, May 19, 2002 at 05:34:28PM +0200, Bernd Walter wrote: I even can't buildworld on another machine without taking care of realpath. If I don't enshure that the source has the same realpath on the machine to run installworld as it had on the machine where I did the buildworld it

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter
On Sun, May 19, 2002 at 04:27:10PM +, J. Mallett wrote: On Sun, May 19, 2002 at 05:34:28PM +0200, Bernd Walter wrote: I even can't buildworld on another machine without taking care of realpath. If I don't enshure that the source has the same realpath on the machine to run

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett
On Sun, May 19, 2002 at 06:56:40PM +0200, Bernd Walter wrote: I'm ``blindly'' using the only answer we have to a question: how can I get an absolute (thus unique) path to an object in the filesystem. Forget it - it's not possible with FreeBSD (see below). I'm just a bit frustrated about

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter
On Sun, May 19, 2002 at 05:27:47PM +, J. Mallett wrote: On Sun, May 19, 2002 at 06:56:40PM +0200, Bernd Walter wrote: I'm ``blindly'' using the only answer we have to a question: how can I get an absolute (thus unique) path to an object in the filesystem. Forget it - it's not

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett
On Sun, May 19, 2002 at 08:47:29PM +0200, Bernd Walter wrote: Look at getcwd_logical() in pwd.c Aha - but that does mean trusting $PWD. The only thing that can keep track of where we started vs. where we cd to is the shell, and so we'd have to trust what it says PWD is. A possible

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter
On Sun, May 19, 2002 at 07:17:39PM +, J. Mallett wrote: On Sun, May 19, 2002 at 08:47:29PM +0200, Bernd Walter wrote: Look at getcwd_logical() in pwd.c Aha - but that does mean trusting $PWD. The only thing that can keep track of where we started vs. where we cd to is the

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Terry Lambert
Bernd Walter wrote: Why do people think that a realpath is always available? Because it would be really convenient if we could program without having to remember on line 17 what we did on line 3, because we have really, really short attention spans. While we are at it, wouldn't it be nice if

Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett
On Sun, May 19, 2002 at 01:21:49PM -0700, Terry Lambert wrote: Bernd Walter wrote: Why do people think that a realpath is always available? Because it would be really convenient if we could program without having to remember on line 17 what we did on line 3, because we have really, really