svn commit: samba r19880 - in branches/SAMBA_4_0/source/script: .
jelmer at samba.org
jelmer at samba.org
Fri Nov 24 16:31:43 GMT 2006
Author: jelmer
Date: 2006-11-24 16:31:42 +0000 (Fri, 24 Nov 2006)
New Revision: 19880
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19880
Log:
Eliminate duplicates in the output.
Modified:
branches/SAMBA_4_0/source/script/pkg-config
Changeset:
Modified: branches/SAMBA_4_0/source/script/pkg-config
===================================================================
--- branches/SAMBA_4_0/source/script/pkg-config 2006-11-24 16:21:23 UTC (rev 19879)
+++ branches/SAMBA_4_0/source/script/pkg-config 2006-11-24 16:31:42 UTC (rev 19880)
@@ -124,7 +124,21 @@
push (@out, Cflags($pkg)) if ($opt_cflags);
}
+sub nub
+{
+ my @list = @_;
+ my @ret = ();
+ my %seen = ();
+ foreach (@list) {
+ next if (defined($seen{$_}));
+ push (@ret, $_);
+ $seen{$_} = 1;
+ }
+ return @ret;
+}
+
if ($#out >= 0) {
+ @out = nub(@out);
print join(' ', @out) . "\n";
}
More information about the samba-cvs
mailing list