kconfig: support plain comment in the menu

This commit is contained in:
morris
2022-08-02 19:01:19 +08:00
parent 307d26659e
commit 104bd44377
3 changed files with 7 additions and 15 deletions

View File

@@ -1,4 +1,6 @@
menu "LCD and Touch Panel" menu "LCD and Touch Panel"
comment "LCD Touch Drivers are maintained in the IDF Component Registry"
menu "LCD Peripheral Configuration" menu "LCD Peripheral Configuration"
config LCD_PANEL_IO_FORMAT_BUF_SIZE config LCD_PANEL_IO_FORMAT_BUF_SIZE
int "LCD panel io format buffer size" int "LCD panel io format buffer size"

View File

@@ -1996,7 +1996,6 @@ tools/find_build_apps/__init__.py
tools/find_build_apps/cmake.py tools/find_build_apps/cmake.py
tools/find_build_apps/common.py tools/find_build_apps/common.py
tools/kconfig_new/confserver.py tools/kconfig_new/confserver.py
tools/kconfig_new/gen_kconfig_doc.py
tools/kconfig_new/test/confgen/test_confgen.py tools/kconfig_new/test/confgen/test_confgen.py
tools/kconfig_new/test/confserver/test_confserver.py tools/kconfig_new/test/confserver/test_confserver.py
tools/kconfig_new/test/gen_kconfig_doc/test_kconfig_out.py tools/kconfig_new/test/gen_kconfig_doc/test_kconfig_out.py

View File

@@ -7,19 +7,8 @@
# generated, allowing options to be referenced in other documents # generated, allowing options to be referenced in other documents
# (using :ref:`CONFIG_FOO`) # (using :ref:`CONFIG_FOO`)
# #
# Copyright 2017-2020 Espressif Systems (Shanghai) PTE LTD # SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD
# # SPDX-License-Identifier: Apache-2.0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function from __future__ import print_function
import re import re
@@ -108,6 +97,8 @@ class ConfigTargetVisibility(object):
return (False, None) return (False, None)
def _visible(self, node): def _visible(self, node):
if node.item == kconfiglib.COMMENT:
return (False, None)
if isinstance(node.item, kconfiglib.Symbol) or isinstance(node.item, kconfiglib.Choice): if isinstance(node.item, kconfiglib.Symbol) or isinstance(node.item, kconfiglib.Choice):
dependencies = node.item.direct_dep # "depends on" for configs dependencies = node.item.direct_dep # "depends on" for configs
name_id = node.item.name name_id = node.item.name
@@ -159,7 +150,7 @@ def write_docs(config, visibility, filename):
def node_is_menu(node): def node_is_menu(node):
try: try:
return node.item == kconfiglib.MENU or node.is_menuconfig return node.item in [kconfiglib.MENU, kconfiglib.COMMENT] or node.is_menuconfig
except AttributeError: except AttributeError:
return False # not all MenuNodes have is_menuconfig for some reason return False # not all MenuNodes have is_menuconfig for some reason