autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with symlinks and VPATH Builds


From: Eric Siegerman
Subject: Re: Problem with symlinks and VPATH Builds
Date: Thu, 1 Aug 2002 13:46:05 -0400
User-agent: Mutt/1.2.5i

On Thu, Aug 01, 2002 at 07:20:33AM -0700, Paul Eggert wrote:
> -Setting @code{CDPATH} to the empty value is not enough for most shells.
> -A simple path separator is enough except for @code{zsh}, which prefers a
> -leading dot:
> [...]
> +To work around the problem, Autoconf-generated scripts unset
> address@hidden if possible, and set @code{CDPATH} to
> address@hidden if @command{unset} is not available.

Looks good, except that the leading "." to pacify zsh got lost
in the shuffle.

> @@ -9654,7 +9657,7 @@ if (unset FOO) >/dev/null 2>&1; then
>  else
>    unset=false
>  fi
> -$unset CDPATH || CDPATH=:
> +$unset CDPATH || CDPATH=$PATH_SEPARATOR
>  @end example

That "." wasn't here even in the old version, but probably should be.


Seems to me that CDPATH's primary effect (messing with where "cd"
takes you) is just as undesirable as the side-effect under
discussion (verbosity), so both should be disabled.  But one
appears a lot harder than the other to do portably.  So why not:

  - Disable the primary effect as Paul suggests:
        $unset CDPATH || CDPATH=$PATH_SEPARATOR

  - Rather than trying to disable the verbosity in a highly
    non-portable way, work around it in a portable (though ugly)
    way:
        abs=`cd $rel >/dev/null && pwd`

Hmmm, time for a CANONICALIZE_PATHNAME macro?  Bonus: it could be
made to work with pathnames other than directories.

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
Anyone who swims with the current will reach the big music steamship;
whoever swims against the current will perhaps reach the source.
        - Paul Schneider-Esleben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]