From: Gary V. Vaughan Date: Thu, 25 Oct 2012 10:11:33 +0000 (-0500) Subject: bootstrap: use of ';' in sed scripts is not portable. X-Git-Tag: v2.4.2.418~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd74bb4527fb6618707b7d976299ba85428fab81;p=thirdparty%2Flibtool.git bootstrap: use of ';' in sed scripts is not portable. * 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 --- diff --git a/bootstrap b/bootstrap index 5363870f1..f6dd4e537 100755 --- 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 diff --git a/gl/build-aux/bootstrap.in b/gl/build-aux/bootstrap.in index 84fbec7dd..a0cb11f1d 100755 --- a/gl/build-aux/bootstrap.in +++ b/gl/build-aux/bootstrap.in @@ -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 diff --git a/gl/build-aux/extract-trace b/gl/build-aux/extract-trace index 758c49b4f..f7394483f 100755 --- a/gl/build-aux/extract-trace +++ b/gl/build-aux/extract-trace @@ -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` } diff --git a/gl/build-aux/funclib.sh b/gl/build-aux/funclib.sh index c48e0c053..90f40a559 100644 --- a/gl/build-aux/funclib.sh +++ b/gl/build-aux/funclib.sh @@ -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 diff --git a/gl/build-aux/options-parser b/gl/build-aux/options-parser index af460fd16..3aa568d2c 100644 --- a/gl/build-aux/options-parser +++ b/gl/build-aux/options-parser @@ -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"\" }