summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfiglib.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index b73ea10..4de8d40 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2179,6 +2179,16 @@ class Kconfig(object):
"set".format(node.item.name, env_var),
self._filename, self._linenr)
+ if env_var != node.item.name:
+ self._warn("Kconfiglib expands environment variables "
+ "in strings directly, meaning you do not "
+ "need 'option env=...' \"bounce\" symbols. "
+ "For compatibility with the C tools, "
+ "rename {} to {} (so that the symbol name "
+ "matches the environment variable name)."
+ .format(node.item.name, env_var),
+ self._filename, self._linenr)
+
elif self._check_token(_T_DEFCONFIG_LIST):
if not self.defconfig_list:
self.defconfig_list = node.item