From f808c955eab983b31feee130f0947c7cb254a94f Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 26 Jan 2021 10:32:33 -0800 Subject: intepreter: Allow using file objects for the script_name of add_*_script It's a bit silly and conveluted to have to call find_program on the output of configure_file, so let's just allow passing files as the script name. --- docs/markdown/snippets/pass_file_to_add_script.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/markdown/snippets/pass_file_to_add_script.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/pass_file_to_add_script.md b/docs/markdown/snippets/pass_file_to_add_script.md new file mode 100644 index 0000000..10d08e0 --- /dev/null +++ b/docs/markdown/snippets/pass_file_to_add_script.md @@ -0,0 +1,15 @@ +## The `add_*_script` methods now accept a File as the first argument + +Meson now accepts `file` objects, including those produced by +`configure_file` as the `prog` (first) parameter of the various +`add_*_script` methods + +```meson +install_script = configure_file( + configuration : conf, + input : 'myscript.py.in', + output : 'myscript.py', +) + +meson.add_install_script(install_script, other, params) +``` -- cgit v1.1