aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-09-02 11:04:19 -0400
committerXavier Claessens <xclaesse@gmail.com>2021-09-30 12:26:19 -0400
commitd2fa6d50809e6a5955999152f43a461595c6bc4c (patch)
treefa5910692858d2b6c7371a8b0fbee87bd97e6f31 /docs
parente58b3adc7044980bbddca1ad9674ac7b0c5bac0a (diff)
downloadmeson-d2fa6d50809e6a5955999152f43a461595c6bc4c.zip
meson-d2fa6d50809e6a5955999152f43a461595c6bc4c.tar.gz
meson-d2fa6d50809e6a5955999152f43a461595c6bc4c.tar.bz2
Make custom_target() name argument optional
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Reference-manual.md16
-rw-r--r--docs/markdown/snippets/custom_target_name.md4
2 files changed, 18 insertions, 2 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index b3dbf65..a91fa3e 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -326,8 +326,20 @@ false otherwise.
```
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).
+
+These are all the supported keyword arguments:
- `build_by_default` *(since 0.38.0)*: causes, when set to true, to
have this target be built by default. This means it will be built when
diff --git a/docs/markdown/snippets/custom_target_name.md b/docs/markdown/snippets/custom_target_name.md
new file mode 100644
index 0000000..5ad136d
--- /dev/null
+++ b/docs/markdown/snippets/custom_target_name.md
@@ -0,0 +1,4 @@
+## Optional `custom_target()` name
+
+The name argument is now optional and defaults to the basename of the first
+output. \ No newline at end of file