Add libcrypto.pc and libssl.pc, and install them along with openssl.pc.
[openssl.git] / 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/bn",
28 "crypto/rsa",
29 "crypto/dsa",
30 "crypto/dso",
31 "crypto/dh",
32 "crypto/ec",
33 "crypto/ecdh",
34 "crypto/ecdsa",
35 "crypto/buffer",
36 "crypto/bio",
37 "crypto/stack",
38 "crypto/lhash",
39 "crypto/rand",
40 "crypto/err",
41 "crypto/objects",
42 "crypto/evp",
43 "crypto/asn1",
44 "crypto/pem",
45 "crypto/x509",
46 "crypto/x509v3",
47 "crypto/conf",
48 "crypto/txt_db",
49 "crypto/pkcs7",
50 "crypto/pkcs12",
51 "crypto/comp",
52 "crypto/engine",
53 "crypto/ocsp",
54 "crypto/ui",
55 "crypto/krb5",
56 "crypto/store",
57 "crypto/pqueue",
58 "ssl",
59 "apps",
60 "engines",
61 "test",
62 "tools"
63 );
64
65 foreach (@dirs) {
66         &files_dir ($_, "Makefile");
67 }
68
69 exit(0);
70
71 sub files_dir
72 {
73 my ($dir, $makefile) = @_;
74
75 my %sym;
76
77 open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";
78
79 my $s="";
80
81 while (<IN>)
82         {
83         chop;
84         s/#.*//;
85         if (/^(\S+)\s*=\s*(.*)$/)
86                 {
87                 $o="";
88                 ($s,$b)=($1,$2);
89                 for (;;)
90                         {
91                         if ($b =~ /\\$/)
92                                 {
93                                 chop($b);
94                                 $o.=$b." ";
95                                 $b=<IN>;
96                                 chop($b);
97                                 }
98                         else
99                                 {
100                                 $o.=$b." ";
101                                 last;
102                                 }
103                         }
104                 $o =~ s/^\s+//;
105                 $o =~ s/\s+$//;
106                 $o =~ s/\s+/ /g;
107
108                 $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
109                 $sym{$s}=$o;
110                 }
111         }
112
113 print "RELATIVE_DIRECTORY=$dir\n";
114
115 foreach (sort keys %sym)
116         {
117         print "$_=$sym{$_}\n";
118         }
119 print "RELATIVE_DIRECTORY=\n";
120
121 close (IN);
122 }