]> git.ipfire.org Git - thirdparty/openssl.git/blame - util/mkfiles.pl
More tweaks for comments due indent issues
[thirdparty/openssl.git] / util / mkfiles.pl
CommitLineData
e2d795cb
DSH
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 = (
ee0508d4 10".",
e2d795cb
DSH
11"crypto",
12"crypto/md2",
3009458e 13"crypto/md4",
e2d795cb
DSH
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",
6f9079fd 26"crypto/aes",
f3dea9a5 27"crypto/camellia",
96afc1cf 28"crypto/seed",
0f76640f 29"crypto/modes",
18f3385d 30"crypto/cmac",
e2d795cb
DSH
31"crypto/bn",
32"crypto/rsa",
33"crypto/dsa",
9ec0126e 34"crypto/dso",
e2d795cb 35"crypto/dh",
b4f682d3 36"crypto/ec",
b2be73e4 37"crypto/ecdh",
01682a8b 38"crypto/ecdsa",
e2d795cb
DSH
39"crypto/buffer",
40"crypto/bio",
41"crypto/stack",
42"crypto/lhash",
43"crypto/rand",
44"crypto/err",
45"crypto/objects",
46"crypto/evp",
47"crypto/asn1",
48"crypto/pem",
49"crypto/x509",
50"crypto/x509v3",
deb21fba 51"crypto/cms",
e2d795cb 52"crypto/conf",
ab7e09f5 53"crypto/jpake",
e2d795cb
DSH
54"crypto/txt_db",
55"crypto/pkcs7",
ee0508d4 56"crypto/pkcs12",
e2d795cb 57"crypto/comp",
5270e702 58"crypto/engine",
eb64730b 59"crypto/ocsp",
14056ee2 60"crypto/ui",
d1149393 61"crypto/krb5",
863d447e 62#"crypto/store",
6c61726b 63"crypto/pqueue",
ec645d90 64"crypto/whrlpool",
c7235be6 65"crypto/ts",
edc032b5 66"crypto/srp",
e2d795cb 67"ssl",
e2d795cb 68"apps",
c687a3d5 69"engines",
eef0c1f3 70"engines/ccgost",
e2d795cb
DSH
71"test",
72"tools"
73);
74
4287ade5
AP
75%top;
76
227d6a93
DSH
77my $fipscanisteronly = 0;
78
e2d795cb 79foreach (@dirs) {
227d6a93 80 next if ($fipscanisteronly && !(-d $_));
f68854b4 81 &files_dir ($_, "Makefile");
e2d795cb
DSH
82}
83
84exit(0);
85
86sub files_dir
87{
88my ($dir, $makefile) = @_;
89
90my %sym;
91
92open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";
93
94my $s="";
95
96while (<IN>)
97 {
98 chop;
99 s/#.*//;
83084112 100 if (/^([^\s=]+)\s*=\s*(.*)$/)
e2d795cb
DSH
101 {
102 $o="";
103 ($s,$b)=($1,$2);
104 for (;;)
105 {
106 if ($b =~ /\\$/)
107 {
108 chop($b);
109 $o.=$b." ";
110 $b=<IN>;
111 chop($b);
112 }
113 else
114 {
115 $o.=$b." ";
116 last;
117 }
118 }
119 $o =~ s/^\s+//;
120 $o =~ s/\s+$//;
121 $o =~ s/\s+/ /g;
122
4287ade5
AP
123 $o =~ s/\$[({]([^)}]+)[)}]/$top{$1} or $sym{$1}/ge;
124 $sym{$s}=($top{$s} or $o);
e2d795cb
DSH
125 }
126 }
127
128print "RELATIVE_DIRECTORY=$dir\n";
129
130foreach (sort keys %sym)
131 {
132 print "$_=$sym{$_}\n";
133 }
4287ade5
AP
134if ($dir eq "." && defined($sym{"BUILDENV"}))
135 {
136 foreach (split(' ',$sym{"BUILDENV"}))
137 {
138 /^(.+)=/;
139 $top{$1}=$sym{$1};
140 }
141 }
142
e2d795cb
DSH
143print "RELATIVE_DIRECTORY=\n";
144
145close (IN);
e161120e 146if ($dir eq "." && $sym{FIPSCANISTERONLY} eq "y")
227d6a93
DSH
147 {
148 $fipscanisteronly = 1;
149 }
e2d795cb 150}