diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-02-04 16:02:03 -0500 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2021-02-05 17:53:09 -0500 |
commit | 522392e7553823e6b3ac38cadc4fbee72eae9540 (patch) | |
tree | 0a86dd0524aa3456b6a52443db54f7c5b84102e0 /docs | |
parent | 5d94d161ff0abf72ed7c771ab3bb86e34560762e (diff) | |
download | meson-522392e7553823e6b3ac38cadc4fbee72eae9540.zip meson-522392e7553823e6b3ac38cadc4fbee72eae9540.tar.gz meson-522392e7553823e6b3ac38cadc4fbee72eae9540.tar.bz2 |
run_target: Add env kwarg
Re-implement it in backend using the same code path as for
custom_target(). This for example handle setting PATH on Windows when
command is an executable.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Reference-manual.md | 4 | ||||
-rw-r--r-- | docs/markdown/snippets/customtarget_env.md | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 14802eb..f623728 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1504,6 +1504,10 @@ and subdirectory the target was defined in, respectively. - `depends` is a list of targets that this target depends on but which are not listed in the command array (because, for example, the script does file globbing internally) +- `env` *(since 0.57.0)*: environment variables to set, such as + `{'NAME1': 'value1', 'NAME2': 'value2'}` or `['NAME1=value1', 'NAME2=value2']`, + or an [`environment()` object](#environment-object) which allows more + sophisticated environment juggling. ### set_variable() diff --git a/docs/markdown/snippets/customtarget_env.md b/docs/markdown/snippets/customtarget_env.md index 69bfc0d..f2d651b 100644 --- a/docs/markdown/snippets/customtarget_env.md +++ b/docs/markdown/snippets/customtarget_env.md @@ -1,4 +1,4 @@ -## `custom_target()` now accepts an `env` keyword argument +## `custom_target()` and `run_target()` now accepts an `env` keyword argument Environment variables can now be passed to the `custom_target()` command. |