meson: Minor improvements
cover meson: Minor improvements
Trivial meson improvements, mostly no logical changes, improving summary display.
Philippe Mathieu-Daudé (3):
meson: Only build virtfs-proxy-helper if all requisites are found
meson: List if X11 dependency is detected
meson: List modules built in summary
meson.build | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.3
PATCH 1/3 meson: Only build virtfs-proxy-helper if all requisites are found
We first set have_virtfs_proxy_helper depending on have_virtfs, then update have_virtfs... While this might work, it is not clear when looking at the code logic. Move the have_virtfs_proxy_helper assignation *after* updating have_virtfs to make it obvious.
--- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meson.build +2 -2
@@ -1081,8 +1081,6 @@ libattr.found() and libcap_ng.found()) -have_virtfs_proxy_helper = have_virtfs and have_tools - if get_option('virtfs').enabled() if not have_virtfs if targetos != 'linux'
@@ -1097,6 +1095,8 @@ have_virtfs = false endif +have_virtfs_proxy_helper = have_virtfs and have_tools + config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_option('bindir')) config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix')) config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / qemu_confdir)
Signature · 1 line
2.26.3
Re: [PATCH 1/3] meson: Only build virtfs-proxy-helper if all requisites are found
Quoted 9 lines · Philippe Mathieu-Daudé
We first set
have_virtfs_proxy_helperdepending onhave_virtfs, then updatehave_virtfs... While this might work, it is not clear when looking at the code logic. Move thehave_virtfs_proxy_helperassignation*after* updatinghave_virtfsto make it obvious.Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
r~
PATCH 2/3 meson: List if X11 dependency is detected
In reply to Philippe Mathieu-DaudéIt is sometimes useful to know if X11 is detected.
--- meson.build | 1 + 1 file changed, 1 insertion(+)
meson.build +1 -0
@@ -2671,6 +2671,7 @@ summary_info += {'SDL support': sdl.found()} summary_info += {'SDL image support': sdl_image.found()} # TODO: add back version +summary_info += {'X11 support': x11.found()} summary_info += {'GTK support': gtk.found()} summary_info += {'pixman': pixman.found()} # TODO: add back version
Signature · 1 line
2.26.3
Re: [PATCH 2/3] meson: List if X11 dependency is detected
Quoted 6 lines · Philippe Mathieu-Daudé
It is sometimes useful to know if X11 is detected.
Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- meson.build | 1 + 1 file changed, 1 insertion(+)
r~
PATCH 3/3 meson: List modules built in summary
In reply to Philippe Mathieu-DaudéInstead of guessing the modules built, list them. Example:
Modules
audio : spice
block : curl dmg-bz2 gluster iscsi rbd ssh
chardev : spice
hw-display :
hw-s390x : virtio-gpu-ccw
hw-usb : redirect smartcard
ui : egl-headless gtk opengl spice-app spice-core--- meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+)
meson.build +11 -0
@@ -2738,6 +2738,17 @@ summary_info += {'FUSE lseek': fuse_lseek.found()} summary(summary_info, bool_yn: true, section: 'Dependencies') +# Modules +summary_info = {} +foreach d, list : modules + k = [] + foreach m, _ : list + k += [m] + endforeach + summary_info += {d: ' '.join(k)} +endforeach +summary(summary_info, bool_yn: true, section: 'Modules') + if not supported_cpus.contains(cpu) message() warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!')
Signature · 1 line
2.26.3
Re: [PATCH 3/3] meson: List modules built in summary
Quoted 21 lines · Philippe Mathieu-Daudé
Instead of guessing the modules built, list them. Example:
Modules
audio : spice block : curl dmg-bz2 gluster iscsi rbd ssh chardev : spice hw-display : hw-s390x : virtio-gpu-ccw hw-usb : redirect smartcard ui : egl-headless gtk opengl spice-app spice-coreSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+)meson.build +0
-0
meson.build line 2746
Quoted 9 lines
meson.build +6
-0@@ -2738,6 +2738,17 @@ summary_info += {'FUSE lseek': fuse_lseek.found()} summary(summary_info, bool_yn: true, section: 'Dependencies') +# Modules +summary_info = {} +foreach d, list : modules + k = [] + foreach m, _ : list + k += [m]
Clearer renaming k -> mods, m -> mod and d -> k.
Quoted 9 lines
meson.build +5
-0+ endforeach + summary_info += {d: ' '.join(k)} +endforeach +summary(summary_info, bool_yn: true, section: 'Modules') + if not supported_cpus.contains(cpu) message() warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!')
Re: [PATCH 3/3] meson: List modules built in summary
In reply to Philippe Mathieu-Daudémeson.build line 2748
Quoted 5 lines · Philippe Mathieu-Daudé
meson.build +5
-0+ k = [] + foreach m, _ : list + k += [m] + endforeach + summary_info += {d: ' '.join(k)}
Perhaps:
foreach dir, list : modules
if list.keys().length() > 0
summary_info += {dir: ' '.join(list.keys())} endif
endforeach
Paolo
Quoted 3 lines
meson.build +3
-0+endforeach +summary(summary_info, bool_yn: true, section: 'Modules') +