mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:35:38 +01:00
Expand config.pl's notion of "full"
Make sure bugs in PLATFORM_xxx_ALT are catched
This commit is contained in:
parent
f2ec505c34
commit
b752715893
@ -36,6 +36,11 @@ POLARSSL_PKCS11_C
|
||||
_ALT\s*$
|
||||
);
|
||||
|
||||
# Things that should be enabled in "full" even if they match @excluded
|
||||
my @non_excluded = qw(
|
||||
PLATFORM_[A-Z0-9]+_ALT
|
||||
);
|
||||
|
||||
my $config_file = "include/polarssl/config.h";
|
||||
|
||||
# get -f option
|
||||
@ -76,6 +81,7 @@ my @config_lines = <$config_read>;
|
||||
close $config_read;
|
||||
|
||||
my $exclude_re = join '|', @excluded;
|
||||
my $no_exclude_re = join '|', @non_excluded;
|
||||
|
||||
open my $config_write, '>', $config_file or die "write $config_file: $!\n";
|
||||
|
||||
@ -86,7 +92,8 @@ for my $line (@config_lines) {
|
||||
$done = 1;
|
||||
}
|
||||
|
||||
if (!$done && $line =~ m!^//\s?#define! && $line !~ /$exclude_re/) {
|
||||
if (!$done && $line =~ m!^//\s?#define! &&
|
||||
( $line !~ /$exclude_re/ || $line =~ /$no_exclude_re/ ) ) {
|
||||
$line =~ s!^//!!;
|
||||
}
|
||||
} elsif ($action eq "unset") {
|
||||
|
Loading…
Reference in New Issue
Block a user