aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/deprecated_option.md23
-rw-r--r--docs/markdown/snippets/gnome_yelp_sources.md6
-rw-r--r--docs/markdown/snippets/install_emptydir.md18
-rw-r--r--docs/markdown/snippets/python_install_path.md12
-rw-r--r--docs/markdown/snippets/qt_module_generated_inputs.md2
-rw-r--r--docs/markdown/snippets/subprojects_packagefiles.md11
-rw-r--r--docs/markdown/snippets/uninstalled_static_linker.md11
-rw-r--r--docs/markdown/snippets/vsenv.md14
8 files changed, 96 insertions, 1 deletions
diff --git a/docs/markdown/snippets/deprecated_option.md b/docs/markdown/snippets/deprecated_option.md
new file mode 100644
index 0000000..94ee20b
--- /dev/null
+++ b/docs/markdown/snippets/deprecated_option.md
@@ -0,0 +1,23 @@
+## Deprecated project options
+
+Project options declared in `meson_options.txt` can now be marked as deprecated
+and Meson will warn when user sets a value to it. It is also possible to deprecate
+only some of the choices, and map deprecated values to a new value.
+
+```meson
+# Option fully deprecated, it warns when any value is set.
+option('o1', type: 'boolean', deprecated: true)
+
+# One of the choices is deprecated, it warns only when 'a' is in the list of values.
+option('o2', type: 'array', choices: ['a', 'b'], deprecated: ['a'])
+
+# One of the choices is deprecated, it warns only when 'a' is in the list of values
+# and replace it by 'c'.
+option('o3', type: 'array', choices: ['a', 'b', 'c'], deprecated: {'a': 'c'})
+
+# A boolean option has been replaced by a feature, old true/false values are remapped.
+option('o4', type: 'feature', deprecated: {'true': 'enabled', 'false': 'disabled'})
+
+# A feature option has been replaced by a boolean, enabled/disabled/auto values are remapped.
+option('o5', type: 'boolean', deprecated: {'enabled': 'true', 'disabled': 'false', 'auto': 'false'})
+```
diff --git a/docs/markdown/snippets/gnome_yelp_sources.md b/docs/markdown/snippets/gnome_yelp_sources.md
new file mode 100644
index 0000000..3633d17
--- /dev/null
+++ b/docs/markdown/snippets/gnome_yelp_sources.md
@@ -0,0 +1,6 @@
+## gnome.yelp variadic argument deprecation
+
+`gnome.yelp` previously allowed sources to be passed either as variadic
+arguments or as a keyword argument. If the keyword argument was given the
+variadic arguments would be silently ignored. This has changed in 0.60.0, the
+variadic form has been deprecated, and a warning is printed if both are given.
diff --git a/docs/markdown/snippets/install_emptydir.md b/docs/markdown/snippets/install_emptydir.md
new file mode 100644
index 0000000..baedf58
--- /dev/null
+++ b/docs/markdown/snippets/install_emptydir.md
@@ -0,0 +1,18 @@
+## install_emptydir function
+
+It is now possible to define a directory which will be created during
+installation, without creating it as a side effect of installing files into it.
+This replaces custom `meson.add_install_script()` routines. For example:
+
+```meson
+meson.add_install_script('sh', '-c', 'mkdir -p "$DESTDIR/@0@"'.format(path))
+```
+
+can be replaced by:
+
+```meson
+install_emptydir(path)
+```
+
+and as a bonus this works reliably on Windows, prints a sensible progress
+message, will be uninstalled by `ninja uninstall`, etc.
diff --git a/docs/markdown/snippets/python_install_path.md b/docs/markdown/snippets/python_install_path.md
new file mode 100644
index 0000000..4f22e50
--- /dev/null
+++ b/docs/markdown/snippets/python_install_path.md
@@ -0,0 +1,12 @@
+## Override python installation paths
+
+The `python` module now has options to control where modules are installed:
+- python.platlibdir: Directory for site-specific, platform-specific files.
+- python.purelibdir: Directory for site-specific, non-platform-specific files.
+
+Those options are used by python module methods `python.install_sources()` and
+`python.get_install_dir()`. By default Meson tries to detect the correct installation
+path, but make them relative to the installation `prefix`, which will often result
+in installed python modules to not be found by the interpreter unless `prefix`
+is `/usr` on Linux, or for example `C:\Python39` on Windows. These new options
+can be absolute paths outside of `prefix`.
diff --git a/docs/markdown/snippets/qt_module_generated_inputs.md b/docs/markdown/snippets/qt_module_generated_inputs.md
index f3bc695..a4dfc4c 100644
--- a/docs/markdown/snippets/qt_module_generated_inputs.md
+++ b/docs/markdown/snippets/qt_module_generated_inputs.md
@@ -1,6 +1,6 @@
## The qt modules now accept generated outputs as inputs for qt.compile_*
-This means you can uset `custom_target`, custom_target indecies
+This means you can uset `custom_target`, custom_target indices
(`custom_target[0]`, for example), or the output of `generator.process` as
inputs to the various `qt.compile_*` methods.
diff --git a/docs/markdown/snippets/subprojects_packagefiles.md b/docs/markdown/snippets/subprojects_packagefiles.md
new file mode 100644
index 0000000..7628f54
--- /dev/null
+++ b/docs/markdown/snippets/subprojects_packagefiles.md
@@ -0,0 +1,11 @@
+## New `subprojects packagefiles` subcommand
+
+It is now possible to re-apply `meson.build` overlays (`patch_filename` or
+`patch_directory` in the wrap ini file) after a subproject was downloaded and
+set up, via `meson subprojects packagefiles --apply <wrap-name>`.
+
+It is also possible for `patch_directory` overlays in a `[wrap-file]`, to copy
+the packagefiles out of the subproject and back into `packagefiles/<patch_directory>/`
+via `meson subprojects packagefiles --save <wrap-name>`. This is useful for
+testing an edit in the subproject and then saving it back to the overlay which
+is checked into git.
diff --git a/docs/markdown/snippets/uninstalled_static_linker.md b/docs/markdown/snippets/uninstalled_static_linker.md
new file mode 100644
index 0000000..cd2e4b0
--- /dev/null
+++ b/docs/markdown/snippets/uninstalled_static_linker.md
@@ -0,0 +1,11 @@
+## More efficient static linking of uninstalled libraries
+
+A somewhat common use case of [[static_library]] is to create uninstalled
+internal convenience libraries which are solely meant to be linked to other
+targets. Some build systems call these "object libraries". Meson's
+implementation does always create a static archive.
+
+This will now check to see if the static linker supports "thin archives"
+(archives which do not contain the actual object code, only references to their
+location on disk) and if so, use them to minimize space usage and speed up
+linking.
diff --git a/docs/markdown/snippets/vsenv.md b/docs/markdown/snippets/vsenv.md
new file mode 100644
index 0000000..16e9424
--- /dev/null
+++ b/docs/markdown/snippets/vsenv.md
@@ -0,0 +1,14 @@
+## Force Visual Studio environment activation
+
+Since `0.59.0`, meson automatically activates Visual Studio environment on Windows
+for all its subcommands, but only if no other compilers (e.g. `gcc` or `clang`)
+are found, and silently continue if Visual Studio activation fails.
+
+`meson setup --vsenv` command line argument can now be used to force Visual Studio
+activation even when other compilers are found. It also make Meson abort with an
+error message when activation fails. This is especially useful for Github Action
+because their Windows images have gcc in their PATH by default.
+
+`--vsenv` is set by default when using `vs` backend.
+
+Only `setup`, `compile`, `dist` and `devenv` subcommands now activate Visual Studio.