make: evaluation of symbolic link with ../ fails
Mike Meyer
mwm at mired.org
Thu Nov 8 19:40:03 PST 2007
On Tue, 06 Nov 2007 17:20:14 +0100 "Julian H. Stacey" <jhs at berklix.org> 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 !
That's not a bug, that's a feature. When symlinks were introduced in
4.1c (or thereabouts), people were often surprised to do:
$ cd /some_path/child
$ ...
$ cd ..
and not wind up in /some_path, or having the ever popular sh loop:
$ for dir in <list of subdirs>
$ do
$ cd $dir
$ ...
$ cd ..
$ done
start working on something totally unrelated to the current directory
halfway through the loop. So sh (and etc.) added a feature so that
those things worked the way users expected them to.
Basically, the shells don't make a false premise that /some_path/.. ==
/some_path, they make the premise appear to be true as a feature.
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
More information about the freebsd-hackers
mailing list