diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-02-07 01:55:27 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-05-08 20:56:14 +0300 |
commit | 7e1529501883ce8741d8689c150f589ab68a814f (patch) | |
tree | 407e0c6b075a1b8872f7f9896948d79cbe5846ed /mesonbuild/modules | |
parent | a535ef6719816b23085da492dbcdcc4b7bfa8d2b (diff) | |
download | meson-7e1529501883ce8741d8689c150f589ab68a814f.zip meson-7e1529501883ce8741d8689c150f589ab68a814f.tar.gz meson-7e1529501883ce8741d8689c150f589ab68a814f.tar.bz2 |
rename unstable-kconfig to unstable-keyval
Discussions in #6524 have shown that there are various possible uses of the
kconfig module and even disagreements in the exact file format between
Python-based kconfiglib and the tools in Linux. Instead of trying to
reconcile them, just rename the module to something less suggestive and
leave any policy to meson.build files.
In the future it may be possible to add some kind of parsing through
keyword arguments such as bool_true, quoted_strings, etc. and possibly
creation of key-value lists too. For now, configuration_data objects
provide an easy way to access quoted strings. Note that Kconfig stores
false as "absent" so it was already necessary to write "x.has_key('abc')"
rather than the more compact "x['abc']". Therefore, having to use
configuration_data does not make things much more verbose.
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r-- | mesonbuild/modules/unstable_keyval.py (renamed from mesonbuild/modules/unstable_kconfig.py) | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mesonbuild/modules/unstable_kconfig.py b/mesonbuild/modules/unstable_keyval.py index 6685710..3da2992 100644 --- a/mesonbuild/modules/unstable_kconfig.py +++ b/mesonbuild/modules/unstable_keyval.py @@ -21,9 +21,9 @@ from ..interpreter import InvalidCode import os -class KconfigModule(ExtensionModule): +class KeyvalModule(ExtensionModule): - @FeatureNew('Kconfig Module', '0.51.0') + @FeatureNew('Keyval Module', '0.55.0') def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.snippets.add('load') @@ -56,9 +56,7 @@ class KconfigModule(ExtensionModule): s = sources[0] is_built = False if isinstance(s, mesonlib.File): - if s.is_built: - FeatureNew('kconfig.load() of built files', '0.52.0').use(state.subproject) - is_built = True + is_built = is_built or s.is_built s = s.absolute_path(interpreter.environment.source_dir, interpreter.environment.build_dir) else: s = os.path.join(interpreter.environment.source_dir, s) @@ -70,4 +68,4 @@ class KconfigModule(ExtensionModule): def initialize(*args, **kwargs): - return KconfigModule(*args, **kwargs) + return KeyvalModule(*args, **kwargs) |