mkfiles.pl 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9
#!/usr/local/bin/perl
#
# This is a hacked version of files.pl for systems that can't do a 'make files'.
# Do a perl util/mkminfo.pl >MINFO to build MINFO
# Written by Steve Henson 1999.

# List of directories to process

my @dirs = (
10
".",
11 12
"crypto",
"crypto/md2",
13
"crypto/md4",
14 15 16 17 18 19 20 21 22 23 24 25
"crypto/md5",
"crypto/sha",
"crypto/mdc2",
"crypto/hmac",
"crypto/ripemd",
"crypto/des",
"crypto/rc2",
"crypto/rc4",
"crypto/rc5",
"crypto/idea",
"crypto/bf",
"crypto/cast",
26
"crypto/aes",
27
"crypto/camellia",
B
Bodo Möller 已提交
28
"crypto/seed",
29 30 31
"crypto/bn",
"crypto/rsa",
"crypto/dsa",
32
"crypto/dso",
33
"crypto/dh",
D
 
Dr. Stephen Henson 已提交
34
"crypto/ec",
B
Bodo Möller 已提交
35
"crypto/ecdh",
36
"crypto/ecdsa",
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
"crypto/buffer",
"crypto/bio",
"crypto/stack",
"crypto/lhash",
"crypto/rand",
"crypto/err",
"crypto/objects",
"crypto/evp",
"crypto/asn1",
"crypto/pem",
"crypto/x509",
"crypto/x509v3",
"crypto/conf",
"crypto/txt_db",
"crypto/pkcs7",
52
"crypto/pkcs12",
53
"crypto/comp",
54
"crypto/engine",
55
"crypto/ocsp",
R
Richard Levitte 已提交
56
"crypto/ui",
57
"crypto/krb5",
58
"crypto/store",
59
"crypto/pqueue",
60
"crypto/whrlpool",
61
"crypto/ts",
62 63
"ssl",
"apps",
64
"engines",
65 66 67 68 69
"test",
"tools"
);

foreach (@dirs) {
70
	&files_dir ($_, "Makefile");
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
}

exit(0);

sub files_dir
{
my ($dir, $makefile) = @_;

my %sym;

open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";

my $s="";

while (<IN>)
	{
	chop;
	s/#.*//;
	if (/^(\S+)\s*=\s*(.*)$/)
		{
		$o="";
		($s,$b)=($1,$2);
		for (;;)
			{
			if ($b =~ /\\$/)
				{
				chop($b);
				$o.=$b." ";
				$b=<IN>;
				chop($b);
				}
			else
				{
				$o.=$b." ";
				last;
				}
			}
		$o =~ s/^\s+//;
		$o =~ s/\s+$//;
		$o =~ s/\s+/ /g;

		$o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
		$sym{$s}=$o;
		}
	}

print "RELATIVE_DIRECTORY=$dir\n";

foreach (sort keys %sym)
	{
	print "$_=$sym{$_}\n";
	}
print "RELATIVE_DIRECTORY=\n";

close (IN);
}