Import OpenSSL-0.9.8i.
[dragonfly.git] / crypto / openssl-0.9.7e / util / mkfiles.pl
blob7c9d9d58e66851062592480ff74217f1d356cf60
1 #!/usr/local/bin/perl
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.
7 # List of directories to process
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/bn",
28 "crypto/rsa",
29 "crypto/dsa",
30 "crypto/dso",
31 "crypto/dh",
32 "crypto/ec",
33 "crypto/buffer",
34 "crypto/bio",
35 "crypto/stack",
36 "crypto/lhash",
37 "crypto/rand",
38 "crypto/err",
39 "crypto/objects",
40 "crypto/evp",
41 "crypto/asn1",
42 "crypto/pem",
43 "crypto/x509",
44 "crypto/x509v3",
45 "crypto/conf",
46 "crypto/txt_db",
47 "crypto/pkcs7",
48 "crypto/pkcs12",
49 "crypto/comp",
50 "crypto/engine",
51 "crypto/ocsp",
52 "crypto/ui",
53 "crypto/krb5",
54 "fips",
55 "fips/aes",
56 "fips/des",
57 "fips/dsa",
58 "fips/rand",
59 "fips/rsa",
60 "fips/sha1",
61 "ssl",
62 "apps",
63 "test",
64 "tools"
67 foreach (@dirs) {
68 &files_dir ($_, "Makefile");
71 exit(0);
73 sub files_dir
75 my ($dir, $makefile) = @_;
77 my %sym;
79 open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";
81 my $s="";
83 while (<IN>)
85 chop;
86 s/#.*//;
87 if (/^(\S+)\s*=\s*(.*)$/)
89 $o="";
90 ($s,$b)=($1,$2);
91 for (;;)
93 if ($b =~ /\\$/)
95 chop($b);
96 $o.=$b." ";
97 $b=<IN>;
98 chop($b);
100 else
102 $o.=$b." ";
103 last;
106 $o =~ s/^\s+//;
107 $o =~ s/\s+$//;
108 $o =~ s/\s+/ /g;
110 $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
111 $sym{$s}=$o;
115 print "RELATIVE_DIRECTORY=$dir\n";
117 foreach (sort keys %sym)
119 print "$_=$sym{$_}\n";
121 print "RELATIVE_DIRECTORY=\n";
123 close (IN);