Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2002 19:17:39 +0000
From:      "J. Mallett" <jmallett@FreeBSD.ORG>
To:        Bernd Walter <ticso@cicely5.cicely.de>
Cc:        "J. Mallett" <jmallett@FreeBSD.ORG>, freebsd-current@FreeBSD.ORG
Subject:   Re: make(1) patch to ReadMakefile() to use realpath(3)
Message-ID:  <20020519191739.GB5431@FreeBSD.ORG>
In-Reply-To: <20020519184728.GN44753@cicely5.cicely.de>
References:  <20020519100420.GA8356@FreeBSD.ORG> <20020519132159.GI44753@cicely5.cicely.de> <20020519140003.GA19399@FreeBSD.ORG> <20020519153428.GK44753@cicely5.cicely.de> <20020519162710.GA19228@FreeBSD.ORG> <20020519165639.GL44753@cicely5.cicely.de> <20020519172746.GA16770@FreeBSD.ORG> <20020519184728.GN44753@cicely5.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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 pseudo-solution would be to give our *build system* (note:
NOT the make program) a .TOPDIR variable which would be intiailised to
something sane to begin with, and build relative/logical paths on top
of it, i.e.
	.TOPDIR + realpath(".") - (realpath(.TOPDIR) - .TOPDIR)

To get the current directory.

But damn that's messy, damn that's a lot of overhead, and I think at that
point we're really stretching how much can be gained from such things.
-- 
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020519191739.GB5431>