[PATCH 078/143] meson: convert fsdev/

Paolo Bonzini posted 143 patches 5 years, 6 months ago
Maintainers: Anthony Perard <anthony.perard@citrix.com>, David Gibson <david@gibson.dropbear.id.au>, Keith Busch <kbusch@kernel.org>, Christian Borntraeger <borntraeger@de.ibm.com>, Helge Deller <deller@gmx.de>, Peter Maydell <peter.maydell@linaro.org>, Christian Schoenebeck <qemu_oss@crudebyte.com>, Laurent Vivier <laurent@vivier.eu>, Joel Stanley <joel@jms.id.au>, Raphael Norwitz <raphael.norwitz@nutanix.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Michael Rolnik <mrolnik@gmail.com>, Jason Wang <jasowang@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Alex Williamson <alex.williamson@redhat.com>, Juan Quintela <quintela@redhat.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Markus Armbruster <armbru@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Alexander Bulekov <alxndr@bu.edu>, Artyom Tarasenko <atar4qemu@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Sarah Harris <S.E.Harris@kent.ac.uk>, "Alex Bennée" <alex.bennee@linaro.org>, Stefan Weil <sw@weilnetz.de>, Riku Voipio <riku.voipio@iki.fi>, Stefan Berger <stefanb@linux.ibm.com>, Eduardo Habkost <ehabkost@redhat.com>, Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, Eric Blake <eblake@redhat.com>, Palmer Dabbelt <palmer@dabbelt.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Max Reitz <mreitz@redhat.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Richard Henderson <rth@twiddle.net>, Max Filippov <jcmvbkbc@gmail.com>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Huacai Chen <chenhc@lemote.com>, Aurelien Jarno <aurelien@aurel32.net>, Hannes Reinecke <hare@suse.com>, Stafford Horne <shorne@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Alistair Francis <Alistair.Francis@wdc.com>, Laszlo Ersek <lersek@redhat.com>, Bandan Das <bsd@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Andrzej Zaborowski <balrogg@gmail.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Su Hang <suhang16@mails.ucas.ac.cn>, Gerd Hoffmann <kraxel@redhat.com>, Amit Shah <amit@kernel.org>, Ben Warren <ben@skyportsystems.com>, "Cédric Le Goater" <clg@kaod.org>, Yuval Shaia <yuval.shaia.ml@gmail.com>, Fam Zheng <fam@euphon.net>, David Hildenbrand <david@redhat.com>, Greg Kurz <groug@kaod.org>, Thomas Huth <thuth@redhat.com>, Michael Roth <mdroth@linux.vnet.ibm.com>, Laurent Vivier <lvivier@redhat.com>, Paul Durrant <paul@xen.org>
There is a newer version of this series
[PATCH 078/143] meson: convert fsdev/
Posted by Paolo Bonzini 5 years, 6 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile.objs       |  4 +---
 fsdev/Makefile.objs | 12 ------------
 fsdev/meson.build   | 10 ++++++++++
 3 files changed, 11 insertions(+), 15 deletions(-)
 delete mode 100644 fsdev/Makefile.objs

diff --git a/Makefile.objs b/Makefile.objs
index 65b0ae6..79812c4 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -38,9 +38,7 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-$(CONFIG_LINUX) = fsdev/
-
-common-obj-y += accel/
+common-obj-y = accel/
 
 common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
diff --git a/fsdev/Makefile.objs b/fsdev/Makefile.objs
deleted file mode 100644
index 42cd70c..0000000
--- a/fsdev/Makefile.objs
+++ /dev/null
@@ -1,12 +0,0 @@
-# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
-# only pull in the actual 9p backend if we also enabled virtio or xen.
-ifeq ($(CONFIG_FSDEV_9P),y)
-common-obj-y = qemu-fsdev.o 9p-marshal.o 9p-iov-marshal.o
-else
-common-obj-y = qemu-fsdev-dummy.o
-endif
-common-obj-y += qemu-fsdev-opts.o qemu-fsdev-throttle.o
-
-# Toplevel always builds this; targets without virtio will put it in
-# common-obj-y
-common-obj-$(CONFIG_ALL) += qemu-fsdev-dummy.o
diff --git a/fsdev/meson.build b/fsdev/meson.build
index d0daa2a..656dff6 100644
--- a/fsdev/meson.build
+++ b/fsdev/meson.build
@@ -1,3 +1,13 @@
+fsdev_ss = ss.source_set()
+fsdev_ss.add(files('qemu-fsdev-opts.c', 'qemu-fsdev-throttle.c'))
+fsdev_ss.add(when: 'CONFIG_ALL', if_true: files('qemu-fsdev-dummy.c'))
+fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files(
+  '9p-iov-marshal.c',
+  '9p-marshal.c',
+  'qemu-fsdev.c',
+), if_false: files('qemu-fsdev-dummy.c'))
+softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
+
 have_virtfs_proxy_helper = have_tools and libattr.found() and libcap_ng.found() and 'CONFIG_VIRTFS' in config_host
 if have_virtfs_proxy_helper
   executable('virtfs-proxy-helper', files('virtfs-proxy-helper.c', '9p-marshal.c', '9p-iov-marshal.c'),
-- 
1.8.3.1