Kconfig: Rename $ENV_VAR_{ARCH,BOARD_DIR} to $ARCH/$BOARD_DIR

The prefixes might be a leftover from the old 'option env="..."' symbols
(which are no longer needed). Since environment variables can be
referenced directly now, there's no point in having a prefix.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2018-09-05 12:58:05 +02:00 committed by Anas Nashif
commit d0e8752a52
6 changed files with 16 additions and 16 deletions

View file

@ -15,9 +15,9 @@
# Board defaults should be parsed before SoC defaults, because boards usually
# overrides SoC values.
#
# Note: $ENV_VAR_ARCH and $ENV_VAR_BOARD_DIR might be glob patterns.
source "$ENV_VAR_BOARD_DIR/Kconfig.defconfig"
source "arch/$ENV_VAR_ARCH/soc/*/Kconfig.defconfig"
# Note: $ARCH and $BOARD_DIR might be glob patterns.
source "$BOARD_DIR/Kconfig.defconfig"
source "arch/$ARCH/soc/*/Kconfig.defconfig"
source "arch/Kconfig"

View file

@ -12,8 +12,8 @@
# overriden (by defining symbols in multiple locations)
source "boards/Kconfig"
# Note: $ENV_VAR_ARCH might be a glob pattern
source "arch/$ENV_VAR_ARCH/Kconfig"
# Note: $ARCH might be a glob pattern
source "arch/$ARCH/Kconfig"
choice

View file

@ -13,17 +13,17 @@ config QEMU_TARGET
Mark all QEMU targets with this variable for checking whether we are
running in an emulated environment.
# Note: $ENV_VAR_BOARD_DIR might be a glob pattern
# Note: $BOARD_DIR might be a glob pattern
choice
prompt "Board Selection"
source "$ENV_VAR_BOARD_DIR/Kconfig.board"
source "$BOARD_DIR/Kconfig.board"
endchoice
menu "Board Options"
# There might not be any board options, hence the optional source
osource "$ENV_VAR_BOARD_DIR/Kconfig"
osource "$BOARD_DIR/Kconfig"
endmenu
menu "Shields"

View file

@ -20,8 +20,8 @@ set(ENV{KCONFIG_AUTOHEADER} ${AUTOCONF_H})
# 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{ARCH} ${ARCH})
set(ENV{BOARD_DIR} ${BOARD_DIR})
add_custom_target(
menuconfig
@ -29,8 +29,8 @@ add_custom_target(
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}
ARCH=$ENV{ARCH}
BOARD_DIR=$ENV{BOARD_DIR}
${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/kconfig/menuconfig.py ${KCONFIG_ROOT}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/kconfig
USES_TERMINAL

View file

@ -115,8 +115,8 @@ add_custom_target(
COMMAND ${CMAKE_COMMAND} -E env
PYTHONPATH="${ZEPHYR_BASE}/scripts/kconfig${SEP}$ENV{PYTHONPATH}"
srctree=${ZEPHYR_BASE}
ENV_VAR_BOARD_DIR=boards/*/*/
ENV_VAR_ARCH=*
BOARD_DIR=boards/*/*/
ARCH=*
KERNELVERSION=${PROJECT_VERSION}
SRCARCH=x86
${PYTHON_EXECUTABLE} scripts/genrest.py Kconfig ${RST_OUT}/doc/reference/kconfig/

View file

@ -105,8 +105,8 @@ def run_kconfig_undef_ref_check(tc, commit_range):
os.environ["srctree"] = repository_path
# Parse the entire Kconfig tree, to make sure we see all symbols
os.environ["ENV_VAR_BOARD_DIR"] = "boards/*/*"
os.environ["ENV_VAR_ARCH"] = "*"
os.environ["BOARD_DIR"] = "boards/*/*"
os.environ["ARCH"] = "*"
# Enable strict Kconfig mode in Kconfiglib, which assumes there's just a
# single Kconfig tree and warns for all references to undefined symbols