diff options
author | Ben Laurie <ben@openssl.org> | 1999-01-19 21:36:31 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-01-19 21:36:31 +0000 |
commit | 8039257dbcd1d2e96e1d57b607b49cdf0ae78636 (patch) | |
tree | 5689dcf67c9bff1b069e1c785c9da80e413703f3 /util/clean-depend.pl | |
parent | b13a1554925a173e04bb9802cbc123b40746a6fc (diff) | |
download | openssl-8039257dbcd1d2e96e1d57b607b49cdf0ae78636.zip openssl-8039257dbcd1d2e96e1d57b607b49cdf0ae78636.tar.gz openssl-8039257dbcd1d2e96e1d57b607b49cdf0ae78636.tar.bz2 |
Finally lay dependencies to rest (I hope!).
Diffstat (limited to 'util/clean-depend.pl')
-rwxr-xr-x | util/clean-depend.pl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/util/clean-depend.pl b/util/clean-depend.pl new file mode 100755 index 0000000..e44b172 --- /dev/null +++ b/util/clean-depend.pl @@ -0,0 +1,35 @@ +#!/usr/local/bin/perl -w +# Clean the dependency list in a makefile of standard includes... +# Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999 + +use strict; + +while(<STDIN>) { + print; + last if /^# DO NOT DELETE THIS LINE/; +} + +my %files; + +while(<STDIN>) { + my ($file,$deps)=/^(.*): (.*)$/; + next if !defined $deps; + my @deps=split ' ',$deps; + @deps=grep(!/^\/usr\/include/,@deps); + push @{$files{$file}},@deps; +} + +my $len=0; +foreach my $file (sort keys %files) { + foreach my $dep (sort @{$files{$file}}) { + $len=0 if $len+length($dep)+1 >= 80; + if($len == 0) { + print "\n$file:"; + $len=length($file)+1; + } + print " $dep"; + $len+=length($dep)+1; + } +} + +print "\n"; |