sort tommath_class.h dependencies: this makes it easier to see changes

This commit is contained in:
Daniel Mendler 2019-06-06 23:01:51 +02:00 committed by Steffen Jaeckel
parent 7eb6f32186
commit 3ef6efd32a
No known key found for this signature in database
GPG Key ID: AF0CB17621EDAD72
2 changed files with 385 additions and 377 deletions

View File

@ -314,7 +314,7 @@ EOS
print "Processing $filename\n";
# convert filename to upper case so we can use it as a define
# convert filename to upper case so we can use it as a define
$define =~ tr/[a-z]/[A-Z]/;
$define =~ tr/\./_/;
print {$class} "# define $define\n";
@ -339,7 +339,7 @@ EOS
$apply = 1;
}
while (<$src>) {
if (!($_ =~ /tommath\.h/)) {
if ($_ !~ /tommath\.h/) {
print {$out} $_;
}
}
@ -378,18 +378,23 @@ EOS
$content =~ s{/\*.*?\*/}{}gs;
# scan for mp_* and make classes
my @deps = ();
foreach my $line (split /\n/, $content) {
while ($line =~ /(fast_)?(s_)?mp\_[a-z_0-9]*(?=\()|(?<=\()mp\_[a-z_0-9]*(?=,)/g) {
my $a = $&;
next if $a eq "mp_err";
$a =~ tr/[a-z]/[A-Z]/;
$a = 'BN_' . $a . '_C';
if (!($list =~ /$a/)) {
print {$class} "# define $a\n";
}
$list = $list . ',' . $a;
push @deps, $a;
}
}
@deps = sort(@deps);
foreach my $a (@deps) {
if ($list !~ /$a/) {
print {$class} "# define $a\n";
}
$list = $list . ',' . $a;
}
$depmap{$filename} = $list;
print {$class} "#endif\n\n";

File diff suppressed because it is too large Load Diff