mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
Merge branch 'bugfix/menuconfig_module' into 'master'
tools: Invoke menuconfig as named module Closes IDFGH-4417 See merge request espressif/esp-idf!11588
This commit is contained in:
@@ -105,7 +105,7 @@ export MENUCONFIG_STYLE ?= aquatic
|
|||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
MENUCONFIG_CMD := $(KCONFIG_TOOL_DIR)/mconf-idf
|
MENUCONFIG_CMD := $(KCONFIG_TOOL_DIR)/mconf-idf
|
||||||
else
|
else
|
||||||
MENUCONFIG_CMD := $(PYTHON) $(IDF_PATH)/tools/kconfig_new/menuconfig.py
|
MENUCONFIG_CMD := $(PYTHON) -m menuconfig
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: term_check
|
.PHONY: term_check
|
||||||
|
@@ -257,7 +257,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
|
|||||||
|
|
||||||
set(MENUCONFIG_CMD ${mconf})
|
set(MENUCONFIG_CMD ${mconf})
|
||||||
else()
|
else()
|
||||||
set(MENUCONFIG_CMD ${python} ${idf_path}/tools/kconfig_new/menuconfig.py)
|
set(MENUCONFIG_CMD ${python} -m menuconfig)
|
||||||
set(TERM_CHECK_CMD ${python} ${idf_path}/tools/check_term.py)
|
set(TERM_CHECK_CMD ${python} ${idf_path}/tools/check_term.py)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -1,43 +0,0 @@
|
|||||||
# Copyright 2020 Espressif Systems (Shanghai) CO LTD
|
|
||||||
#
|
|
||||||
# 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 unicode_literals
|
|
||||||
from distutils.sysconfig import get_python_lib
|
|
||||||
import os
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
def main(args):
|
|
||||||
"""
|
|
||||||
Helper function to invoke menuconfig.py from the kconfiglib package. It invokes menuconfig as a process because:
|
|
||||||
1. kconfiblib/menuconfig.py invoked directly has advantage over calling menuconfig() - Kconfiglib object needs to
|
|
||||||
be prepared but it still reads the sdkconfig file,
|
|
||||||
2. command line invoked from make/cmake can be the same for menuconfig.py and mconf-idf.
|
|
||||||
"""
|
|
||||||
cmd = [sys.executable]
|
|
||||||
|
|
||||||
# path where menuconfig is installed from the kconfiglib package:
|
|
||||||
cmd += [os.path.join(get_python_lib(), 'menuconfig.py')]
|
|
||||||
|
|
||||||
# args is expected to be [ '$IDF_PATH/Kconfig' ]:
|
|
||||||
cmd += args
|
|
||||||
|
|
||||||
print('Running', ' '.join(cmd))
|
|
||||||
subprocess.check_call(cmd)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main(sys.argv[1:])
|
|
Reference in New Issue
Block a user