summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNomura <nomura.rh@gmail.com>2023-10-02 15:28:58 +0200
committerDylan Baker <dylan@pnwbakers.com>2023-10-05 09:59:43 -0700
commit3cac6ea54572214d40234042f59de85618b0c131 (patch)
tree4c1c7a8f7946371df46bd611b91abed3b6b5d6fb /docs
parent03a0d3ddfb092ceb48f1a30fdf5e4b6af2890235 (diff)
downloadmeson-3cac6ea54572214d40234042f59de85618b0c131.tar.gz
Add env kwarg in generator.process()
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/snippets/env_kwarg_generator_process.md4
-rw-r--r--docs/yaml/objects/generator.yaml9
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/snippets/env_kwarg_generator_process.md b/docs/markdown/snippets/env_kwarg_generator_process.md
new file mode 100644
index 000000000..cdf73a302
--- /dev/null
+++ b/docs/markdown/snippets/env_kwarg_generator_process.md
@@ -0,0 +1,4 @@
+## generator.process() gains 'env' keyword argument
+
+Like the kwarg of the same name in `custom_target()`, `env` allows
+you to set the environment in which the generator will process inputs.
diff --git a/docs/yaml/objects/generator.yaml b/docs/yaml/objects/generator.yaml
index e7b866acc..fbef95fa4 100644
--- a/docs/yaml/objects/generator.yaml
+++ b/docs/yaml/objects/generator.yaml
@@ -34,3 +34,12 @@ methods:
`subdir/one.input` is processed it generates a file `{target private
directory}/subdir/one.out` as opposed to `{target private
directory}/one.out`.
+
+ env:
+ type: env | list[str] | dict[str]
+ since: 1.3.0
+ description: |
+ environment variables to set, such as
+ `{'NAME1': 'value1', 'NAME2': 'value2'}` or `['NAME1=value1', 'NAME2=value2']`,
+ or an [[@env]] object which allows more
+ sophisticated environment juggling.