From: Paolo Bonzini Date: Sun, 22 Aug 2010 07:29:24 +0000 (+0200) Subject: Merge remote branch 'origin/master' into sysroot X-Git-Tag: v2.4~72^2~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=2bde23f84fd69c2b135ef53f43a22a90c14e7e8c;p=thirdparty%2Flibtool.git Merge remote branch 'origin/master' into sysroot * libltdl/config/ltmain.m4sh (func_mode_finish): Use sed_make_literal_regex. --- 2bde23f84fd69c2b135ef53f43a22a90c14e7e8c diff --cc libltdl/config/ltmain.m4sh index e4df9505e,c6671a018..460897c15 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@@ -1397,52 -1348,15 +1397,52 @@@ test "$opt_mode" = execute && func_mode func_mode_finish () { $opt_debug - libdirs="$nonopt" + libs= + libdirs= admincmds= - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - func_append libdirs " $dir" - done + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED 's/[].[^$\\*/]/\\\\&/g'` ++ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands.