From: Paul Eggert Date: Mon, 23 May 2011 22:02:43 +0000 (-0700) Subject: gnulib-tool: fix portability problem with MacOS sed X-Git-Tag: stable/20110609~77 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=cd78e73;hp=e6a32cca335e04a61d2fdcc686aaece175ddc3c3;p=gnulib.git 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 . * gnulib-tool (sed_dependencies_without_conditions): (cherry picked from commit ddd54c759aedbcabfb17335dab690ce79c5a53b4) --- diff --git a/ChangeLog b/ChangeLog index 026dca051..bfa3a714a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-05-23 Paul Eggert + + 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 + . + * gnulib-tool (sed_dependencies_without_conditions): + 2011-05-23 Bruno Haible getugroups: Fix module description. diff --git a/gnulib-tool b/gnulib-tool index f6c29f27e..0bec3b3d5 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -2694,8 +2694,12 @@ func_modules_transitive_closure () 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=