summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Reference-manual.md10
-rw-r--r--docs/markdown/snippets/end_messages.md20
2 files changed, 30 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 531836421..714a2595a 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -431,6 +431,16 @@ The returned object also has methods that are documented in the
Returns a [disabler object](#disabler-object). Added in 0.44.0.
+### end_message()
+
+Added in 0.50.0. This function can be used to print status messages at
+the end of a Meson run. It is usually used to print a summary of
+essential configuration settings. The function takes either one or two
+strings, so it can be used to print both plain messages as well as
+key-value pairs. Meson will automatically format the latter kind so
+that all values are vertically aligned. Thus it recommended to use
+fairly short message strings.
+
### error()
``` meson
diff --git a/docs/markdown/snippets/end_messages.md b/docs/markdown/snippets/end_messages.md
new file mode 100644
index 000000000..0b04c67f8
--- /dev/null
+++ b/docs/markdown/snippets/end_messages.md
@@ -0,0 +1,20 @@
+## New end_messages method
+
+The new `end_messages` function allows you to create status messages
+that will be printed at the end of the Meson run rather than
+immediately. For example the following setup:
+
+```meson
+end_message('A short name:', 'value #1')
+end_message('A bit longer name:', 'value #2')
+```
+
+Will cause the following text to be printed as the last thing just
+before Meson exits.
+
+```
+Main project
+
+A short name: value #1
+A bit longer name: value #2
+```