metadata: add extract_events target

This will collect the events from the whole source tree
This commit is contained in:
Beat Küng 2020-11-26 13:47:47 +01:00 committed by Daniel Agar
parent 38f3b8d356
commit 60850fa528
2 changed files with 23 additions and 2 deletions

View File

@ -320,7 +320,7 @@ coverity_scan: px4_sitl_default
# Documentation
# --------------------------------------------------------------------
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata doxygen
.PHONY: parameters_metadata airframe_metadata module_documentation extract_events px4_metadata doxygen
parameters_metadata:
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters ver_gen
@ -331,7 +331,10 @@ airframe_metadata:
module_documentation:
@$(MAKE) --no-print-directory px4_sitl_default metadata_module_documentation
px4_metadata: parameters_metadata airframe_metadata module_documentation
extract_events:
@$(MAKE) --no-print-directory px4_sitl_default metadata_extract_events ver_gen
px4_metadata: parameters_metadata airframe_metadata module_documentation extract_events
doxygen:
@mkdir -p "$(SRC_DIR)"/build/doxygen

View File

@ -79,9 +79,27 @@ add_custom_target(metadata_module_documentation
USES_TERMINAL
)
set(events_src_path "${PX4_SOURCE_DIR}/src/lib/events")
add_custom_target(metadata_extract_events
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_events.py
--src-path ${PX4_SOURCE_DIR}/src
--json ${PX4_BINARY_DIR}/events/px4_full.json #--verbose
COMMAND ${PYTHON_EXECUTABLE} ${events_src_path}/libevents/scripts/combine.py
${PX4_BINARY_DIR}/events/px4_full.json
${events_src_path}/libevents/events/common.json
--output ${PX4_BINARY_DIR}/events/all_events_full.json
COMMAND ${PYTHON_EXECUTABLE} ${events_src_path}/libevents/scripts/validate.py
${PX4_BINARY_DIR}/events/all_events_full.json
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/compress.py
${PX4_BINARY_DIR}/events/all_events_full.json
COMMENT "Extracting events from full source"
USES_TERMINAL
)
add_custom_target(all_metadata
DEPENDS
metadata_airframes
metadata_parameters
metadata_module_documentation
metadata_extract_events
)