diff --git a/ChangeLog b/ChangeLog index b0498601..7c47166b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2000-11-16 Akim Demaille + + POSIX doesn't require s/[^/]// to work. + From Paul Eggert and Johan Danielsson. + + * doc/autoconf.texi (Limitations of Usual Tools) : + Reorganize. Document this issue. + * autoupdate.sh (dir): Use `,' as separator instead of `/' + * autoreconf.sh: Likewise. + * autoupdate.sh: Ditto. + 2000-11-16 Paul Eggert * m4/largefile.m4 (_AC_SYS_LARGEFILE_SOURCE): Remove, replaced by... diff --git a/autoheader.in b/autoheader.in index 9dac38fd..274a2c1f 100644 --- a/autoheader.in +++ b/autoheader.in @@ -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 diff --git a/autoheader.sh b/autoheader.sh index 9dac38fd..274a2c1f 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -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 diff --git a/autoreconf.in b/autoreconf.in index 44977b01..907e1da0 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -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 diff --git a/autoreconf.sh b/autoreconf.sh index 44977b01..907e1da0 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -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 diff --git a/bin/autoheader.in b/bin/autoheader.in index 9dac38fd..274a2c1f 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -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 diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 44977b01..907e1da0 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -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 diff --git a/doc/autoconf.texi b/doc/autoconf.texi index ba161cbc..5d123730 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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})