gnulib-tool: fix portability problem with MacOS sed
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 May 2011 22:02:43 +0000 (15:02 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 May 2011 22:02:43 +0000 (15:02 -0700)
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):

ChangeLog
gnulib-tool

index 86a9cb078ddf344674f13a821f9ac2a789a61140..6ebe81628f6dffef7ea17d75866df678eba92aa5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index f6c29f27e9ae021df5912c0e2519f6364bd8d636..0bec3b3d5c66a7da209fffaffd14aab750643371 100755 (executable)
@@ -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=