]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
bootstrap: use of ';' in sed scripts is not portable.
authorGary V. Vaughan <gary@gnu.org>
Thu, 25 Oct 2012 10:11:33 +0000 (05:11 -0500)
committerGary V. Vaughan <gary@gnu.org>
Thu, 25 Oct 2012 12:08:51 +0000 (07:08 -0500)
* gl/build-aux/bootstrap.in (require_buildreq_automake)
(require_dotgitmodules_parameters, require_package)
(func_update_po_files): Use '\n' or -e to separate sed commands,
instead of ';'.
* gl/build-aux/extract-trace (func_autoconf_configure)
(func_extract_trace_first): Likewise.
* gl/funclib.sh: Likewise.
(func_tr_sh): Likewise.
* gl/build-aux/options-parser (func_usage_message): Likewise.
* bootstrap: Regenerate.
Reported by Robert Boehne.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
bootstrap
gl/build-aux/bootstrap.in
gl/build-aux/extract-trace
gl/build-aux/funclib.sh
gl/build-aux/options-parser

index 5363870f12a498942222ffef93b699aa13d1057e..f6dd4e537a16759516712f565fbb9154a5676a75 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1033,8 +1033,8 @@ else
     $debug_cmd
 
     case $2 in
-      .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
-      *)  func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
+      .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+      *)  func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
     esac
   }
 fi
@@ -1106,7 +1106,7 @@ func_tr_sh ()
 
     case $1 in
     [0-9]* | *[!a-zA-Z0-9_]*)
-      func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+      func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
       ;;
     * )
       func_tr_sh_result=$1
@@ -1730,7 +1730,12 @@ func_usage_message ()
 
     eval \$bs_echo \""Usage: $usage"\"
     echo
-    $SED -n 's|^# ||;/^Written by/{x;p;x;};h' < "$progpath"
+    $SED -n 's|^# ||
+        /^Written by/{
+          x;p;x
+        }
+       h
+       /^Written by/q' < "$progpath"
     echo
     eval \$bs_echo \""$usage_message"\"
 }
@@ -1838,7 +1843,10 @@ func_autoconf_configure ()
 {
     $debug_cmd
 
-    _G_sed_no_comment='s|#.*$||; s|^dnl .*$||; s| dnl .*$||;'
+    _G_sed_no_comment='
+      s|#.*$||
+      s|^dnl .*$||
+      s| dnl .*$||'
     _G_ac_init=
 
     # If we were passed a genuine file, make sure it calls AC_INIT.
@@ -2137,7 +2145,7 @@ func_extract_trace_first ()
 
     func_extract_trace ${1+"$@"}
     func_extract_trace_first_result=`$bs_echo "$func_extract_trace_result" \
-      |$SED 's|:.*$||g;1q'`
+      |$SED -e 's|:.*$||g' -e 1q`
 }
 
 
@@ -3299,7 +3307,7 @@ func_require_buildreq_automake ()
       # ...and AM_INIT_AUTOMAKE is declared...
       test -n "$func_extract_trace_result" && {
         automake_version=`$bs_echo "$func_extract_trace_result" \
-           |$SED 's|[^0-9]*||; s| .*$||'`
+           |$SED -e 's|[^0-9]*||' -e 's| .*$||'`
         test -n "$automake_version" || automake_version=-
 
         func_append buildreq "\
@@ -3576,13 +3584,15 @@ func_require_dotgitmodules_parameters ()
                                    /[   ]*path *= */{
                                     s|[   ]*||g;s|^[^=]*=||;p
                                   }
-                                };d' .gitmodules |$SED 1q`
+                                }
+                                d' .gitmodules |$SED 1q`
       test -n "$gnulib_url" \
         || gnulib_url=`$SED -e '/^.submodule "gnulib".$/,${
                                   /[    ]*url *= */{
                                    s|[   ]*||g;s|^[^=]*=||;p
                                  }
-                               };d' .gitmodules |$SED 1q`
+                               }
+                               d' .gitmodules |$SED 1q`
 
       func_verbose "gnulib_path='$gnulib_path'"
       func_verbose "gnulib_url='$gnulib_url'"
@@ -3802,7 +3812,8 @@ func_require_package ()
       $require_package_name
 
       package=`echo "$package_name" \
-        |$SED 's/GNU //;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+        |$SED -e 's/GNU //' \
+             -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
     }
 
     func_verbose "package='$package'"
@@ -4511,7 +4522,7 @@ func_update_po_files ()
     test -d "$_G_ref_po_dir" || mkdir $_G_ref_po_dir || return
     func_download_po_files $_G_ref_po_dir $_G_domain \
       && ls "$_G_ref_po_dir"/*.po 2>/dev/null \
-         |$SED 's|.*/||; s|\.po$||' > "$_G_po_dir/LINGUAS" || return
+         |$SED -e 's|.*/||' -e 's|\.po$||' > "$_G_po_dir/LINGUAS" || return
 
     # Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6+.
     func_find_tool SHA1SUM sha1sum gsha1sum shasum
index 84fbec7dd4fe982f038c119bccb3b293fe8da53b..a0cb11f1d14790547dff204f789a5d7a67e9ae64 100755 (executable)
@@ -1117,7 +1117,7 @@ func_require_buildreq_automake ()
       # ...and AM_INIT_AUTOMAKE is declared...
       test -n "$func_extract_trace_result" && {
         automake_version=`$bs_echo "$func_extract_trace_result" \
-           |$SED 's|[^0-9]*||; s| .*$||'`
+           |$SED -e 's|[^0-9]*||' -e 's| .*$||'`
         test -n "$automake_version" || automake_version=-
 
         func_append buildreq "\
@@ -1394,13 +1394,15 @@ func_require_dotgitmodules_parameters ()
                                    /[   ]*path *= */{
                                     s|[   ]*||g;s|^[^=]*=||;p
                                   }
-                                };d' .gitmodules |$SED 1q`
+                                }
+                                d' .gitmodules |$SED 1q`
       test -n "$gnulib_url" \
         || gnulib_url=`$SED -e '/^.submodule "gnulib".$/,${
                                   /[    ]*url *= */{
                                    s|[   ]*||g;s|^[^=]*=||;p
                                  }
-                               };d' .gitmodules |$SED 1q`
+                               }
+                               d' .gitmodules |$SED 1q`
 
       func_verbose "gnulib_path='$gnulib_path'"
       func_verbose "gnulib_url='$gnulib_url'"
@@ -1620,7 +1622,8 @@ func_require_package ()
       $require_package_name
 
       package=`echo "$package_name" \
-        |$SED 's/GNU //;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+        |$SED -e 's/GNU //' \
+             -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
     }
 
     func_verbose "package='$package'"
@@ -2329,7 +2332,7 @@ func_update_po_files ()
     test -d "$_G_ref_po_dir" || mkdir $_G_ref_po_dir || return
     func_download_po_files $_G_ref_po_dir $_G_domain \
       && ls "$_G_ref_po_dir"/*.po 2>/dev/null \
-         |$SED 's|.*/||; s|\.po$||' > "$_G_po_dir/LINGUAS" || return
+         |$SED -e 's|.*/||' -e 's|\.po$||' > "$_G_po_dir/LINGUAS" || return
 
     # Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6+.
     func_find_tool SHA1SUM sha1sum gsha1sum shasum
index 758c49b4ff3f49fbe11b9947c4f36be38203de0d..f7394483ff8c2f097f476ab8f18e58f78dae0d8f 100755 (executable)
@@ -60,7 +60,10 @@ func_autoconf_configure ()
 {
     $debug_cmd
 
-    _G_sed_no_comment='s|#.*$||; s|^dnl .*$||; s| dnl .*$||;'
+    _G_sed_no_comment='
+      s|#.*$||
+      s|^dnl .*$||
+      s| dnl .*$||'
     _G_ac_init=
 
     # If we were passed a genuine file, make sure it calls AC_INIT.
@@ -359,7 +362,7 @@ func_extract_trace_first ()
 
     func_extract_trace ${1+"$@"}
     func_extract_trace_first_result=`$bs_echo "$func_extract_trace_result" \
-      |$SED 's|:.*$||g;1q'`
+      |$SED -e 's|:.*$||g' -e 1q`
 }
 
 
index c48e0c0536d844df0be5722a2d4e6c163c8faa84..90f40a5597e62aab29eaf546f000ee47d8a5ea78 100644 (file)
@@ -1023,8 +1023,8 @@ else
     $debug_cmd
 
     case $2 in
-      .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
-      *)  func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
+      .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+      *)  func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
     esac
   }
 fi
@@ -1096,7 +1096,7 @@ func_tr_sh ()
 
     case $1 in
     [0-9]* | *[!a-zA-Z0-9_]*)
-      func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+      func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
       ;;
     * )
       func_tr_sh_result=$1
index af460fd16776717c54b8e7c18f4e1ee0093bd714..3aa568d2c6df355eaae447687402c6c6d9e25919 100644 (file)
@@ -555,7 +555,12 @@ func_usage_message ()
 
     eval \$bs_echo \""Usage: $usage"\"
     echo
-    $SED -n 's|^# ||;/^Written by/{x;p;x;};h' < "$progpath"
+    $SED -n 's|^# ||
+        /^Written by/{
+          x;p;x
+        }
+       h
+       /^Written by/q' < "$progpath"
     echo
     eval \$bs_echo \""$usage_message"\"
 }