From 4ce58df8540f25f823418a1d45ddb07ada52ec22 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 25 Oct 2023 11:20:36 +0100 Subject: [PATCH] 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 --- docs/reference/gio/meson.build | 6 +----- gio/gdbus-2.0/codegen/meson.build | 8 ++++---- gio/meson.build | 2 ++ gio/tests/meson.build | 5 +---- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build index bdcdde601..0c4991377 100644 --- a/docs/reference/gio/meson.build +++ b/docs/reference/gio/meson.build @@ -154,11 +154,7 @@ if get_option('gtk_doc') command : [concat_files_helper, '@OUTPUT@', '@INPUT@'], ) - configure_file( - output : 'gio-docs-platform.xml', - input : platform_file, - copy : true, - ) + fs.copyfile(platform_file, 'gio-docs-platform.xml') content_files = [ 'migrating-posix.xml', diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build index 65faae9b2..984698e2f 100644 --- a/gio/gdbus-2.0/codegen/meson.build +++ b/gio/gdbus-2.0/codegen/meson.build @@ -30,6 +30,7 @@ meson.override_find_program('gdbus-codegen', gdbus_codegen) codegen_dir = join_paths(glib_datadir, 'glib-2.0', 'codegen') gdbus_codegen_built_files = [] +gdbus_codegen_built_targets = [] gdbus_codegen_built_files += configure_file(input : 'config.py.in', output : 'config.py', install_dir : codegen_dir, @@ -39,8 +40,7 @@ gdbus_codegen_built_files += configure_file(input : 'config.py.in', foreach f : gdbus_codegen_files # 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 - gdbus_codegen_built_files += configure_file(input : f, output : f, - install_dir : codegen_dir, - install_tag : 'bin-devel', - copy : true) + gdbus_codegen_built_targets += fs.copyfile(f, f, + install_dir : codegen_dir, + install_tag : 'bin-devel') endforeach diff --git a/gio/meson.build b/gio/meson.build index 26e9b7b05..9cdde1098 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -242,6 +242,7 @@ xdp_dbus_generated = custom_target('xdp-dbus', 'org.freedesktop.portal.Trash.xml'], output : ['xdp-dbus.h', 'xdp-dbus.c'], depend_files : gdbus_codegen_built_files, + depends : gdbus_codegen_built_targets, command : [python, gdbus_codegen, '--interface-prefix', 'org.freedesktop.portal.', '--output-directory', '@OUTDIR@', @@ -254,6 +255,7 @@ gdbus_daemon_generated = custom_target('gdbus-daemon-generated', input : ['dbus-daemon.xml'], output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'], depend_files : gdbus_codegen_built_files, + depends : gdbus_codegen_built_targets, command : [python, gdbus_codegen, '--interface-prefix', 'org.', '--output-directory', '@OUTDIR@', diff --git a/gio/tests/meson.build b/gio/tests/meson.build index aaf341691..bc436fb79 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -890,10 +890,7 @@ if not meson.is_cross_build() '@INPUT@']) # referenced by test.gresource.xml - test_generated_txt = configure_file(input : 'test1.txt', - output : 'test-generated.txt', - copy : true, - ) + test_generated_txt = fs.copyfile('test1.txt', 'test-generated.txt') resources_extra_sources = [ test_gresource,