minikconf: don't print CONFIG_FOO=n lines
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 25 Jul 2019 19:36:15 +0000 (23:36 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 21 Aug 2019 14:29:57 +0000 (16:29 +0200)
qemu in general doesn't define CONFIG_FOO if it's false.  This also
helps with the dumb kconfig parser from meson, as source_set considers
any non-empty value as true.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/minikconf.py

index 3109a81db78c52fb129eed8de255166717bc2d79..40ae1989e11f7c186eb9d4396122faa3b3632af8 100644 (file)
@@ -702,8 +702,8 @@ if __name__ == '__main__':
 
     config = data.compute_config()
     for key in sorted(config.keys()):
-        if key not in external_vars:
-            print ('CONFIG_%s=%s' % (key, ('y' if config[key] else 'n')))
+        if key not in external_vars and config[key]:
+            print ('CONFIG_%s=y' % key)
 
     deps = open(argv[2], 'w')
     for fname in data.previously_included: