]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
POSIX doesn't require s/[^/]// to work.
authorAkim Demaille <akim@epita.fr>
Thu, 16 Nov 2000 10:12:50 +0000 (10:12 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 16 Nov 2000 10:12:50 +0000 (10:12 +0000)
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.

ChangeLog
autoheader.in
autoheader.sh
autoreconf.in
autoreconf.sh
bin/autoheader.in
bin/autoreconf.in
doc/autoconf.texi

index b0498601b15869a7b133b7405511036f59eb5cb9..7c47166bfaa6649f943317d1b0e319c76a8cf721 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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...
index 9dac38fd86d3398a80d0d74e6879500cf9a27fb5..274a2c1fde705c434caef94d7a05f13d33626282 100644 (file)
@@ -81,7 +81,7 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
 # 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" \
@@ -293,7 +293,7 @@ test -r $config_h.top && cat $config_h.top >>$tmp/config.hin
 
 # 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
index 9dac38fd86d3398a80d0d74e6879500cf9a27fb5..274a2c1fde705c434caef94d7a05f13d33626282 100644 (file)
@@ -81,7 +81,7 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
 # 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" \
@@ -293,7 +293,7 @@ test -r $config_h.top && cat $config_h.top >>$tmp/config.hin
 
 # 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
index 44977b01e0744747ed7859ed7908ef6b718f386c..907e1da0bce767e86550f41d1057b745a69d14fa 100644 (file)
@@ -91,7 +91,7 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 # 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
index 44977b01e0744747ed7859ed7908ef6b718f386c..907e1da0bce767e86550f41d1057b745a69d14fa 100644 (file)
@@ -91,7 +91,7 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 # 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
index 9dac38fd86d3398a80d0d74e6879500cf9a27fb5..274a2c1fde705c434caef94d7a05f13d33626282 100644 (file)
@@ -81,7 +81,7 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
 # 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" \
@@ -293,7 +293,7 @@ test -r $config_h.top && cat $config_h.top >>$tmp/config.hin
 
 # 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
index 44977b01e0744747ed7859ed7908ef6b718f386c..907e1da0bce767e86550f41d1057b745a69d14fa 100644 (file)
@@ -91,7 +91,7 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 # 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
index ba161cbc73c411499d0a6f7a7968b8ed8819bc0a..5d1237303b2d6fc78b37a28da9d7618cf53db29a 100644 (file)
@@ -5885,8 +5885,26 @@ don't rely on symbolic links on @sc{djgpp}.
 
 @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:
 
@@ -5906,21 +5924,6 @@ Contrary to yet another urban legend, you may portably use @samp{&} 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})