bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Darwin's uniq


From: Peter O'Gorman
Subject: Re: Darwin's uniq
Date: Fri, 03 Dec 2004 22:25:25 +0900
User-agent: Mozilla Thunderbird 0.9 (Macintosh/20041103)

Ralf Wildenhues wrote:

I think
  some_cmd | uniq -c | grep -v '^[      ]*1[    ]'

should do, your solution breaks if there are 10 objects with the same
name.

This does indeed work as you suggest, however it is still broken. Some of this is my fault, on darwin, archives are presumed to have unique names (I should fix this, I broke it when I made fat archives work), but when I run a test (attached) with host=unknown I get different errors due to the fact that darwin's ar does not support ar xN :( So I sent myself back to the opengroup and looked at <http://www.opengroup.org/onlinepubs/009695399/utilities/ar.html>. No N there...

Peter
--
Peter O'Gorman - http://www.pogma.com
#! /bin/sh
# link.test - check that .lo files aren't made into programs.

# Test script header.
need_prefix=no
if test -z "$srcdir"; then
  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
  test "$srcdir" = "$0" && srcdir=.
  test "${VERBOSE+set}" != "set" && VERBOSE=yes
fi
. $srcdir/defs || exit 1

rm -f foo.o bar.o libfoo.a
SED=${SED-sed}
Xsed="$SED -e s/^X//"
touch foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
ar -q libfoo.a foo.o bar.o
test -d .libs || mkdir .libs

eval "`$SED -n -e '/^# Shell function definitions:'$z'$/,/^# End of Shell 
function definitions'$z'$/p' < $libtool`"

show=echo
run=
mkdir=mkdir
rm="rm -"
echo=echo
AR=${AR-ar}
host=unknown
func_extract_archives ".libs/libfoo" "libfoo.a"

exit 0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]