From 53e8868d69c195b6b57ccc6847057043c26df1b6 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 26 May 2023 12:20:39 +0200 Subject: meson: remove OS definitions from config_targetos CONFIG_DARWIN, CONFIG_LINUX and CONFIG_BSD are used in some rules, but only CONFIG_LINUX has substantial use. Convert them all to if...endif. Signed-off-by: Paolo Bonzini --- hw/9pfs/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'hw/9pfs') diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build index 2944ea63c3..3eee7c268a 100644 --- a/hw/9pfs/meson.build +++ b/hw/9pfs/meson.build @@ -13,8 +13,11 @@ fs_ss.add(files( 'coth.c', 'coxattr.c', )) -fs_ss.add(when: 'CONFIG_LINUX', if_true: files('9p-util-linux.c')) -fs_ss.add(when: 'CONFIG_DARWIN', if_true: files('9p-util-darwin.c')) +if targetos == 'darwin' + fs_ss.add(files('9p-util-darwin.c')) +elif targetos == 'linux' + fs_ss.add(files('9p-util-linux.c')) +endif fs_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-9p-backend.c')) system_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss) -- cgit v1.2.3 From d0cda6f461fd33c5f9b063781c63c1ce5fd3fa3b Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 3 Nov 2023 09:17:48 +0100 Subject: configure, meson: rename targetos to host_os This variable is about the host OS, not the target. It is used a lot more since the Meson conversion, but the original sin dates back to 2003. Time to fix it. Signed-off-by: Paolo Bonzini --- hw/9pfs/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/9pfs') diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build index 3eee7c268a..f1b62fa8c8 100644 --- a/hw/9pfs/meson.build +++ b/hw/9pfs/meson.build @@ -13,9 +13,9 @@ fs_ss.add(files( 'coth.c', 'coxattr.c', )) -if targetos == 'darwin' +if host_os == 'darwin' fs_ss.add(files('9p-util-darwin.c')) -elif targetos == 'linux' +elif host_os == 'linux' fs_ss.add(files('9p-util-linux.c')) endif fs_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-9p-backend.c')) -- cgit v1.2.3