@@ -788,12 +788,12 @@ set(struct_tags_json ${CMAKE_CURRENT_BINARY_DIR}/misc/generated/struct_tags.json
788
788
# The syscalls subdirs txt file is constructed by python containing a list of folders to use for
789
789
# dependency handling, including empty folders.
790
790
# Windows: The list is used to specify DIRECTORY list with CMAKE_CONFIGURE_DEPENDS attribute.
791
- # Other OS: The list will update whenever a file is added/removed/modified and ensure a re-build .
791
+ # Other OS: The list file is updated whenever a directory is added or removed .
792
792
set (syscalls_subdirs_txt ${CMAKE_CURRENT_BINARY_DIR} /misc/generated /syscalls_subdirs.txt)
793
793
794
- # As syscalls_subdirs_txt is updated whenever a file is modified , this file can not be used for
795
- # monitoring of added / removed folders . A trigger file is thus used for correct dependency
796
- # handling. The trigger file will update when a folder is added / removed .
794
+ # As syscalls_subdirs_txt is updated only on directory add or remove , this file can not be used for
795
+ # monitoring of syscall changes . A trigger file is thus used for correct dependency handling. The
796
+ # trigger file will update when syscalls change .
797
797
set (syscalls_subdirs_trigger ${CMAKE_CURRENT_BINARY_DIR} /misc/generated /syscalls_subdirs.trigger)
798
798
799
799
if (NOT (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Windows))
@@ -812,14 +812,13 @@ execute_process(
812
812
)
813
813
file (STRINGS ${syscalls_subdirs_txt} PARSE_SYSCALLS_PATHS_DEPENDS ENCODING UTF-8)
814
814
815
+ # Each header file must be monitored as file modifications are not reflected on directory level.
816
+ file (GLOB_RECURSE PARSE_SYSCALLS_HEADER_DEPENDS ${ZEPHYR_BASE} /include /*.h)
817
+
815
818
if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Windows)
816
819
# On windows only adding/removing files or folders will be reflected in depends.
817
820
# Hence adding a file requires CMake to re-run to add this file to the file list.
818
821
set_property (DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PARSE_SYSCALLS_PATHS_DEPENDS} )
819
-
820
- # Also On Windows each header file must be monitored as file modifications are not reflected
821
- # on directory level.
822
- file (GLOB_RECURSE PARSE_SYSCALLS_HEADER_DEPENDS ${ZEPHYR_BASE} /include /*.h)
823
822
else ()
824
823
# The syscall parsing depends on the folders in order to detect add/removed/modified files.
825
824
# When a folder is removed, CMake will try to find a target that creates that dependency.
@@ -850,10 +849,10 @@ else()
850
849
file (WRITE ${syscalls_subdirs_txt} "" )
851
850
endif ()
852
851
853
- # On other OS'es, modifying a file is reflected on the folder timestamp and hence detected
852
+ # On other OS'es, using git checkout is reflected on the folder timestamp and hence detected
854
853
# when using depend on directory level.
855
854
# Thus CMake only needs to re-run when sub-directories are added / removed, which is indicated
856
- # using a trigger file .
855
+ # by syscalls_subdirs_txt being updated .
857
856
set_property (DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${syscalls_subdirs_txt} )
858
857
endif ()
859
858
0 commit comments