libvirt/po/meson.build
Jiri Denemark dcfe548cb0 build: Make daemons depend on generated *_protocol.[ch]
This should fix build failures when a daemon code is compiled before the
included *_protocol.h headers are ready, such as:

    FAILED: src/virtqemud.p/remote_remote_daemon_config.c.o
    ../src/remote/remote_daemon_config.c: In function ‘daemonConfigNew’:
    ../src/remote/remote_daemon_config.c:111:30: error:
        ‘REMOTE_AUTH_POLKIT’ undeclared (first use in this function)
      111 |         data->auth_unix_rw = REMOTE_AUTH_POLKIT;
          |                              ^~~~~~~~~~~~~~~~~~
    ../src/remote/remote_daemon_config.c:111:30: note: each undeclared
        identifier is reported only once for each function it appears in
    ../src/remote/remote_daemon_config.c:115:30: error:
        ‘REMOTE_AUTH_NONE’ undeclared (first use in this function)
      115 |         data->auth_unix_rw = REMOTE_AUTH_NONE;
          |                              ^~~~~~~~~~~~~~~~
    ../src/remote/remote_daemon_config.c: In function
        ‘daemonConfigLoadOptions’:
    ../src/remote/remote_daemon_config.c:252:31: error:
        ‘REMOTE_AUTH_POLKIT’ undeclared (first use in this function)
      252 |     if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) {
          |                               ^~~~~~~~~~~~~~~~~~

or

    FAILED: src/virtqemud.p/remote_remote_daemon_dispatch.c.o
    In file included from ../src/remote/remote_daemon.h:28,
                     from ../src/remote/remote_daemon_dispatch.c:26:
    src/remote/lxc_protocol.h:13:5: error:
        unknown type name ‘remote_nonnull_domain’
       13 |     remote_nonnull_domain dom;
          |     ^~~~~~~~~~~~~~~~~~~~~
    In file included from ../src/remote/remote_daemon.h:29,
                     from ../src/remote/remote_daemon_dispatch.c:26:
    src/remote/qemu_protocol.h:13:5: error:
        unknown type name ‘remote_nonnull_domain’
       13 |     remote_nonnull_domain dom;
          |     ^~~~~~~~~~~~~~~~~~~~~
    src/remote/qemu_protocol.h:14:5: error:
        unknown type name ‘remote_nonnull_string’
       14 |     remote_nonnull_string cmd;
          |     ^~~~~~~~~~~~~~~~~~~~~
    ...

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-01-25 10:36:05 +01:00

37 lines
915 B
Meson

i18n = import('i18n')
i18n.gettext(
meson.project_name(),
args: [
'--from-code=UTF-8',
'--keyword=_',
'--keyword=N_',
'--add-comments=TRANSLATORS:',
'--directory=@0@'.format(meson.project_source_root()),
'--directory=@0@'.format(meson.project_build_root()),
'--files-from=@0@'.format(meson.current_source_dir() / 'POTFILES'),
'--msgid-bugs-address=https://libvirt.org/bugs.html',
'--package-version=@0@'.format(meson.project_version()),
'--sort-output',
],
)
potfiles_dep = [
access_gen_sources,
admin_client_generated,
admin_driver_generated,
remote_protocol_generated,
remote_driver_generated,
remote_daemon_generated,
]
alias_target('libvirt-pot-dep', potfiles_dep)
run_target(
'libvirt-pot-check',
command: [
'@0@/scripts/check-pot.py'.format(meson.project_source_root()),
'@0@/po/libvirt.pot'.format(meson.project_source_root())
],
)