From: Jim Meyering Date: Sat, 22 Sep 2007 12:04:51 +0000 (+0200) Subject: Whenever possible, use the vertical bar as sed delimiter. X-Git-Tag: v2.62~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06f2cb9db601e99d8165fb17bf545a2219758ba3;p=thirdparty%2Fautoconf.git Whenever possible, use the vertical bar as sed delimiter. * lib/autoconf/functions.m4 (GETLOADAVG_LIBS) [AC_FUNC_GETLOADAVG]: Use "|", not "!". * lib/autoconf/status.m4 (_AC_SRCDIRS) [ac_top_builddir_sub]: [ac_dir_suffix]: Use "|", not "," as sed delimiter. * tests/mktests.sh (as_me): Likewise. * lib/freeze.mk (check-forbidden-patterns): Likewise. * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Likewise. * configure: Regenerate. * doc/autoconf.texi (Shell Substitutions): Use "|", not "," in examples. * lib/autotest/general.m4 (AT_INIT): Use "|", not "&" as sed delimiter in the : -> $PATH_SEPARATOR transformation of $AUTOTEST_PATH. This is fine, as long as $PATH_SEPARATOR doesn't contain "|". --- diff --git a/ChangeLog b/ChangeLog index 11500cc3..235d1f06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2007-09-24 Jim Meyering + + Whenever possible, use the vertical bar as sed delimiter. + * lib/autoconf/functions.m4 (GETLOADAVG_LIBS) [AC_FUNC_GETLOADAVG]: + Use "|", not "!". + * lib/autoconf/status.m4 (_AC_SRCDIRS) [ac_top_builddir_sub]: + [ac_dir_suffix]: Use "|", not "," as sed delimiter. + * tests/mktests.sh (as_me): Likewise. + * lib/freeze.mk (check-forbidden-patterns): Likewise. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Likewise. + * configure: Regenerate. + * doc/autoconf.texi (Shell Substitutions): Use "|", not "," in examples. + * lib/autotest/general.m4 (AT_INIT): Use "|", not "&" as sed delimiter + in the : -> $PATH_SEPARATOR transformation of $AUTOTEST_PATH. + This is fine, as long as $PATH_SEPARATOR doesn't contain "|". + 2007-09-22 Jim Meyering Add a comment. diff --git a/bin/Makefile.in b/bin/Makefile.in index 59da298d..e2fc67e0 100644 --- a/bin/Makefile.in +++ b/bin/Makefile.in @@ -528,7 +528,7 @@ check-forbidden-patterns: $(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ - sed "s,^,$*.m4: ," &2; \ + sed "s|^|$*.m4: |" &2; \ echo >&2; \ exit 1; \ else \ diff --git a/configure b/configure index b7ebea5b..a6f20ace 100755 --- a/configure +++ b/configure @@ -1339,9 +1339,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -3808,9 +3808,9 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; diff --git a/doc/autoconf.texi b/doc/autoconf.texi index a2af90cc..f05b1096 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -11794,7 +11794,7 @@ For instance, the following code: @example case "$given_srcdir" in -.) top_srcdir="`echo "$dots" | sed 's,/$,,'`" ;; +.) top_srcdir="`echo "$dots" | sed 's|/$||'`" ;; *) top_srcdir="$dots$given_srcdir" ;; esac @end example @@ -11804,7 +11804,7 @@ is more readable when written as: @example case $given_srcdir in -.) top_srcdir=`echo "$dots" | sed 's,/$,,'` ;; +.) top_srcdir=`echo "$dots" | sed 's|/$||'` ;; *) top_srcdir=$dots$given_srcdir ;; esac @end example diff --git a/lib/autoconf/Makefile.in b/lib/autoconf/Makefile.in index 03feef5d..f0356053 100644 --- a/lib/autoconf/Makefile.in +++ b/lib/autoconf/Makefile.in @@ -530,7 +530,7 @@ check-forbidden-patterns: $(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ - sed "s,^,$*.m4: ," &2; \ + sed "s|^|$*.m4: |" &2; \ echo >&2; \ exit 1; \ else \ diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index a5d34d7c..0907e40b 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -560,7 +560,7 @@ rm -f conftest* # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_[]_AC_LANG_ABBREV[]_v_output="`echo $ac_[]_AC_LANG_ABBREV[]_v_output | grep 'LPATH is:' | - sed 's,.*LPATH is\(: *[[^ ]]*\).*,\1,;s,: */, -L/,g'` $ac_[]_AC_LANG_ABBREV[]_v_output" + sed 's|.*LPATH is\(: *[[^ ]]*\).*|\1|;s|: */| -L/|g'` $ac_[]_AC_LANG_ABBREV[]_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index e1598c81..a9923259 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -775,7 +775,7 @@ fi if test "x$ac_save_LIBS" = x; then GETLOADAVG_LIBS=$LIBS else - GETLOADAVG_LIBS=`AS_ECHO(["$LIBS"]) | sed "s!$ac_save_LIBS!!"` + GETLOADAVG_LIBS=`AS_ECHO(["$LIBS"]) | sed "s|$ac_save_LIBS||"` fi LIBS=$ac_save_LIBS diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index c07e6d7a..5b43e116 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -105,9 +105,9 @@ m4_define([_AC_SRCDIRS], case $1 in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`AS_ECHO([$1]) | sed 's,^\.[[\\/]],,'` + ac_dir_suffix=/`AS_ECHO([$1]) | sed 's|^\.[[\\/]]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`AS_ECHO(["$ac_dir_suffix"]) | sed 's,/[[^\\/]]*,/..,g;s,/,,'` + ac_top_builddir_sub=`AS_ECHO(["$ac_dir_suffix"]) | sed 's|/[[^\\/]]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; diff --git a/lib/autoscan/Makefile.in b/lib/autoscan/Makefile.in index 4d63bb6f..34de0095 100644 --- a/lib/autoscan/Makefile.in +++ b/lib/autoscan/Makefile.in @@ -447,7 +447,7 @@ check-forbidden-patterns: $(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ - sed "s,^,$*.m4: ," &2; \ + sed "s|^|$*.m4: |" &2; \ echo >&2; \ exit 1; \ else \ diff --git a/lib/autotest/Makefile.in b/lib/autotest/Makefile.in index fa1c0a2e..48f5b2e6 100644 --- a/lib/autotest/Makefile.in +++ b/lib/autotest/Makefile.in @@ -524,7 +524,7 @@ check-forbidden-patterns: $(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ - sed "s,^,$*.m4: ," &2; \ + sed "s|^|$*.m4: |" &2; \ echo >&2; \ exit 1; \ else \ diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index f562679f..f2a6f38e 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -559,7 +559,7 @@ m4_divert_push([PREPARE_TESTS])dnl # For embedded test suites, AUTOTEST_PATH is relative to the top level # of the package. Then expand it into build/src parts, since users # may create executables in both places. -AUTOTEST_PATH=`AS_ECHO(["$AUTOTEST_PATH"]) | sed "s&:&$PATH_SEPARATOR&g"` +AUTOTEST_PATH=`AS_ECHO(["$AUTOTEST_PATH"]) | sed "s|:|$PATH_SEPARATOR|g"` at_path= _AS_PATH_WALK([$AUTOTEST_PATH $PATH], [test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR diff --git a/lib/freeze.mk b/lib/freeze.mk index 28cf5548..7f40bad6 100644 --- a/lib/freeze.mk +++ b/lib/freeze.mk @@ -122,7 +122,7 @@ check-forbidden-patterns: $(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ - sed "s,^,$*.m4: ," &2; \ + sed "s|^|$*.m4: |" &2; \ echo >&2; \ exit 1; \ else \ diff --git a/lib/m4sugar/Makefile.in b/lib/m4sugar/Makefile.in index e691e724..b0b8b8d3 100644 --- a/lib/m4sugar/Makefile.in +++ b/lib/m4sugar/Makefile.in @@ -538,7 +538,7 @@ check-forbidden-patterns: $(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ - sed "s,^,$*.m4: ," &2; \ + sed "s|^|$*.m4: |" &2; \ echo >&2; \ exit 1; \ else \ diff --git a/tests/Makefile.in b/tests/Makefile.in index db59ebc7..f2aa3bfb 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -488,7 +488,7 @@ check-forbidden-patterns: $(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ - sed "s,^,$*.m4: ," &2; \ + sed "s|^|$*.m4: |" &2; \ echo >&2; \ exit 1; \ else \ diff --git a/tests/mktests.sh b/tests/mktests.sh index a7145e99..68631b04 100755 --- a/tests/mktests.sh +++ b/tests/mktests.sh @@ -23,7 +23,7 @@ # If we fail, clean up, but touch the output files. We probably failed # because we used some non-portable tool. -as_me=`echo "$0" | sed 's,.*[\\/],,'` +as_me=`echo "$0" | sed 's|.*[\\/]||'` trap 'echo "'"$as_me"': failed." >&2 rm -f acdefuns audefuns requires *.tat @@ -181,7 +181,7 @@ au_exclude_script="$exclude_list $au_exclude_list {print}" for file in $src do - base=`echo "$file" | sed 's,.*[\\/],,;s/\..*//'` + base=`echo "$file" | sed 's|.*[\\/]||;s|\..*||'` # Get the list of macros which are defined in Autoconf level. # Get rid of the macros we are not interested in. sed -n -e 's/^AC_DEFUN(\[*\([a-zA-Z0-9_]*\).*$/\1/p' \