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

archer 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 af10e1b470 lib_ustname:keep the incrementally compiled version time 
updated
af10e1b470 is described below

commit af10e1b470571e16807f00b0702119e36b109410
Author: xuxin19 <[email protected]>
AuthorDate: Tue May 21 21:37:28 2024 +0800

    lib_ustname:keep the incrementally compiled version time updated
    
    fix phoney target mismatch issue, always rebuild ustname
    
    Signed-off-by: xuxin19 <[email protected]>
---
 libs/libc/misc/CMakeLists.txt | 8 ++++++++
 libs/libc/misc/Make.defs      | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/libs/libc/misc/CMakeLists.txt b/libs/libc/misc/CMakeLists.txt
index d9ae54b35f..3beabec7f1 100644
--- a/libs/libc/misc/CMakeLists.txt
+++ b/libs/libc/misc/CMakeLists.txt
@@ -112,4 +112,12 @@ if(CONFIG_FDCHECK)
   list(APPEND SRCS lib_fdcheck.c)
 endif()
 
+if(NOT CONFIG_LIBC_UNAME_DISABLE_TIMESTAMP)
+  add_custom_target(
+    always_rebuild_lib_utsname
+    COMMAND ${CMAKE_COMMAND} -E touch 
${CMAKE_CURRENT_SOURCE_DIR}/lib_utsname.c)
+
+  add_dependencies(c always_rebuild_lib_utsname)
+endif()
+
 target_sources(c PRIVATE ${SRCS})
diff --git a/libs/libc/misc/Make.defs b/libs/libc/misc/Make.defs
index c3d19570f7..c5a1bda008 100644
--- a/libs/libc/misc/Make.defs
+++ b/libs/libc/misc/Make.defs
@@ -80,7 +80,7 @@ endif
 # add lib_utsname.o to phony target for force rebuild
 
 #if !defined(CONFIG_LIBC_UNAME_DISABLE_TIMESTAMP)
-.PHONY: lib_utsname$(OBJEXT)
+.PHONY: bin$(DELIM)lib_utsname$(OBJEXT) kbin$(DELIM)lib_utsname$(OBJEXT)
 #endif
 
 # Add the misc directory to the build

Reply via email to