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

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

commit 8b894bbbdf77325b1baf95462b3ba0f52f021b57
Author: wangjianyu3 <[email protected]>
AuthorDate: Mon Nov 23 13:32:54 2026 +0800

    system/toybox: fetch into the build directory
    
    The tarball, the unpacked and patched tree, its generated/ headers and
    .toybox_allconfig all live in the apps source tree, shared by every
    build directory. Two build directories that pick different applets
    overwrite each other's generated/ and relink against the wrong toy
    list. Fetch and unpack under CMAKE_CURRENT_BINARY_DIR instead
    (toybox-src, toybox-dl) and keep .toybox_allconfig there too: one
    self-contained copy per build directory, and deleting the build
    directory removes all of it. The patch stack and toybox's scripts are
    unchanged.
    
    Assisted-by: OpenCode:mimo-v2.6-pro
    Co-authored-by: multica-agent <[email protected]>
    Signed-off-by: wangjianyu3 <[email protected]>
---
 system/toybox/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/system/toybox/CMakeLists.txt b/system/toybox/CMakeLists.txt
index 4a14aa523..87eb4d2bc 100644
--- a/system/toybox/CMakeLists.txt
+++ b/system/toybox/CMakeLists.txt
@@ -22,7 +22,7 @@
 
 if(CONFIG_SYSTEM_TOYBOX)
 
-  set(TOYBOX_DIR ${CMAKE_CURRENT_LIST_DIR}/toybox)
+  set(TOYBOX_DIR ${CMAKE_CURRENT_BINARY_DIR}/toybox-src)
   set(TOYBOX_VERSION "${CONFIG_SYSTEM_TOYBOX_VERSION}")
   set(TOYBOX_STAMP ${TOYBOX_DIR}/.nuttx_patched-${TOYBOX_VERSION})
   set(TOYBOX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/toybox)
@@ -41,7 +41,7 @@ if(CONFIG_SYSTEM_TOYBOX)
         toybox_fetch
         URL "${CONFIG_SYSTEM_TOYBOX_URL}/${TOYBOX_VERSION}.tar.gz"
             DOWNLOAD_DIR
-            ${CMAKE_CURRENT_LIST_DIR}
+            ${CMAKE_CURRENT_BINARY_DIR}/toybox-dl
             SOURCE_DIR
             ${TOYBOX_DIR}
             BINARY_DIR
@@ -81,7 +81,7 @@ if(CONFIG_SYSTEM_TOYBOX)
   # 
############################################################################
 
   set(TOYBOX_NUTTX_CONFIG ${NUTTX_BINARY_DIR}/.config)
-  set(TOYBOX_ALLCONFIG ${CMAKE_CURRENT_LIST_DIR}/.toybox_allconfig)
+  set(TOYBOX_ALLCONFIG ${CMAKE_CURRENT_BINARY_DIR}/.toybox_allconfig)
   set(TOYBOX_TOYFILES ${TOYBOX_DIR}/generated/toyfiles.txt)
 
   # Toggling an applet in menuconfig must regenerate the applet list

Reply via email to