libtool
[Top][All Lists]
Advanced

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

Re: Spaces in path names


From: Ralf Wildenhues
Subject: Re: Spaces in path names
Date: Fri, 13 Jan 2006 08:23:07 +0100
User-agent: Mutt/1.5.11

* Edward Maros wrote on Thu, Jan 12, 2006 at 11:19:43PM CET:
> Roger While wrote:
> 
> >Actually on Cygwin (and MingW) this whole thing is caused
> >by the following lines in ltmain.sh :
> >
> >      -L*)
> >        dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
> >        # We need an absolute path.
> >        case $dir in
> >        [\\/]* | [A-Za-z]:[\\/]*) ;;
> >        *)
> >          absdir=`cd "$dir" && pwd`
> 
> Have you tried:
> absdir="`cd "$dir" && pwd`"

Completely nonsensical.  Quoting `(autoconf.info)Shell Substitutions':

| Contrary to a persistent urban legend, the Bourne shell does not
| systematically split variables and back-quoted expressions, in
| particular on the right-hand side of assignments and in the argument of
| `case'.  For instance, the following code:
| 
|      case "$given_srcdir" in
|      .)  top_srcdir="`echo "$dots" | sed 's,/$,,'`" ;;
|      *)  top_srcdir="$dots$given_srcdir" ;;
|      esac
| 
| is more readable when written as:
| 
|      case $given_srcdir in
|      .)  top_srcdir=`echo "$dots" | sed 's,/$,,'` ;;
|      *)  top_srcdir=$dots$given_srcdir ;;
|      esac
| 
| and in fact it is even _more_ portable: in the first case of the first
| attempt, the computation of `top_srcdir' is not portable, since not all
| shells properly understand `"`..."..."...`"'.  Worse yet, not all
| shells understand `"`...\"...\"...`"' the same way.  There is just no
| portable way to use double-quoted strings inside double-quoted
| back-quoted expressions (pfew!).

Cheers,
Ralf




reply via email to

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