forked from openssl/openssl
-
Notifications
You must be signed in to change notification settings - Fork 18
/
mkfiles.pl
executable file
·145 lines (130 loc) · 1.99 KB
/
mkfiles.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/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 = (
".",
"crypto",
"crypto/md2",
"crypto/md4",
"crypto/md5",
"crypto/sha",
"crypto/mdc2",
"crypto/hmac",
"crypto/cmac",
"crypto/ripemd",
"crypto/des",
"crypto/rc2",
"crypto/rc4",
"crypto/rc5",
"crypto/idea",
"crypto/bf",
"crypto/cast",
"crypto/aes",
"crypto/camellia",
"crypto/seed",
"crypto/modes",
"crypto/bn",
"crypto/rsa",
"crypto/dsa",
"crypto/dso",
"crypto/dh",
"crypto/ec",
"crypto/ecdh",
"crypto/ecdsa",
"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/cms",
"crypto/conf",
"crypto/jpake",
"crypto/txt_db",
"crypto/pkcs7",
"crypto/pkcs12",
"crypto/comp",
"crypto/engine",
"crypto/ocsp",
"crypto/ui",
"crypto/krb5",
#"crypto/store",
"crypto/pqueue",
"crypto/whrlpool",
"crypto/ts",
"crypto/srp",
"crypto/chacha",
"crypto/poly1305",
"ssl",
"apps",
"engines",
"engines/ccgost",
"test",
"tools"
);
%top;
foreach (@dirs) {
&files_dir ($_, "Makefile");
}
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/\$[({]([^)}] )[)}]/$top{$1} or $sym{$1}/ge;
$sym{$s}=($top{$s} or $o);
}
}
print "RELATIVE_DIRECTORY=$dir\n";
foreach (sort keys %sym)
{
print "$_=$sym{$_}\n";
}
if ($dir eq "." && defined($sym{"BUILDENV"}))
{
foreach (split(' ',$sym{"BUILDENV"}))
{
/^(. )=/;
$top{$1}=$sym{$1};
}
}
print "RELATIVE_DIRECTORY=\n";
close (IN);
}