From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH 6/7] meson: use dependency to gate block modules
Date: Wed, 16 Dec 2020 17:20:05 +0100 [thread overview]
Message-ID: <20201216162006.433850-7-pbonzini@redhat.com> (raw)
In-Reply-To: <20201216162006.433850-1-pbonzini@redhat.com>
This will allow converting the dependencies to meson options one by one,
because moving the tests to meson.build will get rid of the symbols
in config-host.mak.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/meson.build | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/block/meson.build b/block/meson.build
index 5dcc1e5cce..b02cb14aad 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -70,14 +70,14 @@ block_modules = {}
modsrc = []
foreach m : [
- ['CONFIG_CURL', 'curl', [curl, glib], 'curl.c'],
- ['CONFIG_GLUSTERFS', 'gluster', glusterfs, 'gluster.c'],
- ['CONFIG_LIBISCSI', 'iscsi', libiscsi, 'iscsi.c'],
- ['CONFIG_LIBNFS', 'nfs', libnfs, 'nfs.c'],
- ['CONFIG_LIBSSH', 'ssh', libssh, 'ssh.c'],
- ['CONFIG_RBD', 'rbd', rbd, 'rbd.c'],
+ [curl, 'curl', [curl, glib], 'curl.c'],
+ [glusterfs, 'gluster', glusterfs, 'gluster.c'],
+ [libiscsi, 'iscsi', libiscsi, 'iscsi.c'],
+ [libnfs, 'nfs', libnfs, 'nfs.c'],
+ [libssh, 'ssh', libssh, 'ssh.c'],
+ [rbd, 'rbd', rbd, 'rbd.c'],
]
- if config_host.has_key(m[0])
+ if m[0].found()
if enable_modules
modsrc += files(m[3])
endif
@@ -90,10 +90,10 @@ endforeach
# those are not exactly regular block modules, so treat them apart
if 'CONFIG_DMG' in config_host
foreach m : [
- ['CONFIG_LZFSE', 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
- ['CONFIG_BZIP2', 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
+ [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
+ [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
]
- if config_host.has_key(m[0])
+ if m[0].found()
module_ss = ss.source_set()
module_ss.add(when: m[2], if_true: files(m[3]))
block_modules += {m[1] : module_ss}
--
2.29.2
next prev parent reply other threads:[~2020-12-16 16:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 16:19 [PATCH 0/7] First round of meson bugfixes and cleanups for 6.0 Paolo Bonzini
2020-12-16 16:20 ` [PATCH 1/7] Makefile: add dummy target for build.ninja dependencies Paolo Bonzini
2020-12-16 16:20 ` [PATCH 2/7] meson: update submodule to 0.56.0 Paolo Bonzini
2020-12-16 16:52 ` Marc-André Lureau
2020-12-16 16:20 ` [PATCH 3/7] meson: switch minimum meson version " Paolo Bonzini
2020-12-16 16:53 ` Marc-André Lureau
2020-12-16 16:20 ` [PATCH 4/7] meson: fix detection of curses with pkgconfig Paolo Bonzini
2020-12-16 16:54 ` Marc-André Lureau
2020-12-16 16:20 ` [PATCH 5/7] meson: use pkg-config method for libudev Paolo Bonzini
2020-12-16 16:56 ` Marc-André Lureau
2020-12-16 16:20 ` Paolo Bonzini [this message]
2020-12-16 16:57 ` [PATCH 6/7] meson: use dependency to gate block modules Marc-André Lureau
2020-12-16 16:20 ` [PATCH 7/7] meson: cleanup Kconfig.host handling Paolo Bonzini
2020-12-16 17:18 ` Marc-André Lureau
-- strict thread matches above, loose matches on Subject: below --
2020-12-16 15:02 [PATCH 0/7] First round of meson bugfixes and cleanups for 6.0 Paolo Bonzini
2020-12-16 15:02 ` [PATCH 6/7] meson: use dependency to gate block modules Paolo Bonzini
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=20201216162006.433850-7-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).