From Paul Eggert and Johan Danielsson.
* doc/autoconf.texi (Limitations of Usual Tools) <sed>:
Reorganize. Document this issue.
* autoupdate.sh (dir): Use `,' as separator instead of `/'
* autoreconf.sh: Likewise.
* autoupdate.sh: Ditto.
+2000-11-16 Akim Demaille <akim@epita.fr>
+
+ POSIX doesn't require s/[^/]// to work.
+ From Paul Eggert and Johan Danielsson.
+
+ * doc/autoconf.texi (Limitations of Usual Tools) <sed>:
+ Reorganize. Document this issue.
+ * autoupdate.sh (dir): Use `,' as separator instead of `/'
+ * autoreconf.sh: Likewise.
+ * autoupdate.sh: Ditto.
+
2000-11-16 Paul Eggert <eggert@twinsun.com>
* m4/largefile.m4 (_AC_SYS_LARGEFILE_SOURCE): Remove, replaced by...
# Variables.
: ${autoconf_dir=${AC_MACRODIR=@datadir@}}
-dir=`echo "$0" | sed -e 's/[^/]*$//'`
+dir=`echo "$0" | sed -e 's,[^/]*$,,'`
# We test "$dir/autoconf" in case we are in the build tree, in which case
# the names are not transformed yet.
for autoconf in "$AUTOCONF" \
# Dump `acconfig.h' but its bottom.
test -r $localdir/acconfig.h &&
- sed -e '/@BOTTOM@/,$d' -e 's/@TOP@//' $localdir/acconfig.h >>$tmp/config.hin
+ sed '/@BOTTOM@/,$d;s/@TOP@//' $localdir/acconfig.h >>$tmp/config.hin
# Dump the templates from `configure.in'.
for verb in `(set) 2>&1 | sed -n -e '/^ac_verbatim/s/^\([^=]*\)=.*$/\1/p' | sort`; do
# Variables.
: ${autoconf_dir=${AC_MACRODIR=@datadir@}}
-dir=`echo "$0" | sed -e 's/[^/]*$//'`
+dir=`echo "$0" | sed -e 's,[^/]*$,,'`
# We test "$dir/autoconf" in case we are in the build tree, in which case
# the names are not transformed yet.
for autoconf in "$AUTOCONF" \
# Dump `acconfig.h' but its bottom.
test -r $localdir/acconfig.h &&
- sed -e '/@BOTTOM@/,$d' -e 's/@TOP@//' $localdir/acconfig.h >>$tmp/config.hin
+ sed '/@BOTTOM@/,$d;s/@TOP@//' $localdir/acconfig.h >>$tmp/config.hin
# Dump the templates from `configure.in'.
for verb in `(set) 2>&1 | sed -n -e '/^ac_verbatim/s/^\([^=]*\)=.*$/\1/p' | sort`; do
# Variables.
: ${autoconf_dir=${AC_MACRODIR=@datadir@}}
debug=false
-dir=`echo "$0" | sed -e 's/[^/]*$//'`
+dir=`echo "$0" | sed -e 's,[^/]*$,,'`
force=false
# --install -- as --add-missing in other tools.
install=false
# Variables.
: ${autoconf_dir=${AC_MACRODIR=@datadir@}}
debug=false
-dir=`echo "$0" | sed -e 's/[^/]*$//'`
+dir=`echo "$0" | sed -e 's,[^/]*$,,'`
force=false
# --install -- as --add-missing in other tools.
install=false
# Variables.
: ${autoconf_dir=${AC_MACRODIR=@datadir@}}
-dir=`echo "$0" | sed -e 's/[^/]*$//'`
+dir=`echo "$0" | sed -e 's,[^/]*$,,'`
# We test "$dir/autoconf" in case we are in the build tree, in which case
# the names are not transformed yet.
for autoconf in "$AUTOCONF" \
# Dump `acconfig.h' but its bottom.
test -r $localdir/acconfig.h &&
- sed -e '/@BOTTOM@/,$d' -e 's/@TOP@//' $localdir/acconfig.h >>$tmp/config.hin
+ sed '/@BOTTOM@/,$d;s/@TOP@//' $localdir/acconfig.h >>$tmp/config.hin
# Dump the templates from `configure.in'.
for verb in `(set) 2>&1 | sed -n -e '/^ac_verbatim/s/^\([^=]*\)=.*$/\1/p' | sort`; do
# Variables.
: ${autoconf_dir=${AC_MACRODIR=@datadir@}}
debug=false
-dir=`echo "$0" | sed -e 's/[^/]*$//'`
+dir=`echo "$0" | sed -e 's,[^/]*$,,'`
force=false
# --install -- as --add-missing in other tools.
install=false
@item @command{sed}
@cindex @command{sed}
+Patterns should not include the separator (unless escaped), even as part
+of a character class. In conformance with @sc{posix}, the Cray
+@command{sed} will reject @samp{s/[^/]*$//}: use @samp{s,[^/]*$,,}.
+
+Sed scripts should not use branch labels longer than 8 characters and
+should not contain comments.
+
+Input should have reasonably long lines, since some @command{sed} have
+an input buffer limited to 4000 bytes.
+
+Alternation, @samp{\|}, is common but not portable.
+@c FIXME: I know Solaris is guilty, but I don't remember how.
+Anchors (@samp{^} and @samp{$}) inside groups are not portable.
+
+Nested groups are extremely portable, but there is at least one
+@command{sed} (System V/68 Base Operating System R3V7.1) that does not
+support it.
+
Of course the option @option{-e} is portable, but it is not needed. No
-valid @command{sed} program can start with a dash, so it does not help
+valid Sed program can start with a dash, so it does not help
disambiguating. Its sole usefulness is helping enforcing indenting as
in:
the replacement part of the @code{s} command to mean ``what was
matched''.
-@command{sed} scripts should not use branch labels longer than 8
-characters and should not contain comments.
-
-@command{sed} input should have reasonably long lines, since some
-@command{sed} have an input buffer limited to 4000 bytes.
-
-Alternation, @samp{\|}, is common but not portable.
-
-Nested groups are extremely portable, but there is at least one
-@command{sed} (System V/68 Base Operating System R3V7.1) that does not
-support it.
-
-Anchors (@samp{^} and @samp{$}) inside groups are not portable.
-@c FIXME: I know Solaris is guilty, but I don't remember how.
-
@item @command{sed} (@samp{t})
@cindex @command{sed} (@samp{t})