build: prevent subsystems.json from being gen
Actual files make terrible dependency targets in CMake. Wrap the generation of subsystems.json into a custom target to get around this. Fixes a problem where parse_syscalls.py was being called multiple times. Fixes: #23504 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
cf720f9882
commit
c1c54b13a6
2 changed files with 7 additions and 5 deletions
|
@ -54,7 +54,7 @@ set(SYSCALL_LIST_H_TARGET syscall_list_h_target)
|
|||
set(DRIVER_VALIDATION_H_TARGET driver_validation_h_target)
|
||||
set(KOBJ_TYPES_H_TARGET kobj_types_h_target)
|
||||
set(LINKER_SCRIPT_TARGET linker_script_target)
|
||||
|
||||
set(PARSE_SYSCALLS_TARGET parse_syscalls_target)
|
||||
|
||||
define_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT BRIEF_DOCS " " FULL_DOCS " ")
|
||||
set_property( GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-little${ARCH}) # BFD format
|
||||
|
@ -598,6 +598,8 @@ add_custom_command(
|
|||
)
|
||||
|
||||
add_custom_target(${SYSCALL_LIST_H_TARGET} DEPENDS ${syscall_list_h})
|
||||
add_custom_target(${PARSE_SYSCALLS_TARGET}
|
||||
DEPENDS ${syscalls_json} ${subsys_json})
|
||||
|
||||
# 64-bit systems do not require special handling of 64-bit system call
|
||||
# parameters or return values, indicate this to the system call boilerplate
|
||||
|
@ -617,7 +619,7 @@ add_custom_command(OUTPUT include/generated/syscall_dispatch.c ${syscall_list_h}
|
|||
--syscall-list ${syscall_list_h}
|
||||
${SYSCALL_LONG_REGISTERS_ARG}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${syscalls_json}
|
||||
DEPENDS ${PARSE_SYSCALLS_TARGET}
|
||||
)
|
||||
|
||||
# This is passed into all calls to the gen_kobject_list.py script.
|
||||
|
@ -634,7 +636,7 @@ add_custom_command(
|
|||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
|
||||
DEPENDS
|
||||
${ZEPHYR_BASE}/scripts/gen_kobject_list.py
|
||||
${subsys_json}
|
||||
${PARSE_SYSCALLS_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
add_custom_target(${DRIVER_VALIDATION_H_TARGET} DEPENDS ${DRV_VALIDATION})
|
||||
|
@ -954,7 +956,7 @@ if(CONFIG_USERSPACE)
|
|||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
|
||||
DEPENDS
|
||||
${ZEPHYR_PREBUILT_EXECUTABLE}
|
||||
${subsys_json}
|
||||
${PARSE_SYSCALLS_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
add_custom_target(obj_list DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${OBJ_LIST})
|
||||
|
|
|
@ -25,7 +25,7 @@ function(gen_kobj gen_dir_out)
|
|||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
|
||||
DEPENDS
|
||||
$ENV{ZEPHYR_BASE}/scripts/gen_kobject_list.py
|
||||
${subsys_json}
|
||||
${PARSE_SYSCALLS_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
add_custom_target(${KOBJ_TYPES_H_TARGET} DEPENDS ${KOBJ_TYPES} ${KOBJ_OTYPE})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue