From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PULL 14/21] meson: look up cp and dtrace with find_program()
Date: Mon, 13 Sep 2021 13:57:35 +0200 [thread overview]
Message-ID: <20210913115742.533197-15-pbonzini@redhat.com> (raw)
In-Reply-To: <20210913115742.533197-1-pbonzini@redhat.com>
Avoid that meson prints a "Program xyz found" test once per
custom_target.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
pc-bios/keymaps/meson.build | 3 ++-
trace/meson.build | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
index 05eda6c0d2..44247a12b5 100644
--- a/pc-bios/keymaps/meson.build
+++ b/pc-bios/keymaps/meson.build
@@ -38,6 +38,7 @@ if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host
else
native_qemu_keymap = qemu_keymap
endif
+cp = find_program('cp')
t = []
foreach km, args: keymaps
@@ -55,7 +56,7 @@ foreach km, args: keymaps
build_by_default: true,
input: km,
output: km,
- command: ['cp', '@INPUT@', '@OUTPUT@'],
+ command: [cp, '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: qemu_datadir / 'keymaps')
endif
diff --git a/trace/meson.build b/trace/meson.build
index ef18f11d64..e401e7c415 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
--
2.31.1
next prev parent reply other threads:[~2021-09-13 12:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 11:57 [PULL 00/21] x86, docs, meson changes for 2021-09-13 Paolo Bonzini
2021-09-13 11:57 ` [PULL 01/21] target/i386: add missing bits to CR4_RESERVED_MASK Paolo Bonzini
2021-09-13 11:57 ` [PULL 02/21] target/i386: VMRUN and VMLOAD canonicalizations Paolo Bonzini
2021-09-13 11:57 ` [PULL 03/21] target/i386: Added VGIF feature Paolo Bonzini
2021-09-13 11:57 ` [PULL 04/21] target/i386: Moved int_ctl into CPUX86State structure Paolo Bonzini
2021-09-13 11:57 ` [PULL 05/21] target/i386: Added VGIF V_IRQ masking capability Paolo Bonzini
2021-09-13 11:57 ` [PULL 06/21] target/i386: Added ignore TPR check in ctl_has_irq Paolo Bonzini
2021-09-13 11:57 ` [PULL 07/21] target/i386: Added changed priority check for VIRQ Paolo Bonzini
2021-09-13 11:57 ` [PULL 08/21] target/i386: Added vVMLOAD and vVMSAVE feature Paolo Bonzini
2021-09-13 11:57 ` [PULL 09/21] docs: standardize book titles to === with overline Paolo Bonzini
2021-09-13 11:57 ` [PULL 10/21] docs: standardize directory index to --- " Paolo Bonzini
2021-09-13 11:57 ` [PULL 11/21] docs/system: standardize man page sections " Paolo Bonzini
2021-09-13 11:57 ` [PULL 12/21] docs/system: move x86 CPU configuration to a separate document Paolo Bonzini
2021-09-13 11:57 ` [PULL 13/21] meson.build: Do not look for VNC-related libraries if have_system is not set Paolo Bonzini
2021-09-13 11:57 ` Paolo Bonzini [this message]
2021-09-13 11:57 ` [PULL 15/21] meson: do not use python.full_path() unnecessarily Paolo Bonzini
2021-09-13 11:57 ` [PULL 16/21] meson: remove dead variable Paolo Bonzini
2021-09-13 11:57 ` [PULL 17/21] fw_cfg: add etc/msr_feature_control Paolo Bonzini
2021-09-13 11:57 ` [PULL 18/21] util: Suppress -Wstringop-overflow in qemu_thread_start Paolo Bonzini
2021-09-13 11:57 ` [PULL 19/21] Only check CONFIG_NVMM when NEED_CPU_H is defined Paolo Bonzini
2021-09-13 11:57 ` [PULL 20/21] Fix nvmm_ram_block_added() function arguments Paolo Bonzini
2021-09-13 11:57 ` [PULL 21/21] docs: link to archived Fedora code of conduct Paolo Bonzini
2021-09-13 16:57 ` [PULL 00/21] x86, docs, meson changes for 2021-09-13 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210913115742.533197-15-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).