From 4212c72ff5025c039ed75c145a160260984f8320 Mon Sep 17 00:00:00 2001 From: weety <494406036@qq.com> Date: Wed, 5 Sep 2018 11:40:35 +0800 Subject: [PATCH] Support Writting mainmenu text competible with C tools. --- tools/kconfiglib.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/kconfiglib.py b/tools/kconfiglib.py index 098f5883f1..56b4083524 100644 --- a/tools/kconfiglib.py +++ b/tools/kconfiglib.py @@ -1145,6 +1145,13 @@ class Kconfig(object): with self._open(filename, "w") as f: f.write(header) + # written mainmenu_text + # The prompt (title) of the top_node menu, with Kconfig variable references + # ("$FOO") expanded. Defaults to "Linux Kernel Configuration" (like in the + # C tools). Can be changed with the 'mainmenu' statement (see + # kconfig-language.txt). + f.write("# {}\n#\n".format(self.top_node.prompt[0])) + for node in self.node_iter(unique_syms=True): item = node.item -- GitLab