summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/clean-depend.pl
diff options
context:
space:
mode:
authorafresh1 <>2014-04-17 19:20:52 +0000
committerafresh1 <>2014-04-17 19:20:52 +0000
commit2bb4d4ac7a2751306ac55c3ce2fe3af26d8ef965 (patch)
tree8bc06712ef3cbf999c98aaad3dbe7c906415d1ec /src/lib/libcrypto/util/clean-depend.pl
parentc11dca95113fafb94fe3b60390be510b2e8f85d5 (diff)
downloadopenbsd-2bb4d4ac7a2751306ac55c3ce2fe3af26d8ef965.tar.gz
openbsd-2bb4d4ac7a2751306ac55c3ce2fe3af26d8ef965.tar.bz2
openbsd-2bb4d4ac7a2751306ac55c3ce2fe3af26d8ef965.zip
Remove unused ssl utils
This code is the reason perl has a name as a write only language. ok deraadt miod
Diffstat (limited to 'src/lib/libcrypto/util/clean-depend.pl')
-rw-r--r--src/lib/libcrypto/util/clean-depend.pl58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/lib/libcrypto/util/clean-depend.pl b/src/lib/libcrypto/util/clean-depend.pl
deleted file mode 100644
index d3525b0ed0..0000000000
--- a/src/lib/libcrypto/util/clean-depend.pl
+++ /dev/null
@@ -1,58 +0,0 @@
1#!/usr/local/bin/perl -w
2# Clean the dependency list in a makefile of standard includes...
3# Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
4
5use strict;
6
7while(<STDIN>) {
8 print;
9 last if /^# DO NOT DELETE THIS LINE/;
10}
11
12my %files;
13
14my $thisfile="";
15while(<STDIN>) {
16 my ($dummy, $file,$deps)=/^((.*):)? (.*)$/;
17 my $origfile="";
18 $thisfile=$file if defined $file;
19 next if !defined $deps;
20 $origfile=$thisfile;
21 $origfile=~s/\.o$/.c/;
22 my @deps=split ' ',$deps;
23 @deps=grep(!/^\//,@deps);
24 @deps=grep(!/^\\$/,@deps);
25 @deps=grep(!/^$origfile$/,@deps);
26# pull out the kludged kerberos header (if present).
27 @deps=grep(!/^[.\/]+\/krb5.h/,@deps);
28 push @{$files{$thisfile}},@deps;
29}
30
31my $file;
32foreach $file (sort keys %files) {
33 my $len=0;
34 my $dep;
35 my $origfile=$file;
36 $origfile=~s/\.o$/.c/;
37 $file=~s/^\.\///;
38 push @{$files{$file}},$origfile;
39 my $prevdep="";
40
41 # Remove leading ./ before sorting
42 my @deps = map { $_ =~ s/^\.\///; $_ } @{$files{$file}};
43
44 foreach $dep (sort @deps) {
45 $dep=~s/^\.\///;
46 next if $prevdep eq $dep; # to exterminate duplicates...
47 $prevdep = $dep;
48 $len=0 if $len+length($dep)+1 >= 80;
49 if($len == 0) {
50 print "\n$file:";
51 $len=length($file)+1;
52 }
53 print " $dep";
54 $len+=length($dep)+1;
55 }
56}
57
58print "\n";