[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ensure a VPATH build
From: |
Keith Marshall |
Subject: |
Re: ensure a VPATH build |
Date: |
Sat, 18 Feb 2006 14:25:58 +0000 |
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,
|Prev: File System Conventions, Up: Portable Shell
|
|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!).
Granted, that's referring primarily to nested double quotes, with
backtick substitution, but there is an inference that the two interact in
a non-portable manner, which is best avoided.
Regards,
Keith.
- new macro, Julien Lecomte, 2006/02/16
- ensure a VPATH build (was: new macro), Ralf Wildenhues, 2006/02/17
- Re: ensure a VPATH build (was: new macro), Keith Marshall, 2006/02/18
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/18
- Re: ensure a VPATH build, Keith Marshall, 2006/02/18
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/18
- Re: ensure a VPATH build,
Keith Marshall <=
- double-quoted command substitutions (was: ensure a VPATH build), Ralf Wildenhues, 2006/02/18
- Re: double-quoted command substitutions (was: ensure a VPATH build), Keith Marshall, 2006/02/18
- Re: ensure a VPATH build, Keith Marshall, 2006/02/18
- Re: ensure a VPATH build, Andreas Schwab, 2006/02/18
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/19
- Re: ensure a VPATH build, Keith MARSHALL, 2006/02/21
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/21
- Possible zsh contention in pdfroff (Re: [autoconf] ensure a VPATH build), Keith MARSHALL, 2006/02/21
- Re: [Groff] Possible zsh contention in pdfroff (Re: [autoconf] ensure a VPATH build), Pedro A. López-Valencia, 2006/02/22
- Re: ensure a VPATH build, Andreas Schwab, 2006/02/18