diff --git a/scripts/kconfig/kconfig.py b/scripts/kconfig/kconfig.py index b33afde2bdd..883dd1fd992 100755 --- a/scripts/kconfig/kconfig.py +++ b/scripts/kconfig/kconfig.py @@ -58,6 +58,13 @@ def main(): kconf.load_config(config, replace=False) + # Write the merged configuration and the C header. This will evaluate all + # symbols, which might generate additional warnings, so do it before + # checking for warnings. + kconf.write_config(args.dotconfig) + kconf.write_autoconf(args.autoconf) + + # Print warnings for symbols whose actual value doesn't match the assigned # value for sym in kconf.defined_syms: @@ -93,13 +100,6 @@ def main(): .format(warning, sys.argv[0])) - # Write the merged configuration - kconf.write_config(args.dotconfig) - - # Write the C header - kconf.write_autoconf(args.autoconf) - - # Message printed when a promptless symbol is assigned (and doesn't get the # assigned value) PROMPTLESS_HINT = """