From b65baa47f69ae4c3993876a7edf0da0075aa70ff Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 17 Nov 2018 09:21:13 +0100 Subject: Add support for KCONFIG_ALLCONFIG This allows some symbol values to be forced while running all{def,no,yes,mod}config.py. See Documentation/kbuild/kconfig.txt in the Linux kernel. Add a helper function load_allconfig() to Kconfiglib to avoid code duplication in the tools. Also add functions for enabling/disabling the warning that's generated when a symbol is assigned multiple times in a (set of) .config files and the values differ. It should be disabled when merging the KCONFIG_ALLCONFIG configuration file. Previously, only the warning generated when the assigned values are identical could be disabled. Disable all warnings related to assigning a symbol multiple times in examples/merge_config.py as well. --- examples/merge_config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/merge_config.py b/examples/merge_config.py index bcc627b..4b56cb8 100644 --- a/examples/merge_config.py +++ b/examples/merge_config.py @@ -77,6 +77,12 @@ kconf.enable_undef_warnings() # set up here as well. The approach in examples/allnoconfig_simpler.py could # provide an allnoconfig starting state for example.) +# Disable warnings generated for multiple assignments to the same symbol within +# a (set of) configuration files. Assigning a symbol multiple times might be +# done intentionally when merging configuration files. +kconf.disable_override_warnings() +kconf.disable_redun_warnings() + # Create a merged configuration by loading the fragments with replace=False for config in sys.argv[3:]: kconf.load_config(config, replace=False) @@ -109,6 +115,6 @@ for sym in kconf.defined_syms: user_value = sym.user_value if user_value != sym.str_value: - print('warning: {} was assigned the value "{}" but got the ' - 'value "{}" -- check dependencies' + print("warning: {} was assigned the value '{}' but got the " + "value '{}' -- check dependencies" .format(name_and_loc(sym), user_value, sym.str_value)) -- cgit v1.2.3