]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (extracted_archives, extracted_serial): New globals.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 5 Feb 2006 11:08:52 +0000 (11:08 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 5 Feb 2006 11:08:52 +0000 (11:08 +0000)
(func_extract_archives): Use them to rename extraction archives
for linking against multiple convenience libraries with the same
name.
Reported by Carlo Contavalli <ccontavalli@commedia.it>.

ChangeLog
ltmain.in

index c3fc52b80ff60ec99cafa953e6ee2440821c6f8d..56b3ed39eaca9007366f77a39983b8ad4676887e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-02-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * ltmain.in (extracted_archives, extracted_serial): New globals.
+       (func_extract_archives): Use them to rename extraction archives
+       for linking against multiple convenience libraries with the same
+       name.
+       Reported by Carlo Contavalli <ccontavalli@commedia.it>.
+
        * ltmain.in (link mode) < test_compile >: Fix a couple of instances
        where `test .. -ne ..' would possibly compare non-numbers.  Clean up a
        bit.
index 37398b54ea300527a4462b30a35abc6686f00b9f..981cc31293fdcf4c2b4be249b15481665a51eef3 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -136,6 +136,8 @@ duplicate_deps=no
 preserve_args=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
 
 #####################################
 # Shell function definitions:
@@ -333,7 +335,17 @@ func_extract_archives ()
        *) my_xabs=`pwd`"/$my_xlib" ;;
       esac
       my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
-      my_xdir="$my_gentop/$my_xlib"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+       *" $my_xlib_u "*)
+         extracted_serial=`expr $extracted_serial + 1`
+         my_xlib_u=lt$extracted_serial-$my_xlib ;;
+       *) break ;;
+       esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
 
       $show "${rm}r $my_xdir"
       $run ${rm}r "$my_xdir"