Fixed "config.pl get" for options with no value
Between 2.5.0 and 2.6.0, "scripts/config.pl get MBEDTLS_XXX" was fixed
for config.h lines with a comment at the end, but that broke the case
of macros with an empty expansion. Support all cases.
diff --git a/scripts/config.pl b/scripts/config.pl
index 406413b..4cf4ac8 100755
--- a/scripts/config.pl
+++ b/scripts/config.pl
@@ -205,7 +205,7 @@
$done = 1;
}
} elsif (!$done && $action eq "get") {
- if ($line =~ /^\s*#define\s*$name\s*([^\s]+)\s*\b/) {
+ if ($line =~ /^\s*#define\s*$name(?:\s+(.*?))\s*(?:$|\/\*|\/\/)/) {
$value = $1;
$done = 1;
}