summaryrefslogtreecommitdiff
path: root/menuconfig.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-08-24 01:45:01 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-08-24 01:45:01 +0200
commit64600b307d74180837b23ee4e20a777a352feeee (patch)
treec6c002010637759acd6d702e2926f4371b43d43e /menuconfig.py
parentd500ed84103ff8f63c59bba7401319bb81521efb (diff)
menuconfig: Hide the include path for top-level items
Came out as "Included via " for items in the top-level Kconfig file, which looks broken.
Diffstat (limited to 'menuconfig.py')
-rwxr-xr-xmenuconfig.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/menuconfig.py b/menuconfig.py
index 8c575b5..fd34eb7 100755
--- a/menuconfig.py
+++ b/menuconfig.py
@@ -2086,7 +2086,7 @@ def _kconfig_def_info(item):
for node in nodes:
s += "\n\n" \
"At {}:{}\n" \
- "Included via {}\n" \
+ "{}" \
"Menu path: {}\n\n" \
"{}" \
.format(node.filename, node.linenr,
@@ -2097,8 +2097,13 @@ def _kconfig_def_info(item):
return s
def _include_path_info(node):
- return " -> ".join("{}:{}".format(filename, linenr)
- for filename, linenr in node.include_path)
+ if not node.include_path:
+ # In the top-level Kconfig file
+ return ""
+
+ return "Included via {}\n".format(
+ " -> ".join("{}:{}".format(filename, linenr)
+ for filename, linenr in node.include_path))
def _menu_path_info(node):
# Returns a string describing the menu path leading up to 'node'