diff mbox series

[2/4] meson: move up hw subdir (specifically before trace subdir)

Message ID 20201119084448.24397-3-kraxel@redhat.com
State New
Headers show
Series try fix tracing for modules | expand

Commit Message

Gerd Hoffmann Nov. 19, 2020, 8:44 a.m. UTC
Needed so trace/meson.build can see
stuff done in hw/*/meson.build.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stefan Hajnoczi Nov. 19, 2020, 10:01 a.m. UTC | #1
On Thu, Nov 19, 2020 at 09:44:46AM +0100, Gerd Hoffmann wrote:
> Needed so trace/meson.build can see
> stuff done in hw/*/meson.build.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 04bd9b57e401..41009b9685de 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1456,6 +1456,8 @@ trace_events_subdirs += [
>    'util',
>  ]
>  
> +subdir('hw')
> +
>  subdir('contrib/libvhost-user')
>  subdir('qapi')
>  subdir('qobject')
> @@ -1543,7 +1545,6 @@ subdir('migration')
>  subdir('monitor')
>  subdir('net')
>  subdir('replay')
> -subdir('hw')
>  subdir('accel')
>  subdir('plugins')
>  subdir('bsd-user')

This is unmaintainable because someone reading the code won't be aware
of the ordering constraint. A comment is needed.

I wonder if anyone has suggestions for meson best practices? Relying on
ordering of subdirs is awkward, but so is moving the code into the
top-level meson.build file.

Stefan
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 04bd9b57e401..41009b9685de 100644
--- a/meson.build
+++ b/meson.build
@@ -1456,6 +1456,8 @@  trace_events_subdirs += [
   'util',
 ]
 
+subdir('hw')
+
 subdir('contrib/libvhost-user')
 subdir('qapi')
 subdir('qobject')
@@ -1543,7 +1545,6 @@  subdir('migration')
 subdir('monitor')
 subdir('net')
 subdir('replay')
-subdir('hw')
 subdir('accel')
 subdir('plugins')
 subdir('bsd-user')