]> git.proxmox.com Git - mirror_qemu.git/blobdiff - scripts/minikconf.py
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2019-07-08-1' into...
[mirror_qemu.git] / scripts / minikconf.py
index 5421db0ed04cadafb232ca287bc36a42f4e315c8..3109a81db78c52fb129eed8de255166717bc2d79 100644 (file)
@@ -592,7 +592,7 @@ class KconfigParser:
         if not self.src.startswith(rest, self.cursor):
             return False
         length = len(rest)
-        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '|':
+        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '_':
             return False
         self.cursor += length
         return True
@@ -688,11 +688,13 @@ if __name__ == '__main__':
 
     data = KconfigData(mode)
     parser = KconfigParser(data)
+    external_vars = set()
     for arg in argv[3:]:
         m = re.match(r'^(CONFIG_[A-Z0-9_]+)=([yn]?)$', arg)
         if m is not None:
             name, value = m.groups()
             parser.do_assignment(name, value == 'y')
+            external_vars.add(name[7:])
         else:
             fp = open(arg, 'r')
             parser.parse_file(fp)
@@ -700,7 +702,8 @@ if __name__ == '__main__':
 
     config = data.compute_config()
     for key in sorted(config.keys()):
-        print ('CONFIG_%s=%s' % (key, ('y' if config[key] else 'n')))
+        if key not in external_vars:
+            print ('CONFIG_%s=%s' % (key, ('y' if config[key] else 'n')))
 
     deps = open(argv[2], 'w')
     for fname in data.previously_included: