diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-08-21 16:27:56 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-10-03 11:46:34 +0200 |
commit | 2b482e39a90fa1929e0fa4006861f4264f28adb2 (patch) | |
tree | 0af5ef229d25bef1b974445406fc3c9d28c0756f /docs/yaml/functions/run_command.yaml | |
parent | ad65a699f93a7659739287882ca27c58c564670b (diff) | |
download | meson-2b482e39a90fa1929e0fa4006861f4264f28adb2.zip meson-2b482e39a90fa1929e0fa4006861f4264f28adb2.tar.gz meson-2b482e39a90fa1929e0fa4006861f4264f28adb2.tar.bz2 |
docs: Add the YAML Reference manual
Diffstat (limited to 'docs/yaml/functions/run_command.yaml')
-rw-r--r-- | docs/yaml/functions/run_command.yaml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/yaml/functions/run_command.yaml b/docs/yaml/functions/run_command.yaml new file mode 100644 index 0000000..091c030 --- /dev/null +++ b/docs/yaml/functions/run_command.yaml @@ -0,0 +1,39 @@ +name: run_command +returns: runresult +description: | + Runs the command specified in positional arguments. `command` can be a + string, or the output of [[find_program]], + [[files]] or [[configure_file]], or [a + compiler object](#compiler-object). + + Returns a [[@runresult]] object containing the result + of the invocation. The command is run from an *unspecified* directory, + and Meson will set three environment variables `MESON_SOURCE_ROOT`, + `MESON_BUILD_ROOT` and `MESON_SUBDIR` that specify the source + directory, build directory and subdirectory the target was defined in, + respectively. + + See also [External commands](External-commands.md). + +varargs: + name: command + type: str | file | external_program + description: The command to execute during the setup process. + +kwargs: + check: + type: bool + since: 0.47.0 + default: false + description: | + If `true`, the exit status code of the command will be checked, + and the configuration will fail if it is non-zero. + + env: + type: env | list[str] | dict[str] + since: 0.50.0 + description: | + environment variables to set, + such as `['NAME1=value1', 'NAME2=value2']`, + or an [[@env]] object which allows more sophisticated + environment juggling. *(Since 0.52.0)* A dictionary is also accepted. |