]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - scripts/kconfig/streamline_config.pl
localmodconfig: Recognize more keywords that end a menu entry
[mirror_ubuntu-bionic-kernel.git] / scripts / kconfig / streamline_config.pl
index f3d3fb42b8735e76aa54bd4c433574f7afc43b0e..64d750cc5ae424d0764e852ba03c1624c392c214 100755 (executable)
@@ -188,7 +188,7 @@ sub read_kconfig {
        $cont = 0;
 
        # collect any Kconfig sources
-       if (/^source\s*"(.*)"/) {
+       if (/^source\s+"?([^"]+)/) {
            my $kconfig = $1;
            # prevent reading twice.
            if (!defined($read_kconfigs{$kconfig})) {
@@ -256,8 +256,8 @@ sub read_kconfig {
 
            $iflevel-- if ($iflevel);
 
-       # stop on "help"
-       } elsif (/^\s*help\s*$/) {
+       # stop on "help" and keywords that end a menu entry
+       } elsif (/^\s*help\s*$/ || /^(comment|choice|menu)\b/) {
            $state = "NONE";
        }
     }