autoconf
[Top][All Lists]
Advanced

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

Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0


From: Daniel Jacobowitz
Subject: Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0
Date: Thu, 12 Feb 2004 00:05:53 -0500
User-agent: Mutt/1.5.1i

On Wed, Feb 11, 2004 at 12:33:52PM -0800, Paul Eggert wrote:
> Jim Meyering <address@hidden> writes:
> 
> > I've never heard of a shell performing the // -> / substitution
> > indiscriminately.
> 
> Me neither.
> 
> Autoconf is littered with code like this:
> 
>   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
>   ac_i=`echo "$ac_i" | sed "$ac_script"`

By the way, something I noticed a few months ago when fixing quoting
bugs in GCC: this style of code triggers all sorts of problems with dash
(formerly called ash) at least as of 0.4.21 and a few earlier versions.
For example:

$ a='a\b'
$ set | grep '^a='
a='a\b'
$ echo "$a"
a
$

i.e. the \b is processed.  This interacts very badly with
--program-transform-name='s/g\(.*\)/g\1-3.4/', because autoconf eats
the backslashes.  POSIX appears to allow this behavior.  Using here
documents works:

$ cat <<EOF
> $a
> EOF
a\b
$

I don't know if ash is considered an unsuitable shell.  I know Debian
used to allow it to be used as /bin/sh and no longer does.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer




reply via email to

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