mbox series

[00/10] meson: Move the creation of the library to the main meson.build

Message ID 20201006111219.2300921-1-philmd@redhat.com
Headers show
Series meson: Move the creation of the library to the main meson.build | expand

Message

Philippe Mathieu-Daudé Oct. 6, 2020, 11:12 a.m. UTC
Make Meson machinery more consistent, as requested by Paolo.

Philippe Mathieu-Daudé (10):
  migration: Only add migration files to the Meson sourceset
  meson.build: Add comments to clarify code organization
  meson.build: Sort sourcesets alphabetically
  hw/core: Move the creation of the library to the main meson.build
  chardev: Move the creation of the library to the main meson.build
  migration: Move the creation of the library to the main meson.build
  io: Move the creation of the library to the main meson.build
  crypto: Move the creation of the library to the main meson.build
  authz: Move the creation of the library to the main meson.build
  qom: Move the creation of the library to the main meson.build

 meson.build           | 86 ++++++++++++++++++++++++++++++++++++++-----
 authz/meson.build     | 10 -----
 chardev/meson.build   |  6 ---
 crypto/meson.build    | 10 -----
 hw/core/meson.build   |  6 ---
 io/meson.build        | 10 -----
 migration/meson.build |  8 +---
 qom/meson.build       |  8 ----
 8 files changed, 77 insertions(+), 67 deletions(-)

Comments

Philippe Mathieu-Daudé Oct. 6, 2020, 11:13 a.m. UTC | #1
On Tue, Oct 6, 2020 at 1:12 PM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> I'm not sure how that works, but keep the use of Meson
> sourcesets consistent, only add source files.
>

Eventually:
Fixes: 5516623020 ("meson: convert migration directory to Meson")

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  migration/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/migration/meson.build b/migration/meson.build
> index b5b71c8060..55c9e1329f 100644
> --- a/migration/meson.build
> +++ b/migration/meson.build
> @@ -14,7 +14,7 @@ libmigration = static_library('migration', sources: migration_files + genh,
>                                build_by_default: false)
>  migration = declare_dependency(link_with: libmigration,
>                                 dependencies: [zlib, qom, io])
> -softmmu_ss.add(migration)
> +softmmu_ss.add(migration_files)
>
>  softmmu_ss.add(files(
>    'block-dirty-bitmap.c',
> --
> 2.26.2
>
Paolo Bonzini Oct. 6, 2020, 11:25 a.m. UTC | #2
On 06/10/20 13:12, Philippe Mathieu-Daudé wrote:
> I'm not sure how that works, but keep the use of Meson
> sourcesets consistent, only add source files.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  migration/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/migration/meson.build b/migration/meson.build
> index b5b71c8060..55c9e1329f 100644
> --- a/migration/meson.build
> +++ b/migration/meson.build
> @@ -14,7 +14,7 @@ libmigration = static_library('migration', sources: migration_files + genh,
>                                build_by_default: false)
>  migration = declare_dependency(link_with: libmigration,
>                                 dependencies: [zlib, qom, io])
> -softmmu_ss.add(migration)
> +softmmu_ss.add(migration_files)

This would compile the file twice.  You can just drop this change and
fixup patch 6 instead.

Paolo
Paolo Bonzini Oct. 6, 2020, 11:29 a.m. UTC | #3
On 06/10/20 13:12, Philippe Mathieu-Daudé wrote:
> Make Meson machinery more consistent, as requested by Paolo.

> 

> Philippe Mathieu-Daudé (10):

>   migration: Only add migration files to the Meson sourceset

>   meson.build: Add comments to clarify code organization

>   meson.build: Sort sourcesets alphabetically

>   hw/core: Move the creation of the library to the main meson.build

>   chardev: Move the creation of the library to the main meson.build

>   migration: Move the creation of the library to the main meson.build

>   io: Move the creation of the library to the main meson.build

>   crypto: Move the creation of the library to the main meson.build

>   authz: Move the creation of the library to the main meson.build

>   qom: Move the creation of the library to the main meson.build

> 

>  meson.build           | 86 ++++++++++++++++++++++++++++++++++++++-----

>  authz/meson.build     | 10 -----

>  chardev/meson.build   |  6 ---

>  crypto/meson.build    | 10 -----

>  hw/core/meson.build   |  6 ---

>  io/meson.build        | 10 -----

>  migration/meson.build |  8 +---

>  qom/meson.build       |  8 ----

>  8 files changed, 77 insertions(+), 67 deletions(-)

> 


Nice!  Apart from the change to patch 1, perhaps move the "Targets"
headline a little earlier, namely just before

foreach m : block_mods + softmmu_mods
...
endforeach

Thanks!

Paolo
Philippe Mathieu-Daudé Oct. 6, 2020, 12:48 p.m. UTC | #4
On 10/6/20 1:29 PM, Paolo Bonzini wrote:
> On 06/10/20 13:12, Philippe Mathieu-Daudé wrote:

>> Make Meson machinery more consistent, as requested by Paolo.

>>

>> Philippe Mathieu-Daudé (10):

>>   migration: Only add migration files to the Meson sourceset

>>   meson.build: Add comments to clarify code organization

>>   meson.build: Sort sourcesets alphabetically

>>   hw/core: Move the creation of the library to the main meson.build

>>   chardev: Move the creation of the library to the main meson.build

>>   migration: Move the creation of the library to the main meson.build

>>   io: Move the creation of the library to the main meson.build

>>   crypto: Move the creation of the library to the main meson.build

>>   authz: Move the creation of the library to the main meson.build

>>   qom: Move the creation of the library to the main meson.build

>>

>>  meson.build           | 86 ++++++++++++++++++++++++++++++++++++++-----

>>  authz/meson.build     | 10 -----

>>  chardev/meson.build   |  6 ---

>>  crypto/meson.build    | 10 -----

>>  hw/core/meson.build   |  6 ---

>>  io/meson.build        | 10 -----

>>  migration/meson.build |  8 +---

>>  qom/meson.build       |  8 ----

>>  8 files changed, 77 insertions(+), 67 deletions(-)

>>

> 

> Nice!  Apart from the change to patch 1, perhaps move the "Targets"

> headline a little earlier, namely just before

> 

> foreach m : block_mods + softmmu_mods

> ...

> endforeach


Oh OK, I was not sure of this block.

> 

> Thanks!

> 

> Paolo

>