summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/mkfiles.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/util/mkfiles.pl')
-rw-r--r--src/lib/libcrypto/util/mkfiles.pl125
1 files changed, 125 insertions, 0 deletions
diff --git a/src/lib/libcrypto/util/mkfiles.pl b/src/lib/libcrypto/util/mkfiles.pl
new file mode 100644
index 0000000000..928a274303
--- /dev/null
+++ b/src/lib/libcrypto/util/mkfiles.pl
@@ -0,0 +1,125 @@
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
9my @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/dh",
59"fips/rand",
60"fips/rsa",
61"fips/sha1",
62"ssl",
63"apps",
64"test",
65"tools"
66);
67
68foreach (@dirs) {
69 &files_dir ($_, "Makefile");
70}
71
72exit(0);
73
74sub files_dir
75{
76my ($dir, $makefile) = @_;
77
78my %sym;
79
80open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";
81
82my $s="";
83
84while (<IN>)
85 {
86 chop;
87 s/#.*//;
88 if (/^(\S+)\s*=\s*(.*)$/)
89 {
90 $o="";
91 ($s,$b)=($1,$2);
92 for (;;)
93 {
94 if ($b =~ /\\$/)
95 {
96 chop($b);
97 $o.=$b." ";
98 $b=<IN>;
99 chop($b);
100 }
101 else
102 {
103 $o.=$b." ";
104 last;
105 }
106 }
107 $o =~ s/^\s+//;
108 $o =~ s/\s+$//;
109 $o =~ s/\s+/ /g;
110
111 $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
112 $sym{$s}=$o;
113 }
114 }
115
116print "RELATIVE_DIRECTORY=$dir\n";
117
118foreach (sort keys %sym)
119 {
120 print "$_=$sym{$_}\n";
121 }
122print "RELATIVE_DIRECTORY=\n";
123
124close (IN);
125}