From b752715893ff78c2191e24e842fce677841cfebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 3 Jun 2015 09:59:06 +0100 Subject: [PATCH] Expand config.pl's notion of "full" Make sure bugs in PLATFORM_xxx_ALT are catched --- scripts/config.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/config.pl b/scripts/config.pl index c105a2321..6ee1345e9 100755 --- a/scripts/config.pl +++ b/scripts/config.pl @@ -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") {