aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
diff options
context:
space:
mode:
authorbehlec <33778676+behlec@users.noreply.github.com>2018-03-29 20:29:45 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-03-29 21:29:45 +0300
commit37d379ebe5ebf935297fe18478dfa311afa64d24 (patch)
tree04464fc8a034e978f022a424719901e2d056aa43 /docs/markdown/Reference-manual.md
parent6146353f454a6db709309ad47798df87462097c9 (diff)
downloadmeson-37d379ebe5ebf935297fe18478dfa311afa64d24.zip
meson-37d379ebe5ebf935297fe18478dfa311afa64d24.tar.gz
meson-37d379ebe5ebf935297fe18478dfa311afa64d24.tar.bz2
Allow meson build file to exit early. (#2808)
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r--docs/markdown/Reference-manual.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 54b7131..5109b25 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -1129,6 +1129,33 @@ This function has one keyword argument.
recurse in the subdir if they all return `true` when queried with
`.found()`
+### subdir_done()
+
+``` meson
+ subdir_done()
+```
+
+Stops further interpretation of the meson script file from the point of
+the invocation. All steps executed up to this point are valid and will
+be executed by meson. This means that all targets defined before the call
+of `subdir_done` will be build.
+
+If the current script was called by `subdir` the execution returns to the
+calling directory and continues as if the script had reached the end.
+If the current script is the top level script meson configures the project
+as defined up to this point.
+
+Example:
+```meson
+project('example exit', 'cpp')
+executable('exe1', 'exe1.cpp')
+subdir_done()
+executable('exe2', 'exe2.cpp')
+```
+
+The executable `exe1` will be build, while the executable `exe2` is not
+build.
+
### subproject()
``` meson