You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ra...@apache.org on 2023/12/20 15:05:26 UTC

(nuttx) branch master updated: Revert "cmake: restore old behavior for savedefconfig"

This is an automated email from the ASF dual-hosted git repository.

raiden00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new a506f9fb70 Revert "cmake: restore old behavior for savedefconfig"
a506f9fb70 is described below

commit a506f9fb709fa7d3d6646d6c9ffd2246ded8e377
Author: chao an <an...@lixiang.com>
AuthorDate: Mon Dec 18 21:00:50 2023 +0800

    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 forge [...]
    
    This reverts commit 751bc1528a8e9f3bfbe1701619b4894f1d6dcb86.
    
    Signed-off-by: chao an <an...@lixiang.com>
---
 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