[PATCH] streamline_config.pl: handle also ${CONFIG_FOO}

From: Jiri Slaby (SUSE)
Date: Wed Jun 07 2023 - 02:14:39 EST


From: Jiri Slaby <jslaby@xxxxxxx>

streamline_config.pl currently searches for CONFIG options in Kconfig
files as $(CONFIG_FOO). But some Kconfigs (e.g. thunderbolt) use
${CONFIG_FOO}. So fix up the regex to accept both.

This fixes:
$ make LSMOD=`pwd/`/lsmod localmodconfig
using config: '.config'
thunderbolt config not found!!

Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
Cc: andreas.noever@xxxxxxxxx
Cc: michael.jamet@xxxxxxxxx
Cc: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
Cc: YehezkelShB@xxxxxxxxx
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Linux Kbuild mailing list <linux-kbuild@xxxxxxxxxxxxxxx>
---
scripts/kconfig/streamline_config.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 3387ad7508f7..d51cd7ac15d2 100755
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -317,7 +317,7 @@ foreach my $makefile (@makefiles) {
$_ = convert_vars($_, %make_vars);

# collect objects after obj-$(CONFIG_FOO_BAR)
- if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
+ if (/obj-\$[({](CONFIG_[^})]*)[)}]\s*[+:]?=\s*(.*)/) {
$var = $1;
$objs = $2;

--
2.41.0