summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/clean-depend.pl
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/util/clean-depend.pl
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/util/clean-depend.pl')
-rw-r--r--src/lib/libcrypto/util/clean-depend.pl38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/lib/libcrypto/util/clean-depend.pl b/src/lib/libcrypto/util/clean-depend.pl
new file mode 100644
index 0000000000..af676af751
--- /dev/null
+++ b/src/lib/libcrypto/util/clean-depend.pl
@@ -0,0 +1,38 @@
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
14while(<STDIN>) {
15 my ($file,$deps)=/^(.*): (.*)$/;
16 next if !defined $deps;
17 my @deps=split ' ',$deps;
18 @deps=grep(!/^\/usr\/include/,@deps);
19 @deps=grep(!/^\/usr\/lib\/gcc-lib/,@deps);
20 push @{$files{$file}},@deps;
21}
22
23my $file;
24foreach $file (sort keys %files) {
25 my $len=0;
26 my $dep;
27 foreach $dep (sort @{$files{$file}}) {
28 $len=0 if $len+length($dep)+1 >= 80;
29 if($len == 0) {
30 print "\n$file:";
31 $len=length($file)+1;
32 }
33 print " $dep";
34 $len+=length($dep)+1;
35 }
36}
37
38print "\n";