makedepend sometimes produces duplicates. Remove them.
authorRichard Levitte <levitte@openssl.org>
Wed, 10 Oct 2001 07:44:54 +0000 (07:44 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 10 Oct 2001 07:44:54 +0000 (07:44 +0000)
util/clean-depend.pl

index 8e27aaa..322bfcc 100755 (executable)
@@ -35,7 +35,10 @@ foreach $file (sort keys %files) {
     my $origfile=$file;
     $origfile=~s/\.o$/.c/;
     push @{$files{$file}},$origfile;
+    my $prevdep="";
     foreach $dep (sort @{$files{$file}}) {
+       next if $prevdep eq $dep; # to exterminate duplicates...
+       $prevdep = $dep;
        $len=0 if $len+length($dep)+1 >= 80;
        if($len == 0) {
            print "\n$file:";