1
0
Fork 0
forked from nuttx/nuttx-update

cmake: Renamed savedefconfig with refreshsilent

Renamed savedefconfig -> refreshsilent name more consistent with the refresh stage for cmake on github.

Added new savedefconfig to fix
https://github.com/apache/nuttx/issues/14281
This commit is contained in:
simbit18 2024-10-18 12:27:32 +02:00 committed by Xiang Xiao
parent 0496984338
commit 791d7c97d0
2 changed files with 14 additions and 3 deletions

View file

@ -72,7 +72,7 @@ add_custom_target(
# utility target to refresh .config from board's defconfig for GITHUB # utility target to refresh .config from board's defconfig for GITHUB
add_custom_target( add_custom_target(
savedefconfig refreshsilent
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/SAVEconfig COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/SAVEconfig
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/.config COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/.config
${CMAKE_BINARY_DIR}/SAVEconfig ${CMAKE_BINARY_DIR}/SAVEconfig
@ -87,3 +87,14 @@ add_custom_target(
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/defconfig COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/defconfig
${NUTTX_DEFCONFIG} ${NUTTX_DEFCONFIG}
WORKING_DIRECTORY ${NUTTX_DIR}) WORKING_DIRECTORY ${NUTTX_DIR})
# utility target to replace defconfig to board's defconfig
add_custom_target(
savedefconfig
COMMAND ${CMAKE_COMMAND} -E env ${KCONFIG_ENV} savedefconfig --out
${CMAKE_BINARY_DIR}/defconfig.tmp
COMMAND ${CMAKE_COMMAND} -P ${NUTTX_DIR}/cmake/savedefconfig.cmake
${CMAKE_BINARY_DIR}/.config ${CMAKE_BINARY_DIR}/defconfig.tmp
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/defconfig
${NUTTX_DEFCONFIG}
WORKING_DIRECTORY ${NUTTX_DIR})

View file

@ -450,8 +450,8 @@ function refresh_cmake {
kconfig-tweak --file $nuttx/build/.config -d $toolchain kconfig-tweak --file $nuttx/build/.config -d $toolchain
fi fi
if ! cmake --build build -t savedefconfig 1>/dev/null; then if ! cmake --build build -t refreshsilent 1>/dev/null; then
cmake --build build -t savedefconfig cmake --build build -t refreshsilent
fail=1 fail=1
fi fi