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

@ -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/)) {
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