kconfig: Remove targets specific to the C implementation

They will no longer be available once the C Kconfig implementation is
removed.

oldconfig and allno/yesconfig implementations are available for
kconfiglib and could be added later if needed. savedefconfig (minimal
configuration generation) is available from the menuconfig.py
configuration interface.

cmake/usage/kconfig-usage.cmake becomes kinda pointless after this
change, so merge it into cmake/usage/usage.cmake.

Remove the kconfig_target, COMMAND_FOR_*, and COMMAND_RUNS_ON_WIN_*
CMake variables, as there's just the 'menuconfig' target now.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
This commit is contained in:
Ulf Magnusson 2018-05-02 04:16:28 +02:00 committed by Carles Cufí
commit 890a5a5aa1
3 changed files with 15 additions and 59 deletions

View file

@ -18,51 +18,23 @@ set(ENV{KERNELVERSION} ${PROJECT_VERSION})
set(ENV{KCONFIG_CONFIG} ${DOTCONFIG})
set(ENV{KCONFIG_AUTOHEADER} ${AUTOCONF_H})
set(kconfig_target_list
config
gconfig
menuconfig
oldconfig
xconfig
)
set(COMMAND_FOR_config ${KCONFIG_CONF} --oldaskconfig ${KCONFIG_ROOT})
set(COMMAND_FOR_gconfig gconf ${KCONFIG_ROOT})
set(COMMAND_FOR_menuconfig ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/kconfig/menuconfig.py ${KCONFIG_ROOT})
set(COMMAND_FOR_oldconfig ${KCONFIG_CONF} --oldconfig ${KCONFIG_ROOT})
set(COMMAND_FOR_xconfig qconf ${KCONFIG_ROOT})
set(COMMAND_RUNS_ON_WIN_menuconfig 1)
# Set environment variables so that Kconfig can prune Kconfig source
# files for other architectures
set(ENV{ENV_VAR_ARCH} ${ARCH})
set(ENV{ENV_VAR_BOARD_DIR} ${BOARD_DIR})
set(ENV{ENV_VAR_ARCH} ${ARCH})
set(ENV{ENV_VAR_BOARD_DIR} ${BOARD_DIR})
foreach(kconfig_target ${kconfig_target_list})
if ((NOT WIN32) OR (DEFINED COMMAND_RUNS_ON_WIN_${kconfig_target}))
add_custom_target(
${kconfig_target}
${CMAKE_COMMAND} -E env
srctree=${ZEPHYR_BASE}
KERNELVERSION=${PROJECT_VERSION}
KCONFIG_CONFIG=${DOTCONFIG}
ENV_VAR_ARCH=$ENV{ENV_VAR_ARCH}
ENV_VAR_BOARD_DIR=$ENV{ENV_VAR_BOARD_DIR}
${COMMAND_FOR_${kconfig_target}}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/kconfig
USES_TERMINAL
)
else()
add_custom_target(
${kconfig_target}
${CMAKE_COMMAND} -E echo
"========================================="
"Reconfiguration not supported on Windows."
"========================================="
)
endif()
endforeach()
add_custom_target(
menuconfig
${CMAKE_COMMAND} -E env
srctree=${ZEPHYR_BASE}
KERNELVERSION=${PROJECT_VERSION}
KCONFIG_CONFIG=${DOTCONFIG}
ENV_VAR_ARCH=$ENV{ENV_VAR_ARCH}
ENV_VAR_BOARD_DIR=$ENV{ENV_VAR_BOARD_DIR}
${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/kconfig/menuconfig.py ${KCONFIG_ROOT}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/kconfig
USES_TERMINAL
)
# Bring in extra configuration files dropped in by the user or anyone else;
# make sure they are set at the end so we can override any other setting

View file

@ -1,16 +0,0 @@
message(" config - Update current config utilising a line-oriented program")
message(" nconfig - Update current config utilising a ncurses menu based program")
message(" menuconfig - Update current config utilising a menu based program")
message(" pymenuconfig - Update current config with an experimental Python-based menuconfig, slated to replace menuconfig")
message(" xconfig - Update current config utilising a QT based front-end")
message(" gconfig - Update current config utilising a GTK based front-end")
message(" oldconfig - Update current config utilising a provided .config as base")
message(" silentoldconfig - Same as oldconfig, but quietly, additionally update deps")
message(" defconfig - New config with default from ARCH supplied defconfig")
message(" savedefconfig - Save current config as ./defconfig (minimal config)")
message(" allnoconfig - New config where all options are answered with no")
message(" allyesconfig - New config where all options are accepted with yes")
message(" alldefconfig - New config with all symbols set to default")
message(" randconfig - New config with random answer to all options")
message(" listnewconfig - List new options")
message(" olddefconfig - Same as silentoldconfig but sets new symbols to their default value")

View file

@ -42,7 +42,7 @@ message(" pristine - Remove all files in the build directory")
message("")
message("Configuration targets:")
message("")
message(" run <${generator} kconfig-usage>")
message(" menuconfig - Update configuration using an interactive configuration interface")
message("")
message("Other generic targets:")
message(" all - Build a zephyr application")