]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - crypto/openssl/util/mkfiles.pl
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / crypto / openssl / util / mkfiles.pl
1 #!/usr/local/bin/perl
2 #
3 # This is a hacked version of files.pl for systems that can't do a 'make files'.
4 # Do a perl util/mkminfo.pl >MINFO to build MINFO
5 # Written by Steve Henson 1999.
6
7 # List of directories to process
8
9 my @dirs = (
10 ".",
11 "crypto",
12 "crypto/md2",
13 "crypto/md4",
14 "crypto/md5",
15 "crypto/sha",
16 "crypto/mdc2",
17 "crypto/hmac",
18 "crypto/ripemd",
19 "crypto/des",
20 "crypto/rc2",
21 "crypto/rc4",
22 "crypto/rc5",
23 "crypto/idea",
24 "crypto/bf",
25 "crypto/cast",
26 "crypto/aes",
27 "crypto/camellia",
28 "crypto/seed",
29 "crypto/bn",
30 "crypto/rsa",
31 "crypto/dsa",
32 "crypto/dso",
33 "crypto/dh",
34 "crypto/ec",
35 "crypto/ecdh",
36 "crypto/ecdsa",
37 "crypto/buffer",
38 "crypto/bio",
39 "crypto/stack",
40 "crypto/lhash",
41 "crypto/rand",
42 "crypto/err",
43 "crypto/objects",
44 "crypto/evp",
45 "crypto/asn1",
46 "crypto/pem",
47 "crypto/x509",
48 "crypto/x509v3",
49 "crypto/conf",
50 "crypto/jpake",
51 "crypto/txt_db",
52 "crypto/pkcs7",
53 "crypto/pkcs12",
54 "crypto/comp",
55 "crypto/engine",
56 "crypto/ocsp",
57 "crypto/ui",
58 "crypto/krb5",
59 "crypto/store",
60 "crypto/pqueue",
61 "crypto/cms",
62 "fips",
63 "fips/aes",
64 "fips/des",
65 "fips/dsa",
66 "fips/dh",
67 "fips/hmac",
68 "fips/rand",
69 "fips/rsa",
70 "fips/sha",
71 "ssl",
72 "apps",
73 "engines",
74 "test",
75 "tools"
76 );
77
78 foreach (@dirs) {
79         &files_dir ($_, "Makefile");
80 }
81
82 exit(0);
83
84 sub files_dir
85 {
86 my ($dir, $makefile) = @_;
87
88 my %sym;
89
90 open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";
91
92 my $s="";
93
94 while (<IN>)
95         {
96         chop;
97         s/#.*//;
98         if (/^(\S+)\s*=\s*(.*)$/)
99                 {
100                 $o="";
101                 ($s,$b)=($1,$2);
102                 for (;;)
103                         {
104                         if ($b =~ /\\$/)
105                                 {
106                                 chop($b);
107                                 $o.=$b." ";
108                                 $b=<IN>;
109                                 chop($b);
110                                 }
111                         else
112                                 {
113                                 $o.=$b." ";
114                                 last;
115                                 }
116                         }
117                 $o =~ s/^\s+//;
118                 $o =~ s/\s+$//;
119                 $o =~ s/\s+/ /g;
120
121                 $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
122                 $sym{$s}=$o;
123                 }
124         }
125
126 print "RELATIVE_DIRECTORY=$dir\n";
127
128 foreach (sort keys %sym)
129         {
130         print "$_=$sym{$_}\n";
131         }
132 print "RELATIVE_DIRECTORY=\n";
133
134 close (IN);
135 }