aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Builtin-options.md4
-rw-r--r--docs/markdown/snippets/dir_options_outside_prefix.md12
2 files changed, 15 insertions, 1 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md
index 613b8b8..db3c3e8 100644
--- a/docs/markdown/Builtin-options.md
+++ b/docs/markdown/Builtin-options.md
@@ -23,13 +23,15 @@ For legacy reasons `--warnlevel` is the cli argument for the
They can also be edited after setup using `meson configure
-Doption=value`.
-Installation options are all relative to the prefix, except:
+Installation options are usually relative to the prefix but it should
+not be relied on, since they can be absolute paths in the following cases:
* When the prefix is `/usr`: `sysconfdir` defaults to `/etc`,
`localstatedir` defaults to `/var`, and `sharedstatedir` defaults to
`/var/lib`
* When the prefix is `/usr/local`: `localstatedir` defaults
to `/var/local`, and `sharedstatedir` defaults to `/var/local/lib`
+* When an absolute path outside of prefix is provided by the user/distributor.
### Directories
diff --git a/docs/markdown/snippets/dir_options_outside_prefix.md b/docs/markdown/snippets/dir_options_outside_prefix.md
new file mode 100644
index 0000000..ceb5e50
--- /dev/null
+++ b/docs/markdown/snippets/dir_options_outside_prefix.md
@@ -0,0 +1,12 @@
+## All directory options now support paths outside of prefix
+
+Previously, Meson only allowed most directory options to be relative to prefix.
+This restriction has been now lifted, bringing us in line with Autotools and
+CMake. It is also useful for platforms like Nix, which install projects into
+multiple independent prefixes.
+
+As a consequence, `get_option` might return absolute paths for any
+directory option, if a directory outside of prefix is passed. This
+is technically a backwards incompatible change but its effect
+should be minimal, thanks to widespread use of `join_paths`/
+`/` operator and pkg-config generator module.