aboutsummaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-09-07 19:23:49 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-09-13 13:56:26 +0200
commitd051d0e14c7a0b198d41694a4e20f0bc5ae76048 (patch)
tree0dd9a8fc8d7d58dd60f25e5cc4246a368a6fb43c /trace
parent95e2289fdac8e329f3282e943715e2a5c4e3177b (diff)
downloadqemu-d051d0e14c7a0b198d41694a4e20f0bc5ae76048.zip
qemu-d051d0e14c7a0b198d41694a4e20f0bc5ae76048.tar.gz
qemu-d051d0e14c7a0b198d41694a4e20f0bc5ae76048.tar.bz2
meson: look up cp and dtrace with find_program()
Avoid that meson prints a "Program xyz found" test once per custom_target. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'trace')
-rw-r--r--trace/meson.build5
1 files changed, 3 insertions, 2 deletions
diff --git a/trace/meson.build b/trace/meson.build
index ef18f11..e401e7c 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -2,6 +2,7 @@
specific_ss.add(files('control-target.c'))
trace_events_files = []
+dtrace = find_program('dtrace', required: 'CONFIG_TRACE_DTRACE' in config_host)
foreach dir : [ '.' ] + trace_events_subdirs
trace_events_file = meson.source_root() / dir / 'trace-events'
trace_events_files += [ trace_events_file ]
@@ -39,13 +40,13 @@ foreach dir : [ '.' ] + trace_events_subdirs
trace_dtrace_h = custom_target(fmt.format('trace-dtrace', 'h'),
output: fmt.format('trace-dtrace', 'h'),
input: trace_dtrace,
- command: [ 'dtrace', '-DSTAP_SDT_V2', '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ])
+ command: [ dtrace, '-DSTAP_SDT_V2', '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ])
trace_ss.add(trace_dtrace_h)
if host_machine.system() != 'darwin'
trace_dtrace_o = custom_target(fmt.format('trace-dtrace', 'o'),
output: fmt.format('trace-dtrace', 'o'),
input: trace_dtrace,
- command: [ 'dtrace', '-DSTAP_SDT_V2', '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ])
+ command: [ dtrace, '-DSTAP_SDT_V2', '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ])
trace_ss.add(trace_dtrace_o)
endif