diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-01-26 10:32:33 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-01-27 21:59:55 +0000 |
commit | f808c955eab983b31feee130f0947c7cb254a94f (patch) | |
tree | b6d71a5288d7cadec4fa1ea1c7782873731ae1c3 /docs/markdown/snippets | |
parent | 633264984b4b2278491476a0997193ff4996b3a6 (diff) | |
download | meson-f808c955eab983b31feee130f0947c7cb254a94f.zip meson-f808c955eab983b31feee130f0947c7cb254a94f.tar.gz meson-f808c955eab983b31feee130f0947c7cb254a94f.tar.bz2 |
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.
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/pass_file_to_add_script.md | 15 |
1 files changed, 15 insertions, 0 deletions
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) +``` |