]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
docs: issue with shell functions and here-documents on Solaris
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 24 Dec 2011 15:43:36 +0000 (16:43 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 26 Dec 2011 10:33:41 +0000 (11:33 +0100)
* doc/autoconf.texi (Here-Documents): Using a command substitution
in a here-documents being fed to a shell function is unportable.

Problem revealed by the automake testsuite:
<http://lists.gnu.org/archive/html/automake-patches/2011-12/msg00149.html>

ChangeLog
doc/autoconf.texi

index 25799b2841b810f1b26c48c0be8b869bef94f068..8eaf0d7ff192ea736f6d3439d81be87d5f482321 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: issue with shell functions and here-documents on Solaris
+       * doc/autoconf.texi (Here-Documents): Using a command substitution
+       in a here-documents being fed to a shell function is unportable.
+       Problem revealed by the automake testsuite:
+       <http://lists.gnu.org/archive/html/automake-patches/2011-12/msg00149.html>
+
 2011-12-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        AS_LN_S: fall back on 'cp -pR' (not 'cp -p') if 'ln -s' fails
index 0354dfb521439e218daa93f012bebe055b3ab6cf..4c897503ba507a0bdb95a3ac4662723c9d57fc87 100644 (file)
@@ -15239,6 +15239,19 @@ bash-2.04$ @kbd{cat <<EOF
 @end group
 @end example
 
+Using command substitutions in a here-document that is fed to a shell
+function is not portable.  For example, with Solaris 10 @command{/bin/sh}:
+
+@example
+$ @kbd{kitty () @{ cat; @}}
+$ @kbd{kitty <<EOF
+> `echo ok`
+> EOF}
+/tmp/sh199886: cannot open
+$ @kbd{echo $?}
+1
+@end example
+
 Some shells mishandle large here-documents: for example,
 Solaris 10 @command{dtksh} and the UnixWare 7.1.1 Posix shell, which are
 derived from Korn shell version M-12/28/93d, mishandle braced variable