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.pl126
1 files changed, 126 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..bc78510f56
--- /dev/null
+++ b/src/lib/libcrypto/util/mkfiles.pl
@@ -0,0 +1,126 @@
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-1.0",
55"fips-1.0/aes",
56"fips-1.0/des",
57"fips-1.0/dsa",
58"fips-1.0/dh",
59"fips-1.0/hmac",
60"fips-1.0/rand",
61"fips-1.0/rsa",
62"fips-1.0/sha",
63"ssl",
64"apps",
65"test",
66"tools"
67);
68
69foreach (@dirs) {
70 &files_dir ($_, "Makefile");
71}
72
73exit(0);
74
75sub files_dir
76{
77my ($dir, $makefile) = @_;
78
79my %sym;
80
81open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";
82
83my $s="";
84
85while (<IN>)
86 {
87 chop;
88 s/#.*//;
89 if (/^(\S+)\s*=\s*(.*)$/)
90 {
91 $o="";
92 ($s,$b)=($1,$2);
93 for (;;)
94 {
95 if ($b =~ /\\$/)
96 {
97 chop($b);
98 $o.=$b." ";
99 $b=<IN>;
100 chop($b);
101 }
102 else
103 {
104 $o.=$b." ";
105 last;
106 }
107 }
108 $o =~ s/^\s+//;
109 $o =~ s/\s+$//;
110 $o =~ s/\s+/ /g;
111
112 $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
113 $sym{$s}=$o;
114 }
115 }
116
117print "RELATIVE_DIRECTORY=$dir\n";
118
119foreach (sort keys %sym)
120 {
121 print "$_=$sym{$_}\n";
122 }
123print "RELATIVE_DIRECTORY=\n";
124
125close (IN);
126}