[SCM] GNU Autoconf source repository branch, master, updated. v2.65-101-g0fc8e49
"Eric Blake" <[email protected]> Wed, 23 Jun 2010 03:34:13 +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=0fc8e49cd5b3a1894a3ca0d9ffc32b364ae87dc5
The branch, master has been updated
via 0fc8e49cd5b3a1894a3ca0d9ffc32b364ae87dc5 (commit)
from 60e32aa3fc8a7c9c312aa6aed3187e4e943b559e (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 0fc8e49cd5b3a1894a3ca0d9ffc32b364ae87dc5
Author: Ralf Wildenhues <[email protected]>
Date: Tue Jun 22 07:29:35 2010 +0200
Further clarification on sed -e portability.
See also http://austingroupbugs.net/view.php?id=262 and
http://austingroupbugs.net/view.php?id=264.
* doc/autoconf.texi (Limitations of Usual Tools) <sed>: Clarify
more about sed -e and Posix limitations.
Signed-off-by: Eric Blake <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
doc/autoconf.texi | 31 ++++++++++++++++++++++---------
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 024a835..c589cce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-22 Ralf Wildenhues <[email protected]>
+ and Eric Blake <[email protected]>
+
+ Further clarification on sed -e portability.
+ * doc/autoconf.texi (Limitations of Usual Tools) <sed>: Clarify
+ more about sed -e and Posix limitations.
+
2010-06-22 Bruno Haible <[email protected]>
Document how to use literal newlines in makefile rules.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 1060955..35c40c8 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -18253,13 +18253,14 @@ but Posix says that this use of a semicolon has undefined effect if
should use semicolon only with simple scripts that do not use these
verbs.
-The argument of the @option{-e} option must be a syntactically complete
-script. GNU @command{sed} allows to pass multiple script fragments,
-each as argument of a separate @option{-e} option, that are then combined,
-with newlines between the fragments. A future Posix revision may allow
-this as well. But in Posix:2008, this is not allowed, and the
-@command{sed} programs on Solaris 10, HP-UX 11, and AIX don't allow it
-either:
+Posix up to the 2008 revision requires the argument of the @option{-e}
+option to be a syntactically complete script. GNU @command{sed} allows
+to pass multiple script fragments, each as argument of a separate
+@option{-e} option, that are then combined, with newlines between the
+fragments, and a future Posix revision may allow this as well. This
+approach is not portable with script fragments ending in backslash; for
+example, the @command{sed} programs on Solaris 10, HP-UX 11, and AIX
+don't allow splitting in this case:
@example
$ @kbd{echo a | sed -n -e 'i\}
@@ -18269,11 +18270,23 @@ $ @kbd{echo a | sed -n -e 'i\' -e 0}
Unrecognized command: 0
@end example
-Commands inside @{ @} brackets are further restricted. Posix says that
+@noindent
+In practice, however, this technique of joining fragments
+through @option{-e} works for multiple @command{sed} functions within
+@samp{@{} and @samp{@}}, even if that is not specified by Posix:
+
+@example
+@c The quote around the closing brace silences interactive zsh.
+$ @kbd{echo a | sed -n -e '/a/@{' -e s/a/b/ -e p -e '@}'}
+b
+@end example
+
+Commands inside @{ @} brackets are further restricted. Posix 2008 says that
they cannot be preceded by addresses, @samp{!}, or @samp{;}, and that
each command must be followed immediately by a newline, without any
intervening blanks or semicolons. The closing bracket must be alone on
-a line, other than white space preceding or following it.
+a line, other than white space preceding or following it. However, a
+future version of Posix may standardize the use of addresses within brackets.
Contrary to yet another urban legend, you may portably use @samp{&} in
the replacement part of the @code{s} command to mean ``what was
hooks/post-receive
--
GNU Autoconf source repository