summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-06 21:02:18 -0500
committerDylan Baker <dylan@pnwbakers.com>2023-10-05 08:43:38 -0700
commit03a0d3ddfb092ceb48f1a30fdf5e4b6af2890235 (patch)
tree38483c65046712110207833530b59df99853499d /docs
parentadb1a360b9f9edb26eda233326b1d539baeccd5b (diff)
downloadmeson-03a0d3ddfb092ceb48f1a30fdf5e4b6af2890235.tar.gz
mcompile: add suffix as an additional parameter
Since the previous commit allows for more scenarios with name collisions, it makes sense to expand the compile command so that it can also take into account suffixes. i.e. meson compile -C build foo.exe can now work if the executable has an exe suffix along with being named foo.
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Commands.md7
-rw-r--r--docs/markdown/snippets/meson_compile_suffixes.md7
2 files changed, 12 insertions, 2 deletions
diff --git a/docs/markdown/Commands.md b/docs/markdown/Commands.md
index efc316ce7..3fcdedd03 100644
--- a/docs/markdown/Commands.md
+++ b/docs/markdown/Commands.md
@@ -58,14 +58,17 @@ Builds a default or a specified target of a configured Meson project.
*(since 0.55.0)*
-`TARGET` has the following syntax `[PATH/]NAME[:TYPE]`, where:
+`TARGET` has the following syntax `[PATH/]NAME.SUFFIX[:TYPE]`, where:
- `NAME`: name of the target from `meson.build` (e.g. `foo` from `executable('foo', ...)`).
+- `SUFFIX`: name of the suffix of the target from `meson.build` (e.g. `exe` from `executable('foo', suffix: 'exe', ...)`).
- `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', 'alias', 'run', 'jar'.
-`PATH` and/or `TYPE` can be omitted if the resulting `TARGET` can be
+`PATH`, `SUFFIX`, and `TYPE` can all be omitted if the resulting `TARGET` can be
used to uniquely identify the target in `meson.build`.
+Note that `SUFFIX` did not exist prior to 1.3.0.
+
#### Backend specific arguments
*(since 0.55.0)*
diff --git a/docs/markdown/snippets/meson_compile_suffixes.md b/docs/markdown/snippets/meson_compile_suffixes.md
new file mode 100644
index 000000000..481e8adf4
--- /dev/null
+++ b/docs/markdown/snippets/meson_compile_suffixes.md
@@ -0,0 +1,7 @@
+## Meson compile command now accepts suffixes for TARGET
+
+The syntax for specifying a target for meson compile is now
+`[PATH_TO_TARGET/]TARGET_NAME.TARGET_SUFFIX[:TARGET_TYPE]` where
+`TARGET_SUFFIX` is the suffix argument given in the build target
+within meson.build. It is optional and `TARGET_NAME` remains
+sufficient if it uniquely resolves to one single target.