Re: ensure a VPATH build (was: new macro)

2006-02-18 Thread Keith Marshall
On Friday 17 February 2006 1:12 pm, Ralf Wildenhues wrote: > >   pwd_curdir="`$1`" > >   pwd_srcdir="`cd $srcdir && $1`" > > The double quotes are not necessary here. Not just unnecessary, but positively harmful. Several shells will fail to parse this correctly, *including* the MSYS version of b

Re: ensure a VPATH build

2006-02-18 Thread Ralf Wildenhues
Hi Keith, * Keith Marshall wrote on Sat, Feb 18, 2006 at 11:26:30AM CET: > On Friday 17 February 2006 1:12 pm, Ralf Wildenhues wrote: > > >   pwd_curdir="`$1`" > > >   pwd_srcdir="`cd $srcdir && $1`" > > > > The double quotes are not necessary here. > > Not just unnecessary, but positively harmfu

Re: ensure a VPATH build

2006-02-18 Thread Ralf Wildenhues
* Keith Marshall wrote on Sat, Feb 18, 2006 at 01:18:07PM CET: > On Saturday 18 February 2006 10:51 am, Ralf Wildenhues wrote: > > > > Ouch. I was referring to the fact that, on the right hand side of > > shell assignments, no word splitting is done. So > > foo=`echo bar baz` > > > > will assig

Re: ensure a VPATH build

2006-02-18 Thread Keith Marshall
On Saturday 18 February 2006 10:51 am, Ralf Wildenhues wrote: > * Keith Marshall wrote on Sat, Feb 18, 2006 at 11:26:30AM CET: > > On Friday 17 February 2006 1:12 pm, Ralf Wildenhues wrote: > > > >   pwd_curdir="`$1`" > > > >   pwd_srcdir="`cd $srcdir && $1`" > > > > > > The double quotes are not n

Re: ensure a VPATH build

2006-02-18 Thread Keith Marshall
On Saturday 18 February 2006 12:53 pm, Ralf Wildenhues wrote: > I'm sorry, but please be more precise and quote which part of the node > you mean.  I cannot find this exact bug described there (CVS Autoconf). >From autoconf-2.59 |File: autoconf.info, Node: Shell Substitutions, Next: Assignments,

double-quoted command substitutions (was: ensure a VPATH build)

2006-02-18 Thread Ralf Wildenhues
Keith Marshall writes: > > From autoconf-2.59 > |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 `"`...\"...\

Re: ensure a VPATH build

2006-02-18 Thread Keith Marshall
On Saturday 18 February 2006 12:53 pm, Ralf Wildenhues wrote: > > > Could you confirm that the bug also exists with assignments? > >  > > I'm not sure.  I'd never actually encountered the problem with bash, > > before this particular MSYS bug report.  However, I had previously > > encountered it in

Re: double-quoted command substitutions (was: ensure a VPATH build)

2006-02-18 Thread Keith Marshall
On Saturday 18 February 2006 3:38 pm, Ralf Wildenhues wrote: > I have tried the MSYS shell now.  I can reproduce the bug mentioned in > the URLs there, but not on Cygwin, neither with bash on any other > system I could find, nor with /bin/sh on FreeBSD 5.4, OpenBSD 3.8, AIX > 4.3.3 HP-UX 10.20, IRI

Re: ensure a VPATH build

2006-02-18 Thread Andreas Schwab
Keith Marshall <[EMAIL PROTECTED]> writes: > Where is it *ever* necessary? The backticks themselves serve as quotes. This is wrong. The expansion of a command substitution is subject to word splitting and filename expansion, unless quoted. Especially the latter is most serious. > A string suc

Re: ensure a VPATH build

2006-02-18 Thread Andreas Schwab
Keith Marshall <[EMAIL PROTECTED]> writes: > Nevertheless, it does seem that avoiding backquoted expressions within > double quotes where possible, can lead to more robust and portable > scripts. I disagree. Not quoting the output of a command substitution is a bug waiting to happen. Andreas.