mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
b94239a61e
Instead of creating an empty object and then setting keys one at a time, it is possible to pass a dict object to configuration_data(). This is nicer because it doesn't require repeating the name of the cfg_data object over and over. There is one exception: the 'conf' object, where we store values that are used directly by C code. In that case, using a dict object is not feasible for two reasons: first of all, replacing the set_quoted() calls would result in awkward code with a lot of calls to format(); moreover, since code that modifies it is sprinkled all over the place, refactoring it would probably make things more complicated rather than simpler. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
37 lines
823 B
Meson
37 lines
823 B
Meson
i18n = import('i18n')
|
|
|
|
potfiles_conf = configuration_data({
|
|
'SRCDIR': '',
|
|
'BUILDDIR': '',
|
|
})
|
|
|
|
potfiles = configure_file(
|
|
input: 'POTFILES.in',
|
|
output: '@BASENAME@',
|
|
configuration: potfiles_conf,
|
|
)
|
|
|
|
i18n.gettext(
|
|
meson.project_name(),
|
|
args: [
|
|
'--add-comments=TRANSLATORS:',
|
|
'--directory=@0@'.format(meson.source_root()),
|
|
'--directory=@0@'.format(meson.build_root()),
|
|
'--files-from=@0@'.format(meson.current_build_dir() / 'POTFILES'),
|
|
'--msgid-bugs-address=https://libvirt.org/bugs.html',
|
|
'--package-version=@0@'.format(meson.project_version()),
|
|
'--sort-output',
|
|
],
|
|
preset: 'glib',
|
|
)
|
|
|
|
potfiles_dep = [
|
|
access_gen_sources,
|
|
admin_client_generated,
|
|
admin_driver_generated,
|
|
remote_driver_generated,
|
|
remote_daemon_generated,
|
|
]
|
|
|
|
alias_target('libvirt-pot-dep', potfiles_dep)
|