diff options
| author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-10-03 12:18:03 +0200 |
|---|---|---|
| committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-10-03 12:19:46 +0200 |
| commit | 0b9c7b74bef2dd5913cc8d96de0fc016d682ead1 (patch) | |
| tree | 5c75a9257bf7012ec0704ca2d1cbef288e577bb2 /docs/yaml/functions/custom_target.yaml | |
| parent | 102484b820d25d10d2dc10efc15178f84a87198a (diff) | |
| download | meson-0b9c7b74bef2dd5913cc8d96de0fc016d682ead1.tar.gz | |
docs: Update YAML docs after rebase
Diffstat (limited to 'docs/yaml/functions/custom_target.yaml')
| -rw-r--r-- | docs/yaml/functions/custom_target.yaml | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/docs/yaml/functions/custom_target.yaml b/docs/yaml/functions/custom_target.yaml index 93e901ac2..bfc7da9ce 100644 --- a/docs/yaml/functions/custom_target.yaml +++ b/docs/yaml/functions/custom_target.yaml @@ -2,8 +2,18 @@ name: custom_target returns: custom_tgt description: | Create a custom top level build target. The only positional argument - is the name of this target and the keyword arguments are the - following. + is the name of this target and cannot contain path separators (`/` or `\`). + The name of custom target might not be used by every backends, for instance with + the Ninja backend, `subdir/meson.build` containing the example below, + `ninja -C builddir foo` or `ninja -C builddir subdir/foo` won't work, + it is instead `ninja -C builddir subdir/file.txt`. Howerver, `meson compile subdir/foo` + is accepted. + ```meson + custom_target('foo', output: 'file.txt', ...) + ``` + + *Since 0.60.0* the name argument is optional and defaults to the basename of the first + output (`file.txt` in the example above). The list of strings passed to the `command` keyword argument accept the following special string substitutions: @@ -42,10 +52,14 @@ notes: is not portable, notably to Windows. Instead, consider using a `native: true` [[executable]], or a python script. -posargs: +optargs: name: type: str - description: The *unique* id of the custom target + description: | + The *unique* id of the custom target + + This posarg is optional *since 0.60.0*. It defaults to the basename + of the first output. kwargs: build_by_default: @@ -138,6 +152,9 @@ kwargs: compiler would list all the header files it included, and a change in any one of these files triggers a recompilation. + *(since 0.47.0)* the `@BASENAME@` and `@PLAINNAME@` substitutions + are also accepted. + input: type: list[str | file] description: List of source files. *(since 0.41.0)* the list is flattened. |
