From d46ac459e9233cbb5139257154b16a435298ac49 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 26 Dec 2021 18:11:57 -0500 Subject: [PATCH] fix incorrect docs for add_*_script They claimed that all of these functions accepted any posargs or varargs that install scripts supported. This was inconsistent with both the types that meson currently allowed, and the types that we documented in refman 1.0 *should* be allowed. Take the opportuninty to be clear as refman 1.0 never was, about the difference between types supported in the first posarg, and the ypes supported in succeeding varargs. --- docs/yaml/builtins/meson.yaml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/yaml/builtins/meson.yaml b/docs/yaml/builtins/meson.yaml index 4f2d24dc2..00ade2e10 100644 --- a/docs/yaml/builtins/meson.yaml +++ b/docs/yaml/builtins/meson.yaml @@ -34,18 +34,17 @@ methods: posargs: script_name: - type: str | file | external_program | exe | custom_tgt | custom_idx + type: str | file | external_program description: | The script to execute. - *(since 0.55.0)* The output of [[configure_file]], [[files]], and [[find_program]] - as well as strings are accepted. + *(since 0.55.0)* The output of [[find_program]] as well as strings are accepted. *(since 0.57.0)* [[@file]] objects and the output of [[configure_file]] may be used. varargs: name: arg - type: str | file | external_program | exe | custom_tgt | custom_idx + type: str | file | external_program since: 0.49.0 description: | Additional arguments @@ -53,8 +52,6 @@ methods: *(since 0.55.0)* The output of [[configure_file]], [[files]], and [[find_program]] as well as strings are accepted. - *(since 0.57.0)* [[@file]] objects and the output of [[configure_file]] may be used. - - name: add_install_script returns: void description: | @@ -89,8 +86,26 @@ methods: shell would. If your script uses Python, `shlex.split()` is the easiest correct way to do this. - posargs_inherit: meson.add_dist_script - varargs_inherit: meson.add_dist_script + posargs: + script_name: + type: str | file | external_program | exe | custom_tgt | custom_idx + description: | + The script to execute. + + *(since 0.55.0)* The output of [[find_program]], [[executable]], + [[custom_target]], as well as strings are accepted. + + *(since 0.57.0)* [[@file]] objects and the output of [[configure_file]] may be used. + + varargs: + name: arg + type: str | file | external_program | exe | custom_tgt | custom_idx + since: 0.49.0 + description: | + Additional arguments + + *(since 0.55.0)* The output of [[find_program]], [[executable]], + [[custom_target]], as well as strings are accepted. kwargs: skip_if_destdir: