From: Peter O'Gorman Date: Sat, 5 Feb 2005 13:59:49 +0000 (+0000) Subject: * ltmain.in (func_extract_archives) [darwin]: This didn't actually X-Git-Tag: release-1-5-12~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e9d4704a1dec42fb867ad9853b2aaa69cba2eae;p=thirdparty%2Flibtool.git * ltmain.in (func_extract_archives) [darwin]: This didn't actually work on a real fat archive, should do now. * tests/func_extract_archives.test: remove darwin fat tests which did not actually work. --- diff --git a/ChangeLog b/ChangeLog index 845d7713f..bf3606801 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2005-02-05 Peter O'Gorman + * ltmain.in (func_extract_archives) [darwin]: This didn't actually + work on a real fat archive, should do now. + * tests/func_extract_archives.test: remove darwin fat tests which + did not actually work. + * Makefile.am (web-manual): Make this target actually work. 2005-02-04 Ralf Wildenhues diff --git a/ltmain.in b/ltmain.in index ab64bdfa2..71fd5806e 100644 --- a/ltmain.in +++ b/ltmain.in @@ -339,21 +339,20 @@ func_extract_archives () for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - # Remove the table of contents from the thin files. - $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true - $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true - func_extract_an_archive "unfat-$$/${darwin_base_archive}-${darwin_arch}" "${darwin_base_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP` + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist - ${rm}f unfat-$$ + ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" diff --git a/tests/func_extract_archives.test b/tests/func_extract_archives.test index 5aa21e729..55830043c 100755 --- a/tests/func_extract_archives.test +++ b/tests/func_extract_archives.test @@ -8,56 +8,20 @@ if test -z "$srcdir"; then test "${VERBOSE+set}" != "set" && VERBOSE=yes fi . $srcdir/defs || exit 1 -case $host in -*darwin*) - makefatdarwin=yes - ;; - *) - makefatdarwin= - ;; -esac rm -f foo.o bar.o libfoo.a SED=${SED-sed} Xsed="$SED -e s/^X//" for afile in baz foobar foobaz do - if test -n "$makefatdarwin"; then - echo "ppc $afile" > $afile.ppc.o - echo "m68k $afile" > $afile.m68k.o - echo "i386 $afile" > $afile.i386.o - lipo -create -output $afile.o -arch ppc $afile.ppc.o -arch m68k \ - $afile.m68k.o -arch i386 $afile.i386.o - rm -f $afile.*.o - ar -q libfoo.a $afile.o - rm -f $afile.o - else echo "$afile" > $afile.o ar -q libfoo.a $afile.o rm -f $afile.o - fi done for anum in 1 2 3 4 5 6 7 8 9 10 11 12 do - if test -n "$makefatdarwin"; then - echo "ppc foo $anum" > foo.ppc.o - echo "m68k foo $anum" > foo.m68k.o - echo "i386 foo $anum" > foo.i386.o - lipo -create -output foo.o -arch ppc foo.ppc.o -arch m68k foo.m68k.o \ - -arch i386 foo.i386.o - ar -q libfoo.a foo.o - rm -f foo.o foo.*.o - echo "ppc bar $anum" > bar.ppc.o - echo "m68k bar $anum" > bar.m68k.o - echo "i386 bar $anum" > bar.i386.o - lipo -create -output bar.o -arch ppc bar.ppc.o -arch m68k bar.m68k.o \ - -arch i386 bar.i386.o - ar -q libfoo.a bar.o - rm -f bar.o bar.*.o - else echo "foo $anum" > foo.o echo "bar $anum" > bar.o ar -q libfoo.a foo.o bar.o - fi done test -d .libs || mkdir .libs