From a506f9fb709fa7d3d6646d6c9ffd2246ded8e377 Mon Sep 17 00:00:00 2001 From: chao an Date: Mon, 18 Dec 2023 21:00:50 +0800 Subject: [PATCH] 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 751bc1528a8e9f3bfbe1701619b4894f1d6dcb86. Signed-off-by: chao an --- cmake/menuconfig.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/menuconfig.cmake b/cmake/menuconfig.cmake index 4e0c3ad6b6..e8c9905f71 100644 --- a/cmake/menuconfig.cmake +++ b/cmake/menuconfig.cmake @@ -98,6 +98,8 @@ add_custom_target( COMMAND echo "\\#" >> ${CMAKE_BINARY_DIR}/warning.tmp COMMAND cat ${CMAKE_BINARY_DIR}/warning.tmp ${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}/defconfig.tmp COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/sortedconfig.tmp