| 1 |
name: generator |
| 2 |
long_name: Generator object |
| 3 |
description: | |
| 4 |
This object is returned by [[generator]] and contains a |
| 5 |
generator that is used to transform files from one type to another by |
| 6 |
an executable (e.g. `idl` files into source code and headers). |
| 7 |
|
| 8 |
methods: |
| 9 |
- name: process |
| 10 |
returns: generated_list |
| 11 |
description: | |
| 12 |
Takes a list of files, causes them to be processed and returns an object containing the result |
| 13 |
which can then, for example, be passed into a build target definition. |
| 14 |
|
| 15 |
varargs: |
| 16 |
name: source |
| 17 |
min_varargs: 1 |
| 18 |
type: str | file | custom_tgt | custom_idx | generated_list |
| 19 |
description: List of sources to process. |
| 20 |
|
| 21 |
kwargs: |
| 22 |
extra_args: |
| 23 |
type: list[str] |
| 24 |
description: | |
| 25 |
If present, will be used to replace an entry `@EXTRA_ARGS@` in the argument list. |
| 26 |
|
| 27 |
preserve_path_from: |
| 28 |
type: str |
| 29 |
since: 0.45.0 |
| 30 |
description: | |
| 31 |
If given, specifies that the output files need to maintain their directory structure |
| 32 |
inside the target temporary directory. The most common value for this is |
| 33 |
`meson.current_source_dir()`. With this value when a file called |
| 34 |
`subdir/one.input` is processed it generates a file `{target private |
| 35 |
directory}/subdir/one.out` as opposed to `{target private |
| 36 |
directory}/one.out`. |
| 37 |
|
| 38 |
env: |
| 39 |
type: env | list[str] | dict[str] |
| 40 |
since: 1.3.0 |
| 41 |
description: | |
| 42 |
environment variables to set, such as |
| 43 |
`{'NAME1': 'value1', 'NAME2': 'value2'}` or `['NAME1=value1', 'NAME2=value2']`, |
| 44 |
or an [[@env]] object which allows more |
| 45 |
sophisticated environment juggling. |