aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Fs-module.md15
-rw-r--r--docs/markdown/Rust.md13
-rw-r--r--docs/markdown/snippets/fs_suffix.md4
-rw-r--r--docs/markdown/snippets/rust-mixed.md5
-rw-r--r--docs/markdown/snippets/swift-module-name.md9
-rw-r--r--docs/yaml/functions/configure_file.yaml2
-rw-r--r--docs/yaml/functions/custom_target.yaml2
-rw-r--r--docs/yaml/functions/install_data.yaml3
-rw-r--r--docs/yaml/functions/install_headers.yaml4
9 files changed, 52 insertions, 5 deletions
diff --git a/docs/markdown/Fs-module.md b/docs/markdown/Fs-module.md
index 7ba4832..91c706e 100644
--- a/docs/markdown/Fs-module.md
+++ b/docs/markdown/Fs-module.md
@@ -206,13 +206,26 @@ fs.name('foo/bar/baz.dll.a') # baz.dll.a
*since 0.54.0*
Returns the last component of the path, dropping the last part of the
-suffix
+suffix.
```meson
fs.stem('foo/bar/baz.dll') # baz
fs.stem('foo/bar/baz.dll.a') # baz.dll
```
+### suffix
+
+*since 1.9.0*
+
+Returns the last dot-separated portion of the final component of the path
+including the dot, if any.
+
+```meson
+fs.suffix('foo/bar/baz.dll') # .dll
+fs.suffix('foo/bar/baz.dll.a') # .a
+fs.suffix('foo/bar') # (empty)
+```
+
### read
- `read(path, encoding: 'utf-8')` *(since 0.57.0)*:
return a [string](Syntax.md#strings) with the contents of the given `path`.
diff --git a/docs/markdown/Rust.md b/docs/markdown/Rust.md
index 08580cd..452dad6 100644
--- a/docs/markdown/Rust.md
+++ b/docs/markdown/Rust.md
@@ -27,14 +27,20 @@ feature is stabilized.
## Mixing Rust and non-Rust sources
-Meson currently does not support creating a single target with Rust and non Rust
-sources mixed together, therefore one must compile multiple libraries and link
-them.
+*(Since 1.9.0)* Rust supports mixed targets, but only supports using
+`rustc` as the linker for such targets. If you need to use a non-Rust
+linker, or support Meson < 1.9.0, see below.
+
+Until Meson 1.9.0, Meson did not support creating a single target with
+Rust and non Rust sources mixed together. One had to compile a separate
+Rust `static_library` or `shared_library`, and link it into the C build
+target (e.g., a library or an executable).
```meson
rust_lib = static_library(
'rust_lib',
sources : 'lib.rs',
+ rust_abi: 'c',
...
)
@@ -44,7 +50,6 @@ c_lib = static_library(
link_with : rust_lib,
)
```
-This is an implementation detail of Meson, and is subject to change in the future.
## Mixing Generated and Static sources
diff --git a/docs/markdown/snippets/fs_suffix.md b/docs/markdown/snippets/fs_suffix.md
new file mode 100644
index 0000000..7059008
--- /dev/null
+++ b/docs/markdown/snippets/fs_suffix.md
@@ -0,0 +1,4 @@
+## Added suffix function to the FS module
+
+The basename and stem were already available. For completeness, expose also the
+suffix.
diff --git a/docs/markdown/snippets/rust-mixed.md b/docs/markdown/snippets/rust-mixed.md
new file mode 100644
index 0000000..d42ab90
--- /dev/null
+++ b/docs/markdown/snippets/rust-mixed.md
@@ -0,0 +1,5 @@
+## Rust and non-Rust sources in the same target
+
+Meson now supports creating a single target with Rust and non Rust
+sources mixed together. In this case, if specified, `link_language`
+must be set to `rust`.
diff --git a/docs/markdown/snippets/swift-module-name.md b/docs/markdown/snippets/swift-module-name.md
new file mode 100644
index 0000000..689dd84
--- /dev/null
+++ b/docs/markdown/snippets/swift-module-name.md
@@ -0,0 +1,9 @@
+## Explicitly setting Swift module name is now supported
+
+It is now possible to set the Swift module name for a target via the
+*swift_module_name* target kwarg, overriding the default inferred from the
+target name.
+
+```meson
+lib = library('foo', 'foo.swift', swift_module_name: 'Foo')
+```
diff --git a/docs/yaml/functions/configure_file.yaml b/docs/yaml/functions/configure_file.yaml
index 943ad22..2deeff4 100644
--- a/docs/yaml/functions/configure_file.yaml
+++ b/docs/yaml/functions/configure_file.yaml
@@ -16,6 +16,8 @@ description: |
it takes any source or configured file as the `input:` and assumes
that the `output:` is produced when the specified command is run.
+ You can install the outputted file with the `install_dir:` kwarg, see below.
+
*(since 0.47.0)* When the `copy:` keyword argument is set to `true`,
this function will copy the file provided in `input:` to a file in the
build directory with the name `output:` in the current directory.
diff --git a/docs/yaml/functions/custom_target.yaml b/docs/yaml/functions/custom_target.yaml
index 4920407..094787b 100644
--- a/docs/yaml/functions/custom_target.yaml
+++ b/docs/yaml/functions/custom_target.yaml
@@ -12,6 +12,8 @@ description: |
custom_target('foo', output: 'file.txt', ...)
```
+ You can install the outputted files with the `install_dir:` kwarg, see below.
+
*Since 0.60.0* the name argument is optional and defaults to the basename of the first
output (`file.txt` in the example above).
diff --git a/docs/yaml/functions/install_data.yaml b/docs/yaml/functions/install_data.yaml
index fdedf7e..b9aedca 100644
--- a/docs/yaml/functions/install_data.yaml
+++ b/docs/yaml/functions/install_data.yaml
@@ -2,6 +2,9 @@ name: install_data
returns: void
description: |
Installs files from the source tree that are listed as positional arguments.
+ Please note that this can only install static files from the source tree.
+ Generated files are installed via the `install_dir:` kwarg on the respective
+ generators, such as `custom_target()` or `configure_file().
See [Installing](Installing.md) for more examples.
diff --git a/docs/yaml/functions/install_headers.yaml b/docs/yaml/functions/install_headers.yaml
index da304bc..42f6462 100644
--- a/docs/yaml/functions/install_headers.yaml
+++ b/docs/yaml/functions/install_headers.yaml
@@ -9,6 +9,10 @@ description: |
argument. As an example if this has the value `myproj` then the
headers would be installed to `/{prefix}/include/myproj`.
+ Please note that this can only install static files from the source tree.
+ Generated files are installed via the `install_dir:` kwarg on the respective
+ generators, such as `custom_target()` or `configure_file().
+
example: |
For example, this will install `common.h` and `kola.h` into
`/{prefix}/include`: