aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-09-25 13:46:07 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2017-09-27 22:01:24 +0300
commitdda5e8cadbfdeee3267b1a0943c014e06bcd0100 (patch)
tree049a70c550729d722e23c67d8312c2eaa820da6f /docs/markdown/Reference-manual.md
parentdfc2b75ee2dba3245ac23bb3d7f0156e47773ed5 (diff)
downloadmeson-dda5e8cadbfdeee3267b1a0943c014e06bcd0100.zip
meson-dda5e8cadbfdeee3267b1a0943c014e06bcd0100.tar.gz
meson-dda5e8cadbfdeee3267b1a0943c014e06bcd0100.tar.bz2
Allow CustomTarget's to be indexed
This allows a CustomTarget to be indexed, and the resulting indexed value (a CustomTargetIndex type), to be used as a source in other targets. This will confer a dependency on the original target, but only inserts the source file returning by index the original target's outputs. This can allow a CustomTarget that creates both a header and a code file to have it's outputs split, for example. Fixes #1470
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r--docs/markdown/Reference-manual.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 7aa4bca..c3636b8 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -1567,6 +1567,11 @@ contains a target with the following methods:
this and will also allow Meson to setup inter-target dependencies
correctly. Please file a bug if that doesn't work for you.
+- `[index]` returns an opaque object that references this target, and can be
+ used as a source in other targets. When it is used as such it will make that
+ target depend on this custom target, but the only source added will be the
+ one that corresponds to the index of the custom target's output argument.
+
### `dependency` object
This object is returned by [`dependency()`](#dependency) and contains