]>
Commit | Line | Data |
---|---|---|
58964a49 RE |
1 | #!/usr/local/bin/perl |
2 | ||
3 | $infile="/home/eay/ssl/SSLeay/MINFO"; | |
4 | ||
5 | open(IN,"<$infile") || die "unable to open $infile:$!\n"; | |
6 | $_=<IN>; | |
7 | for (;;) | |
8 | { | |
9 | chop; | |
10 | ||
11 | ($key,$val)=/^([^=]+)=(.*)/; | |
12 | if ($key eq "RELATIVE_DIRECTORY") | |
13 | { | |
14 | if ($lib ne "") | |
15 | { | |
16 | $uc=$lib; | |
17 | $uc =~ s/^lib(.*)\.a/$1/; | |
18 | $uc =~ tr/a-z/A-Z/; | |
19 | $lib_nam{$uc}=$uc; | |
20 | $lib_obj{$uc}.=$libobj." "; | |
21 | } | |
22 | last if ($val eq "FINISHED"); | |
23 | $lib=""; | |
24 | $libobj=""; | |
25 | $dir=$val; | |
26 | } | |
27 | ||
28 | if ($key eq "TEST") | |
29 | { $test.=&var_add($dir,$val); } | |
30 | ||
31 | if (($key eq "PROGS") || ($key eq "E_OBJ")) | |
32 | { $e_exe.=&var_add($dir,$val); } | |
33 | ||
34 | if ($key eq "LIB") | |
35 | { | |
36 | $lib=$val; | |
37 | $lib =~ s/^.*\/([^\/]+)$/$1/; | |
38 | } | |
39 | ||
40 | if ($key eq "EXHEADER") | |
41 | { $exheader.=&var_add($dir,$val); } | |
42 | ||
43 | if ($key eq "HEADER") | |
44 | { $header.=&var_add($dir,$val); } | |
45 | ||
46 | if ($key eq "LIBSRC") | |
47 | { $libsrc.=&var_add($dir,$val); } | |
48 | ||
49 | if (!($_=<IN>)) | |
50 | { $_="RELATIVE_DIRECTORY=FINISHED\n"; } | |
51 | } | |
52 | close(IN); | |
53 | ||
54 | @a=split(/\s+/,$libsrc); | |
55 | foreach (@a) | |
56 | { | |
57 | print "${_}.c\n"; | |
58 | } | |
59 | ||
60 | sub var_add | |
61 | { | |
62 | local($dir,$val)=@_; | |
63 | local(@a,$_,$ret); | |
64 | ||
0b13e9f0 | 65 | return("") if $no_engine && $dir =~ /\/engine/; |
58964a49 RE |
66 | return("") if $no_idea && $dir =~ /\/idea/; |
67 | return("") if $no_rc2 && $dir =~ /\/rc2/; | |
68 | return("") if $no_rc4 && $dir =~ /\/rc4/; | |
69 | return("") if $no_rsa && $dir =~ /\/rsa/; | |
70 | return("") if $no_rsa && $dir =~ /^rsaref/; | |
71 | return("") if $no_dsa && $dir =~ /\/dsa/; | |
72 | return("") if $no_dh && $dir =~ /\/dh/; | |
73 | if ($no_des && $dir =~ /\/des/) | |
74 | { | |
75 | if ($val =~ /read_pwd/) | |
76 | { return("$dir/read_pwd "); } | |
77 | else | |
78 | { return(""); } | |
79 | } | |
80 | return("") if $no_mdc2 && $dir =~ /\/mdc2/; | |
81 | return("") if $no_sock && $dir =~ /\/proxy/; | |
82 | return("") if $no_bf && $dir =~ /\/bf/; | |
83 | return("") if $no_cast && $dir =~ /\/cast/; | |
84 | ||
85 | $val =~ s/^\s*(.*)\s*$/$1/; | |
86 | @a=split(/\s+/,$val); | |
87 | grep(s/\.[och]$//,@a); | |
88 | ||
89 | @a=grep(!/^e_.*_3d$/,@a) if $no_des; | |
90 | @a=grep(!/^e_.*_d$/,@a) if $no_des; | |
91 | @a=grep(!/^e_.*_i$/,@a) if $no_idea; | |
92 | @a=grep(!/^e_.*_r2$/,@a) if $no_rc2; | |
93 | @a=grep(!/^e_.*_bf$/,@a) if $no_bf; | |
94 | @a=grep(!/^e_.*_c$/,@a) if $no_cast; | |
95 | @a=grep(!/^e_rc4$/,@a) if $no_rc4; | |
96 | ||
97 | @a=grep(!/(^s2_)|(^s23_)/,@a) if $no_ssl2; | |
98 | @a=grep(!/(^s3_)|(^s23_)/,@a) if $no_ssl3; | |
99 | ||
100 | @a=grep(!/(_sock$)|(_acpt$)|(_conn$)|(^pxy_)/,@a) if $no_sock; | |
101 | ||
102 | @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2; | |
103 | @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5; | |
104 | ||
105 | @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa; | |
106 | @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa; | |
107 | @a=grep(!/(^pem_seal$)/,@a) if $no_rsa; | |
108 | ||
109 | @a=grep(!/(m_dss$)|(m_dss1$)/,@a) if $no_dsa; | |
110 | @a=grep(!/(^d2i_s_)|(^i2d_s_)|(_dsap$)/,@a) if $no_dsa; | |
111 | ||
112 | @a=grep(!/^n_pkey$/,@a) if $no_rsa || $no_rc4; | |
113 | ||
114 | @a=grep(!/_dhp$/,@a) if $no_dh; | |
115 | ||
116 | @a=grep(!/(^sha[^1])|(_sha$)|(m_dss$)/,@a) if $no_sha; | |
117 | @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; | |
118 | @a=grep(!/_mdc2$/,@a) if $no_mdc2; | |
119 | ||
0b13e9f0 | 120 | @a=grep(!/^engine$/,@a) if $no_engine; |
58964a49 RE |
121 | @a=grep(!/(^rsa$)|(^genrsa$)|(^req$)|(^ca$)/,@a) if $no_rsa; |
122 | @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa; | |
123 | @a=grep(!/^gendsa$/,@a) if $no_sha1; | |
124 | @a=grep(!/(^dh$)|(^gendh$)/,@a) if $no_dh; | |
125 | ||
126 | @a=grep(!/(^dh)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; | |
127 | ||
128 | grep($_="$dir/$_",@a); | |
129 | @a=grep(!/(^|\/)s_/,@a) if $no_sock; | |
130 | @a=grep(!/(^|\/)bio_sock/,@a) if $no_sock; | |
131 | $ret=join(' ',@a)." "; | |
132 | return($ret); | |
133 | } | |
134 |