diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-01-11 15:31:10 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-01-11 15:44:16 +0100 |
| commit | 1c96f432946cec67eb77b0a5f4300818031d6636 (patch) | |
| tree | 3a347807577ef226e388c22fa5db1d45e50b954a /kconfiglib.py | |
| parent | cc2415eb092c7611104e3f3773d0b5921c91a976 (diff) | |
Mention that $CONFIG_ is used for C headers too
Piggyback some cleanup and redundant comment removal.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 413738f..261dc93 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -476,8 +476,9 @@ class Kconfig(object): config_prefix: The value of the $CONFIG_ environment variable when the configuration was - loaded. This is the prefix used (and expected) in .config files. Defaults - to "CONFIG_". Used in the same way in the C tools. + loaded. This is the prefix used (and expected) on symbol names in .config + files and C headers. Defaults to "CONFIG_". Used in the same way in the C + tools. Like for srctree, only the value of $CONFIG_ when the configuration is loaded matters. @@ -843,7 +844,6 @@ class Kconfig(object): and include a final terminating newline. """ with open(filename, "w") as f: - # Small optimization write = f.write @@ -2058,7 +2058,6 @@ class Kconfig(object): # The choice symbols themselves, because the y mode selection might # change if a choice symbol's visibility changes for sym in choice.syms: - # the default selection depends on the symbols sym._dependents.add(choice) def _invalidate_all(self): @@ -2462,8 +2461,8 @@ class Symbol(object): # Otherwise, look at defaults for val_expr, cond in self.defaults: if expr_value(cond): - self._write_to_conf = True val = val_expr.str_value + self._write_to_conf = True break # Corresponds to SYMBOL_AUTO in the C implementation @@ -2586,7 +2585,6 @@ class Symbol(object): .format(self.kconfig.config_prefix, self.name, val) if self.orig_type == STRING: - # Escape \ and " return '{}{}="{}"\n' \ .format(self.kconfig.config_prefix, self.name, escape(val)) |
