streamline_config.pl: ensure all defaults are tracked
authorDavid Hunter <david.hunter.linux@gmail.com>
Mon, 14 Oct 2024 14:13:32 +0000 (10:13 -0400)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 5 Nov 2024 23:46:33 +0000 (08:46 +0900)
Track default options on the second line. On the second line of some
config entries, default and dependency options sometimes appear. In those
instances, the state will be "NEW" and not "DEP".

Signed-off-by: David Hunter <david.hunter.linux@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/streamline_config.pl

index a85d6a3..85f4712 100755 (executable)
@@ -220,7 +220,7 @@ sub read_kconfig {
            $depends{$config} = $1;
        } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) {
            $depends{$config} .= " " . $1;
-       } elsif ($state eq "DEP" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) {
+       } elsif ($state ne "NONE" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) {
            my $dep = $3;
            if ($dep !~ /^\s*(y|m|n)\s*$/) {
                $dep =~ s/.*\sif\s+//;