From 03a0d3ddfb092ceb48f1a30fdf5e4b6af2890235 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sun, 6 Aug 2023 21:02:18 -0500 Subject: 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. --- docs/markdown/Commands.md | 7 +++++-- docs/markdown/snippets/meson_compile_suffixes.md | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 docs/markdown/snippets/meson_compile_suffixes.md (limited to 'docs/markdown') 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. -- cgit v1.2.3