From owner-freebsd-current Sun May 19 6:22:19 2002 Delivered-To: freebsd-current@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id AB53C37B413; Sun, 19 May 2002 06:22:11 -0700 (PDT) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.3/8.12.3) with ESMTP id g4JDM2Hc052172 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Sun, 19 May 2002 15:22:04 +0200 (CEST) (envelope-from ticso@cicely5.cicely.de) Received: from cicely5.cicely.de (localhost [IPv6:::1]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g4JDM095062434 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 19 May 2002 15:22:00 +0200 (CEST)?g (envelope-from ticso@cicely5.cicely.de) Received: (from ticso@localhost) by cicely5.cicely.de (8.12.1/8.12.1/Submit) id g4JDM0pK062433; Sun, 19 May 2002 15:22:00 +0200 (CEST)?g (envelope-from ticso) Date: Sun, 19 May 2002 15:21:59 +0200 From: Bernd Walter To: "J. Mallett" Cc: freebsd-current@FreeBSD.ORG Subject: Re: make(1) patch to ReadMakefile() to use realpath(3) Message-ID: <20020519132159.GI44753@cicely5.cicely.de> References: <20020519100420.GA8356@FreeBSD.ORG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020519100420.GA8356@FreeBSD.ORG> User-Agent: Mutt/1.3.26i X-Operating-System: FreeBSD cicely5.cicely.de 5.0-CURRENT i386 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 introduced breakage. On Sun, May 19, 2002 at 10:04:21AM +0000, J. Mallett wrote: > 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 the > real path to what is passed to ReadMakefile(). > > Therefore, I would like to ask for review of the following patch to main.c > http://people.freebsd.org/~jmallett/make.main.c.realpath.diff > > There is of course the edge case that Dir_FindFile will be used, and it > will somehow give us something that is not a meaningful path. This is > not all that likely, but if it is, I have a patch I use locally which > tells Dir_FindFile to *always* use real paths. This bloats a buildworld > log a tad, oh well, you might find it useful. I'm mostly concerned about > getting the main.c patch reviewed and committed, but here is a patch for > dir.c as well as main.c > http://people.freebsd.org/~jmallett/make.realpath.diff > > One could easily argue though that the dir.c patch will represent an > overhead increase withotu a real gain. > > Because I'm not sure of that, and because what sparked me digging out > these patches from my local make(1) is the FreeBSD user community, I'm > asking for thoughts, opinions, review, and flames from you guys, the > FreeBSD -CURRENT users. If there's anyone who can blow a whole through > this idea, or endorse it enough to make me commit it, it's you guys. > > Here's a small example of what this results in, with "foo/Makefile" being > broken: > > Without these patches: > ref5% make > ===> foo > "Makefile", line 1: Need an operator > make: fatal errors encountered -- cannot continue > *** Error code 1 > > Stop in /d/home/jmallett. > ref5% > > > You can see how one might be confused as to which Makefile that refers. > > With these patches: > ref5% ~/jmake > ===> foo > "/d/home/jmallett/foo/Makefile", line 1: Need an operator > jmake: fatal errors encountered -- cannot continue > *** Error code 1 > > Stop in /d/home/jmallett. > ref5% > > Much clearer. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message