File tree Expand file tree Collapse file tree 2 files changed +350
-342
lines changed Expand file tree Collapse file tree 2 files changed +350
-342
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ sub update_dep
314
314
315
315
print " Processing $filename \n " ;
316
316
317
- # convert filename to upper case so we can use it as a define
317
+ # convert filename to upper case so we can use it as a define
318
318
$define =~ tr / [a-z]/ [A-Z]/ ;
319
319
$define =~ tr / \./ _/ ;
320
320
print {$class } " # define $define \n " ;
@@ -339,7 +339,7 @@ sub update_dep
339
339
$apply = 1;
340
340
}
341
341
while (<$src >) {
342
- if (!( $_ = ~ / tommath\. h/ ) ) {
342
+ if ($_ ! ~ / tommath\. h/ ) {
343
343
print {$out } $_ ;
344
344
}
345
345
}
@@ -378,17 +378,22 @@ sub update_dep
378
378
$content =~ s { /\* .*?\* /} {} gs ;
379
379
380
380
# scan for mp_* and make classes
381
+ my @deps = ();
381
382
foreach my $line (split /\n/, $content ) {
382
383
while ($line =~ / (fast_)?(s_)?mp\_ [a-z_0-9]*(?=\( )|(?<=\( )mp\_ [a-z_0-9]*(?=,)/g ) {
383
384
my $a = $& ;
384
385
next if $a eq " mp_err" ;
385
386
$a =~ tr / [a-z]/ [A-Z]/ ;
386
387
$a = ' BN_' . $a . ' _C' ;
387
- if (!($list =~ / $a / )) {
388
- print {$class } " # define $a \n " ;
389
- }
390
- $list = $list . ' ,' . $a ;
388
+ push @deps , $a ;
389
+ }
390
+ }
391
+ @deps = sort (@deps );
392
+ foreach my $a (@deps ) {
393
+ if ($list !~ / $a / ) {
394
+ print {$class } " # define $a \n " ;
391
395
}
396
+ $list = $list . ' ,' . $a ;
392
397
}
393
398
$depmap {$filename } = $list ;
394
399
You can’t perform that action at this time.
0 commit comments