[SCM] GNU Autoconf source repository branch, master, updated. v2.67-46-g2626155
"Eric Blake" <[email protected]> Mon, 30 Aug 2010 17:24:49 +0000
| Newsgroups | gmane.comp.sysutils.autoconf.cvs |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".
http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=2626155d5cb3a7693f5e71c26cc64e4dd677f71d
The branch, master has been updated
via 2626155d5cb3a7693f5e71c26cc64e4dd677f71d (commit)
from 30378453ea71e8a53c3dcc401ffa64b43353a64b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2626155d5cb3a7693f5e71c26cc64e4dd677f71d
Author: Eric Blake <[email protected]>
Date: Mon Aug 30 11:11:32 2010 -0600
docs: mention Solaris here-docs vs. ${a-"b c"}
* doc/autoconf.texi (Shell Substitutions) <${var:=value}>:
Document problem of "" within here-docs.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
doc/autoconf.texi | 26 ++++++++++++++++++++++++--
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5d3ac87..7068a19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-08-30 Eric Blake <[email protected]>
+ docs: mention Solaris here-docs vs. ${a-"b c"}
+ * doc/autoconf.texi (Shell Substitutions) <${var:=value}>:
+ Document problem of "" within here-docs.
+ Reported by Ralf Wildenhues.
+
fortran: always avoid AC_LANG_CONFTEST warning
* lib/autoconf/lang.m4 (AC_LANG_CONFTEST()): Make the default
match the fact that the default AC_LANG_SOURCE does not inline
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 840b4fe..923fff6 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -15466,7 +15466,8 @@ use null variable substitution patterns in configure scripts.
@cindex $@{@var{var}+@var{value}@}
When using @samp{$@{@var{var}-@var{value}@}} or
@samp{$@{@var{var}-@var{value}@}} for providing alternate substitutions,
-@var{value} must either be a single shell word or be quoted. Solaris
+@var{value} must either be a single shell word, quoted, or in the
+context of an unquoted here-document. Solaris
@command{/bin/sh} complains otherwise.
@example
@@ -15476,12 +15477,17 @@ $ @kbd{/bin/sh -c 'echo $@{a-'\''b c'\''@}'}
b c
$ @kbd{/bin/sh -c 'echo "$@{a-b c@}"'}
b c
+$ @kbd{/bin/sh -c 'cat <<EOF
+$@{a-b c@}
+EOF}
+b c
@end example
According to Posix, if an expansion occurs inside double quotes, then
the use of unquoted double quotes within @var{value} is unspecified, and
any single quotes become literal characters; in that case, escaping must
-be done with backslash.
+be done with backslash. Likewise, the use of unquoted here-documents is
+a case where double quotes have unspecified results:
@example
$ @kbd{/bin/sh -c 'echo "$@{a-"b c"@}"'}
@@ -15498,6 +15504,22 @@ $ @kbd{/bin/sh -c 'a=; echo "$@{a+\"b c\"@}"'}
"b c"
$ @kbd{/bin/sh -c 'a=; echo "$@{a+b c@}"'}
b c
+$ @kbd{/bin/sh -c 'cat <<EOF
+$@{a-"b c"@}
+EOF'}
+"b c"
+$ @kbd{/bin/sh -c 'cat <<EOF
+$@{a-'b c'@}
+EOF'}
+'b c'
+$ @kbd{bash -c 'cat <<EOF
+$@{a-"b c"@}
+EOF'}
+b c
+$ @kbd{bash -c 'cat <<EOF
+$@{a-'b c'@}
+EOF'}
+'b c'
@end example
Perhaps the easiest way to work around quoting issues in a manner
hooks/post-receive
--
GNU Autoconf source repository