mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
meson: generate and distribute spec files and AUTHORS
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
48
meson.build
48
meson.build
@@ -2263,6 +2263,54 @@ foreach file : pkgconfig_files
|
||||
)
|
||||
endforeach
|
||||
|
||||
|
||||
# generate dist files
|
||||
|
||||
if git
|
||||
spec_files = [
|
||||
'libvirt.spec.in',
|
||||
'mingw-libvirt.spec.in',
|
||||
]
|
||||
|
||||
spec_conf = configuration_data()
|
||||
spec_conf.set('VERSION', meson.project_version())
|
||||
|
||||
foreach file : spec_files
|
||||
configure_file(
|
||||
input: file,
|
||||
output: '@BASENAME@',
|
||||
configuration: spec_conf,
|
||||
)
|
||||
endforeach
|
||||
|
||||
authors = run_command(python3_prog, meson_gen_authors_prog.path(), env: runutf8)
|
||||
authors_file = 'AUTHORS.in'
|
||||
|
||||
authors_conf = configuration_data()
|
||||
authors_conf.set('contributorslist', authors.stdout())
|
||||
|
||||
configure_file(
|
||||
input: authors_file,
|
||||
output: '@BASENAME@',
|
||||
configuration: authors_conf,
|
||||
)
|
||||
|
||||
# Using return values from configure_file in add_dist_script is possible since 0.55.0
|
||||
dist_files = [
|
||||
'libvirt.spec',
|
||||
'mingw-libvirt.spec',
|
||||
'AUTHORS',
|
||||
]
|
||||
|
||||
foreach file : dist_files
|
||||
meson.add_dist_script(
|
||||
meson_python_prog.path(), python3_prog.path(), meson_dist_prog.path(),
|
||||
meson.build_root(), file
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
||||
|
||||
# generate meson-config.h file
|
||||
configure_file(output: 'meson-config.h', configuration: conf)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user