From owner-freebsd-current Sun May 19 3: 3:38 2002 Delivered-To: freebsd-current@freebsd.org Received: from durham-ar1-4-64-252-019.durham.dsl-verizon.net (durham-ar1-4-64-252-019.durham.dsl-verizon.net [4.64.252.19]) by hub.freebsd.org (Postfix) with SMTP id 9704C37B403 for ; Sun, 19 May 2002 03:03:24 -0700 (PDT) Received: (qmail 31304 invoked by uid 1001); 19 May 2002 10:04:21 -0000 Date: Sun, 19 May 2002 10:04:21 +0000 From: "J. Mallett" To: freebsd-current@FreeBSD.org Subject: make(1) patch to ReadMakefile() to use realpath(3) Message-ID: <20020519100420.GA8356@FreeBSD.ORG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i Organisation: The FreeBSD Project 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 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. Thanks in advance. -- jmallett@FreeBSD.org | C, MIPS, POSIX, UNIX, BSD, IRC Geek. http://www.FreeBSD.org | The Power to Serve Vote for me for FreeBSD core or the cute little bunny gets it. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message