Mercurial > gnulib
changeset 14806:e551e9a7ef38
gnulib-tool: fix portability problem with MacOS sed
A sed command like "/x/{s/a/b/}" is not portable; a newline is needed
before the "}". Problem reported by Leo in
<http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00717.html>.
* gnulib-tool (sed_dependencies_without_conditions):
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 23 May 2011 15:02:43 -0700 |
parents | d165d871cfb6 |
children | 61ba814a50cb |
files | ChangeLog gnulib-tool |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon May 23 23:56:14 2011 +0200 +++ b/ChangeLog Mon May 23 15:02:43 2011 -0700 @@ -1,3 +1,11 @@ +2011-05-23 Paul Eggert <eggert@cs.ucla.edu> + + gnulib-tool: fix portability problem with MacOS sed + A sed command like "/x/{s/a/b/}" is not portable; a newline is needed + before the "}". Problem reported by Leo in + <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00717.html>. + * gnulib-tool (sed_dependencies_without_conditions): + 2011-05-23 Bruno Haible <bruno@clisp.org> hash: Simplify autoconf macro.
--- a/gnulib-tool Mon May 23 23:56:14 2011 +0200 +++ b/gnulib-tool Mon May 23 15:02:43 2011 -0700 @@ -2694,8 +2694,12 @@ func_append inmodules " $dep" if test -n "$cond_dependencies"; then escaped_dep=`echo "$dep" | sed -e "$sed_escape_dependency"` - sed_extract_condition1='/^ *'"$escaped_dep"' *$/{s/^.*$/true/p}' - sed_extract_condition2='/^ *'"$escaped_dep"' *\[.*\] *$/{s/^ *'"$escaped_dep"' *\[\(.*\)\] *$/\1/p}' + sed_extract_condition1='/^ *'"$escaped_dep"' *$/{ + s/^.*$/true/p + }' + sed_extract_condition2='/^ *'"$escaped_dep"' *\[.*\] *$/{ + s/^ *'"$escaped_dep"' *\[\(.*\)\] *$/\1/p + }' condition=`func_get_dependencies $module | sed -n -e "$sed_extract_condition1" -e "$sed_extract_condition2"` if test "$condition" = true; then condition=