diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-11-18 21:06:16 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-11-23 10:17:48 -0500 |
commit | 779b99c42bae1e503efb8a6ee2dd90fdbae896b5 (patch) | |
tree | ca3ee7e1192c460dd6ca08959f63ef4709c6f093 /lib/kconfiglib/kconfiglib.py | |
parent | 0d5b05c704d1e15de2ce075f70d0de9f29ba1386 (diff) | |
download | kutter-779b99c42bae1e503efb8a6ee2dd90fdbae896b5.tar.gz kutter-779b99c42bae1e503efb8a6ee2dd90fdbae896b5.tar.xz kutter-779b99c42bae1e503efb8a6ee2dd90fdbae896b5.zip |
kconfiglib: Update kconfiglib.py to always emit symbols
Emit all symbols (even ones disabled) to the autoconf.h header file.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'lib/kconfiglib/kconfiglib.py')
-rw-r--r-- | lib/kconfiglib/kconfiglib.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/kconfiglib/kconfiglib.py b/lib/kconfiglib/kconfiglib.py index c67895ce..fb5e4b76 100644 --- a/lib/kconfiglib/kconfiglib.py +++ b/lib/kconfiglib/kconfiglib.py @@ -1475,8 +1475,8 @@ class Kconfig(object): # instead, to avoid accessing the internal _write_to_conf variable # (though it's likely to keep working). val = sym.str_value - if not sym._write_to_conf: - continue + #if not sym._write_to_conf: + # continue if sym.orig_type in _BOOL_TRISTATE: if val == "y": @@ -1485,6 +1485,9 @@ class Kconfig(object): elif val == "m": add("#define {}{}_MODULE 1\n" .format(self.config_prefix, sym.name)) + else: + add("#define {}{} 0\n" + .format(self.config_prefix, sym.name)) elif sym.orig_type is STRING: add('#define {}{} "{}"\n' @@ -1494,6 +1497,8 @@ class Kconfig(object): if sym.orig_type is HEX and \ not val.startswith(("0x", "0X")): val = "0x" + val + if not val: + val = "0" add("#define {}{} {}\n" .format(self.config_prefix, sym.name, val)) |