tools: Write Kconfig files always

Write COMPONENT_KCONFIGS_SOURCE_FILE and
COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE files always even when
COMPONENT_KCONFIGS or COMPONENT_KCONFIGS_PROJBUILD are empty variables
because kconfiglib expects them to exist.
This commit is contained in:
Roland Dobai 2019-11-19 15:09:27 +01:00
parent a74988ae3b
commit e533c88760

View file

@ -54,7 +54,9 @@ def _prepare_source_files(env_dict):
old_content = f.read()
except Exception:
# File doesn't exist or other issue
old_content = ''
old_content = None
# "None" ensures that it won't be equal to new_content when it is empty string because files need to be
# created for empty environment variables as well
if new_content != old_content:
# write or rewrite file only if it is necessary