aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Commands.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/Commands.md')
-rw-r--r--docs/markdown/Commands.md41
1 files changed, 27 insertions, 14 deletions
diff --git a/docs/markdown/Commands.md b/docs/markdown/Commands.md
index 984b293..96f1142 100644
--- a/docs/markdown/Commands.md
+++ b/docs/markdown/Commands.md
@@ -1,18 +1,21 @@
# Command-line commands
-There are two different ways of invoking Meson. First, you can run it directly
-from the source tree with the command `/path/to/source/meson.py`. Meson may
-also be installed in which case the command is simply `meson`. In this manual
-we only use the latter format for simplicity.
+There are two different ways of invoking Meson. First, you can run it
+directly from the source tree with the command
+`/path/to/source/meson.py`. Meson may also be installed in which case
+the command is simply `meson`. In this manual we only use the latter
+format for simplicity.
Meson is invoked using the following syntax:
`meson [COMMAND] [COMMAND_OPTIONS]`
-This section describes all available commands and some of their Optional arguments.
-The most common workflow is to run [`setup`](#setup), followed by [`compile`](#compile), and then [`install`](#install).
+This section describes all available commands and some of their
+Optional arguments. The most common workflow is to run
+[`setup`](#setup), followed by [`compile`](#compile), and then
+[`install`](#install).
-For the full list of all available options for a specific command use the following syntax:
-`meson COMMAND --help`
+For the full list of all available options for a specific command use
+the following syntax: `meson COMMAND --help`
### configure
@@ -24,7 +27,8 @@ Changes options of a configured meson project.
Most arguments are the same as in [`setup`](#setup).
-Note: reconfiguring project will not reset options to their default values (even if they were changed in `meson.build`).
+Note: reconfiguring project will not reset options to their default
+values (even if they were changed in `meson.build`).
#### Examples:
@@ -59,7 +63,8 @@ Builds a default or a specified target of a configured meson project.
- `PATH`: path to the target relative to the root `meson.build` file. Note: relative path for a target specified in the root `meson.build` is `./`.
- `TYPE`: type of the target. Can be one of the following: 'executable', 'static_library', 'shared_library', 'shared_module', 'custom', 'run', 'jar'.
-`PATH` and/or `TYPE` can be omitted if the resulting `TARGET` can be used to uniquely identify the target in `meson.build`.
+`PATH` and/or `TYPE` can be omitted if the resulting `TARGET` can be
+used to uniquely identify the target in `meson.build`.
#### Backend specific arguments
@@ -67,7 +72,8 @@ Builds a default or a specified target of a configured meson project.
`BACKEND-args` use the following syntax:
-If you only pass a single string, then it is considered to have all values separated by commas. Thus invoking the following command:
+If you only pass a single string, then it is considered to have all
+values separated by commas. Thus invoking the following command:
```
$ meson compile --ninja-args=-n,-d,explain
@@ -75,7 +81,8 @@ $ meson compile --ninja-args=-n,-d,explain
would add `-n`, `-d` and `explain` arguments to ninja invocation.
-If you need to have commas or spaces in your string values, then you need to pass the value with proper shell quoting like this:
+If you need to have commas or spaces in your string values, then you
+need to pass the value with proper shell quoting like this:
```
$ meson compile "--ninja-args=['a,b', 'c d']"
@@ -89,16 +96,20 @@ meson compile -C builddir
```
Execute a dry run on ninja backend with additional debug info:
+
```
meson compile --ninja-args=-n,-d,explain
```
-Build three targets: two targets that have the same `foo` name, but different type, and a `bar` target:
+Build three targets: two targets that have the same `foo` name, but
+different type, and a `bar` target:
+
```
meson compile foo:shared_library foo:static_library bar
```
Produce a coverage html report (if available):
+
```
meson compile coverage-html
```
@@ -150,6 +161,7 @@ Displays information about a configured meson project.
#### Examples:
Display basic information about a configured project in `builddir`:
+
```
meson introspect builddir --projectinfo
```
@@ -200,7 +212,8 @@ This is the default meson command (invoked if there was no COMMAND supplied).
{{ setup_arguments.inc }}
-See [meson introduction page](Running-Meson.md#configuring-the-build-directory) for more info.
+See [meson introduction
+page](Running-Meson.md#configuring-the-build-directory) for more info.
#### Examples: