build: Change configure_file() to fs.copyfile() when copy is set

Meson has preferred `fs.copyfile()` since 0.62. This fixes a set of
Meson warnings.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
This commit is contained in:
Philip Withnall 2023-10-25 11:20:36 +01:00
parent 8831f65a4d
commit 4ce58df854
4 changed files with 8 additions and 13 deletions

View File

@ -154,11 +154,7 @@ if get_option('gtk_doc')
command : [concat_files_helper, '@OUTPUT@', '@INPUT@'], command : [concat_files_helper, '@OUTPUT@', '@INPUT@'],
) )
configure_file( fs.copyfile(platform_file, 'gio-docs-platform.xml')
output : 'gio-docs-platform.xml',
input : platform_file,
copy : true,
)
content_files = [ content_files = [
'migrating-posix.xml', 'migrating-posix.xml',

View File

@ -30,6 +30,7 @@ meson.override_find_program('gdbus-codegen', gdbus_codegen)
codegen_dir = join_paths(glib_datadir, 'glib-2.0', 'codegen') codegen_dir = join_paths(glib_datadir, 'glib-2.0', 'codegen')
gdbus_codegen_built_files = [] gdbus_codegen_built_files = []
gdbus_codegen_built_targets = []
gdbus_codegen_built_files += configure_file(input : 'config.py.in', gdbus_codegen_built_files += configure_file(input : 'config.py.in',
output : 'config.py', output : 'config.py',
install_dir : codegen_dir, install_dir : codegen_dir,
@ -39,8 +40,7 @@ gdbus_codegen_built_files += configure_file(input : 'config.py.in',
foreach f : gdbus_codegen_files foreach f : gdbus_codegen_files
# Copy these into the builddir so that gdbus-codegen can be used uninstalled # Copy these into the builddir so that gdbus-codegen can be used uninstalled
# and then install it too so that it can be used after installation # and then install it too so that it can be used after installation
gdbus_codegen_built_files += configure_file(input : f, output : f, gdbus_codegen_built_targets += fs.copyfile(f, f,
install_dir : codegen_dir, install_dir : codegen_dir,
install_tag : 'bin-devel', install_tag : 'bin-devel')
copy : true)
endforeach endforeach

View File

@ -242,6 +242,7 @@ xdp_dbus_generated = custom_target('xdp-dbus',
'org.freedesktop.portal.Trash.xml'], 'org.freedesktop.portal.Trash.xml'],
output : ['xdp-dbus.h', 'xdp-dbus.c'], output : ['xdp-dbus.h', 'xdp-dbus.c'],
depend_files : gdbus_codegen_built_files, depend_files : gdbus_codegen_built_files,
depends : gdbus_codegen_built_targets,
command : [python, gdbus_codegen, command : [python, gdbus_codegen,
'--interface-prefix', 'org.freedesktop.portal.', '--interface-prefix', 'org.freedesktop.portal.',
'--output-directory', '@OUTDIR@', '--output-directory', '@OUTDIR@',
@ -254,6 +255,7 @@ gdbus_daemon_generated = custom_target('gdbus-daemon-generated',
input : ['dbus-daemon.xml'], input : ['dbus-daemon.xml'],
output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'], output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'],
depend_files : gdbus_codegen_built_files, depend_files : gdbus_codegen_built_files,
depends : gdbus_codegen_built_targets,
command : [python, gdbus_codegen, command : [python, gdbus_codegen,
'--interface-prefix', 'org.', '--interface-prefix', 'org.',
'--output-directory', '@OUTDIR@', '--output-directory', '@OUTDIR@',

View File

@ -890,10 +890,7 @@ if not meson.is_cross_build()
'@INPUT@']) '@INPUT@'])
# referenced by test.gresource.xml # referenced by test.gresource.xml
test_generated_txt = configure_file(input : 'test1.txt', test_generated_txt = fs.copyfile('test1.txt', 'test-generated.txt')
output : 'test-generated.txt',
copy : true,
)
resources_extra_sources = [ resources_extra_sources = [
test_gresource, test_gresource,