make: evaluation of symbolic link with ../ fails
Jilles Tjoelker
jilles at stack.nl
Tue Nov 6 15:31:44 PST 2007
On Tue, Nov 06, 2007 at 05:20:14PM +0100, Julian H. Stacey wrote:
> It seems to me that all except csh (including bourne shell !) are
> broken !! Amazing ! None of them cope properly actually following
> symbolic links, they all make false premise the /some_path/.. ==
> /some_path !
This may be a little confusing, but is indeed the defined POSIX
behaviour for pwd and cd. $PWD is used to store the "logical" path
(potentially containing symlinks) that was cd'ed to. You can avoid the
special behaviour with the -P (physical) option. cd -P will not treat
symlinks specially and store a pathname not containing symlinks in $PWD;
pwd -P will ignore $PWD and show a pathname not containing symlinks.
A further thing to note is that csh does not have a pwd builtin (you are
supposed to use dirs or prompt substitutions apparently) and that
FreeBSD's /bin/pwd has the -P behaviour by default (you need -L to make
it use $PWD).
--
Jilles Tjoelker
More information about the freebsd-hackers
mailing list