kconfig: Revert back to old behaviour pre-kconfiglib.py
Run Kconfig on every reconfigure but with different fragments depending on the situation. When .config is missing or when a file from merge_config_file has been modified use the merge_config_file's as input, otherwise use .config as input. This should match the behaviour before kconfiglib.py was introduced and fixes #5673. Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
parent
db31de5df6
commit
2c8aa87138
1 changed files with 24 additions and 17 deletions
|
@ -122,24 +122,31 @@ else()
|
|||
set(CREATE_NEW_DOTCONFIG 0)
|
||||
endif()
|
||||
endif()
|
||||
if(CREATE_NEW_DOTCONFIG)
|
||||
execute_process(
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE}
|
||||
${PROJECT_SOURCE_DIR}/scripts/kconfig/kconfig.py
|
||||
${KCONFIG_ROOT}
|
||||
${PROJECT_BINARY_DIR}/.config
|
||||
${PROJECT_BINARY_DIR}/include/generated/autoconf.h
|
||||
${merge_config_files}
|
||||
WORKING_DIRECTORY ${APPLICATION_SOURCE_DIR}
|
||||
# The working directory is set to the app dir such that the user
|
||||
# can use relative paths in CONF_FILE, e.g. CONF_FILE=nrf5.conf
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if(NOT "${ret}" STREQUAL "0")
|
||||
message(FATAL_ERROR "command failed with return code: ${ret}")
|
||||
endif()
|
||||
|
||||
if(CREATE_NEW_DOTCONFIG)
|
||||
set(merge_fragments ${merge_config_files})
|
||||
else()
|
||||
set(merge_fragments ${DOTCONFIG})
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE}
|
||||
${PROJECT_SOURCE_DIR}/scripts/kconfig/kconfig.py
|
||||
${KCONFIG_ROOT}
|
||||
${PROJECT_BINARY_DIR}/.config
|
||||
${PROJECT_BINARY_DIR}/include/generated/autoconf.h
|
||||
${merge_fragments}
|
||||
WORKING_DIRECTORY ${APPLICATION_SOURCE_DIR}
|
||||
# The working directory is set to the app dir such that the user
|
||||
# can use relative paths in CONF_FILE, e.g. CONF_FILE=nrf5.conf
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if(NOT "${ret}" STREQUAL "0")
|
||||
message(FATAL_ERROR "command failed with return code: ${ret}")
|
||||
endif()
|
||||
|
||||
if(CREATE_NEW_DOTCONFIG)
|
||||
file(WRITE
|
||||
${merge_config_files_checksum_file}
|
||||
${merge_config_files_checksum}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue