]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Merge remote branch 'origin/master' into sysroot
authorPaolo Bonzini <bonzini@gnu.org>
Sun, 22 Aug 2010 07:29:24 +0000 (09:29 +0200)
committerPaolo Bonzini <bonzini@gnu.org>
Sun, 22 Aug 2010 07:40:32 +0000 (09:40 +0200)
* libltdl/config/ltmain.m4sh (func_mode_finish): Use sed_make_literal_regex.

1  2 
Makefile.am
doc/libtool.texi
libltdl/config/ltmain.m4sh
libltdl/m4/libtool.m4

diff --cc Makefile.am
Simple merge
Simple merge
index e4df9505e92ba14a81b561e43847939c303445cc,c6671a01843c9df80e3e914464bf9fc66f0aa3cb..460897c153b5612ca73e603020e73030f12f4140
@@@ -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"
  
-         sysroot_regex=`$ECHO "$lt_sysroot" | $SED 's/[].[^$\\*/]/\\\\&/g'`
 +      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 "$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.
Simple merge