Revert "cmake: restore old behavior for savedefconfig"

@raiden00pl I'm surprised why this commit was reverted. It maintains the same functionality as tools/refresh.sh. this change is a good improvement because overwriting the original defconfig to prevent developers from missing out on enabled or disabled features during the development process. If you find any changes in the defconfig after saving it, you should manually restore it, git diff will tell you what has happened. and also this feature prevents more junior developers from forgetting to save their own defconfig

This reverts commit 751bc1528a.

Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
chao an 2023-12-18 21:00:50 +08:00 committed by Mateusz Szafoni
parent 6b3aa3b6b9
commit a506f9fb70
1 changed files with 2 additions and 0 deletions

View File

@ -98,6 +98,8 @@ add_custom_target(
COMMAND echo "\\#" >> ${CMAKE_BINARY_DIR}/warning.tmp COMMAND echo "\\#" >> ${CMAKE_BINARY_DIR}/warning.tmp
COMMAND cat ${CMAKE_BINARY_DIR}/warning.tmp COMMAND cat ${CMAKE_BINARY_DIR}/warning.tmp
${CMAKE_BINARY_DIR}/sortedconfig.tmp > ${CMAKE_BINARY_DIR}/defconfig ${CMAKE_BINARY_DIR}/sortedconfig.tmp > ${CMAKE_BINARY_DIR}/defconfig
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/defconfig
${NUTTX_DEFCONFIG}
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/warning.tmp COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/warning.tmp
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/defconfig.tmp COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/defconfig.tmp
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/sortedconfig.tmp COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/sortedconfig.tmp