+2007-09-24 Jim Meyering <jim@meyering.net>
+
+ 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 <jim@meyering.net>
Add a comment.
$(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \
>forbidden.log; then \
echo "ERROR: forbidden patterns were found:" >&2; \
- sed "s,^,$*.m4: ," <forbidden.log >&2; \
+ sed "s|^|$*.m4: |" <forbidden.log >&2; \
echo >&2; \
exit 1; \
else \
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/ ;;
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/ ;;
@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
@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
$(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \
>forbidden.log; then \
echo "ERROR: forbidden patterns were found:" >&2; \
- sed "s,^,$*.m4: ," <forbidden.log >&2; \
+ sed "s|^|$*.m4: |" <forbidden.log >&2; \
echo >&2; \
exit 1; \
else \
# 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
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
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/ ;;
$(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \
>forbidden.log; then \
echo "ERROR: forbidden patterns were found:" >&2; \
- sed "s,^,$*.m4: ," <forbidden.log >&2; \
+ sed "s|^|$*.m4: |" <forbidden.log >&2; \
echo >&2; \
exit 1; \
else \
$(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \
>forbidden.log; then \
echo "ERROR: forbidden patterns were found:" >&2; \
- sed "s,^,$*.m4: ," <forbidden.log >&2; \
+ sed "s|^|$*.m4: |" <forbidden.log >&2; \
echo >&2; \
exit 1; \
else \
# 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
$(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \
>forbidden.log; then \
echo "ERROR: forbidden patterns were found:" >&2; \
- sed "s,^,$*.m4: ," <forbidden.log >&2; \
+ sed "s|^|$*.m4: |" <forbidden.log >&2; \
echo >&2; \
exit 1; \
else \
$(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \
>forbidden.log; then \
echo "ERROR: forbidden patterns were found:" >&2; \
- sed "s,^,$*.m4: ," <forbidden.log >&2; \
+ sed "s|^|$*.m4: |" <forbidden.log >&2; \
echo >&2; \
exit 1; \
else \
$(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \
>forbidden.log; then \
echo "ERROR: forbidden patterns were found:" >&2; \
- sed "s,^,$*.m4: ," <forbidden.log >&2; \
+ sed "s|^|$*.m4: |" <forbidden.log >&2; \
echo >&2; \
exit 1; \
else \
# 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
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' \