mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00

Abstract common invocations of "cargo", that do not require copying the generated bindgen file or setting up MESON_BUILD_ROOT. In the future these could also do completely without cargo and invoke the underlying programs directly. Reviewed-by: Junjie Mao <junjie.mao@hotmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
26 lines
715 B
Meson
26 lines
715 B
Meson
subdir('qemu-api-macros')
|
|
subdir('qemu-api')
|
|
|
|
subdir('hw')
|
|
|
|
cargo = find_program('cargo', required: false)
|
|
|
|
if cargo.found()
|
|
run_target('clippy',
|
|
command: [config_host['MESON'], 'devenv',
|
|
'--workdir', '@CURRENT_SOURCE_DIR@',
|
|
cargo, 'clippy', '--tests'],
|
|
depends: bindings_rs)
|
|
|
|
run_target('rustfmt',
|
|
command: [config_host['MESON'], 'devenv',
|
|
'--workdir', '@CURRENT_SOURCE_DIR@',
|
|
cargo, 'fmt'],
|
|
depends: bindings_rs)
|
|
|
|
run_target('rustdoc',
|
|
command: [config_host['MESON'], 'devenv',
|
|
'--workdir', '@CURRENT_SOURCE_DIR@',
|
|
cargo, 'doc', '--no-deps', '--document-private-items'],
|
|
depends: bindings_rs)
|
|
endif
|