aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Generating-sources.md6
-rw-r--r--docs/markdown/Gnome-module.md6
-rw-r--r--docs/markdown/IDE-integration.md11
-rw-r--r--docs/markdown/Reference-manual.md24
-rw-r--r--docs/markdown/Release-notes-for-0.50.0.md6
-rw-r--r--docs/markdown/Release-notes-for-0.51.0.md2
-rw-r--r--docs/markdown/Syntax.md7
-rw-r--r--docs/markdown/Unit-tests.md35
-rw-r--r--docs/markdown/Users.md2
-rw-r--r--docs/markdown/snippets/dist-command.md10
-rw-r--r--docs/markdown/snippets/find_program_version.md9
-rw-r--r--docs/markdown/snippets/gtkdoc.md11
-rw-r--r--docs/markdown/snippets/kconfig_enhancements.md3
-rw-r--r--docs/markdown/snippets/shared_module_defs.md4
14 files changed, 124 insertions, 12 deletions
diff --git a/docs/markdown/Generating-sources.md b/docs/markdown/Generating-sources.md
index fe7d7ef..e22112f 100644
--- a/docs/markdown/Generating-sources.md
+++ b/docs/markdown/Generating-sources.md
@@ -59,14 +59,14 @@ foo_c = custom_target(
output : 'foo.c',
input : 'my_gen.py',
command : [prog_python, '@INPUT@', '--code', '@OUTPUT@'],
-]
+)
foo_h = custom_target(
'foo.h',
output : 'foo.h',
input : 'my_gen.py',
command : [prog_python, '@INPUT@', '--header', '@OUTPUT@'],
-]
+)
libfoo = static_library('foo', [foo_c, foo_h])
@@ -94,7 +94,7 @@ foo_ch = custom_target(
output : ['foo.c', 'foo.h'],
input : 'my_gen.py',
command : [prog_python, '@INPUT@', '@OUTPUT@'],
-]
+)
libfoo = static_library('foo', [foo_ch])
diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md
index dcd843f..9d8029e 100644
--- a/docs/markdown/Gnome-module.md
+++ b/docs/markdown/Gnome-module.md
@@ -339,10 +339,16 @@ of the module.
* `scanobjs_args`: a list of arguments to pass to `gtkdoc-scangobj`
* `c_args`: (*Added 0.48.0*) additional compile arguments to pass
* `src_dir`: include_directories to include
+* `check`: (*Since 0.52.0*) if `true` runs `gtkdoc-check` when running unit tests.
+ Note that this has the downside of rebuilding the doc for each build, which is
+ often very slow. It usually should be enabled only in CI.
This creates a `$module-doc` target that can be ran to build docs and
normally these are only built on install.
+*Since 0.52.0* Returns a target object that can be passed as dependency to other
+targets using generated doc files (e.g. in `content_files` of another doc).
+
### gnome.gtkdoc_html_dir()
Takes as argument a module name and returns the path where that
diff --git a/docs/markdown/IDE-integration.md b/docs/markdown/IDE-integration.md
index 21226c9..ec347d7 100644
--- a/docs/markdown/IDE-integration.md
+++ b/docs/markdown/IDE-integration.md
@@ -143,7 +143,8 @@ the `intro-buildoptions.json` file. Here is the JSON format for each option.
"description": "the description",
"type": "type ID",
"value": "value depends on type",
- "section": "section ID"
+ "section": "section ID",
+ "machine": "machine ID"
}
```
@@ -168,6 +169,13 @@ The possible values for `section` are:
- user
- test
+The `machine` key specifies the machine configuration for the option. Possible
+values are:
+
+ - any
+ - host
+ - build
+
To set the options, use the `meson configure` command.
Since Meson 0.50.0 it is also possible to get the default buildoptions
@@ -250,5 +258,6 @@ This API can also work without a build directory for the `--projectinfo` command
# Existing integrations
- [Gnome Builder](https://wiki.gnome.org/Apps/Builder)
+- [KDevelop](https://www.kdevelop.org)
- [Eclipse CDT](https://www.eclipse.org/cdt/) (experimental)
- [Meson Cmake Wrapper](https://github.com/prozum/meson-cmake-wrapper) (for cmake IDEs)
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 195c451..6be3ed7 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -131,7 +131,7 @@ This function creates a new top-level target. Like all top-level targets, this
integrates with the selected backend. For instance, with Ninja you can
run it as `ninja target_name`. This is a dummy target that does not execute any
command, but ensures that all dependencies are built. Dependencies can be any
-build target (e.g. return value of executable(), custom_target(), etc)
+build target (e.g. return value of [executable()](#executable), custom_target(), etc)
### assert()
@@ -586,7 +586,7 @@ be passed to [shared and static libraries](#library).
- `include_directories` one or more objects created with the
`include_directories` function, or, since 0.50.0, strings, which
will be transparently expanded to include directory objects
-- `install`, when set to true, this executable should be installed
+- `install`, when set to true, this executable should be installed, defaults to `false`
- `install_dir` override install directory for this file. The value is
relative to the `prefix` specified. F.ex, if you want to install
plugins into a subdir, you'd use something like this: `install_dir :
@@ -671,6 +671,14 @@ Keyword arguments are the following:
[disabler object](#disabler-object) instead of a not-found object.
*Since 0.49.0*
+- `version` *(since 0.52.0)* Specifies the required version, see
+ [`dependency()`](#dependency) for argument format. The version of the program
+ is determined by running `program_name --version` command. If stdout is empty
+ it fallbacks to stderr. If the output contains more text than simply a version
+ number, only the first occurence of numbers separated by dots is kept.
+ If the output is more complicated than that, the version checking will have to
+ be done manually using [`run_command()`](#run_command).
+
Meson will also autodetect scripts with a shebang line and run them
with the executable/interpreter specified in it both on Windows
(because the command invocator will reject the command otherwise) and
@@ -1334,6 +1342,13 @@ variables defined in the [`executable`](#executable) it is loaded by,
you will need to set the `export_dynamic` argument of the executable to
`true`.
+Supports the following extra keyword arguments:
+
+- `vs_module_defs`, *(Added 0.52.0)*, a string, a File object, or
+ Custom Target for a Microsoft module definition file for controlling
+ symbol exports, etc., on platforms where that is possible
+ (e.g. Windows).
+
**Note:** Linking to a shared module is not supported on some
platforms, notably OSX. Consider using a
[`shared_library`](#shared_library) instead, if you need to both
@@ -1779,6 +1794,7 @@ are immutable, all operations return their results as a new string.
- `is_even()` returns true if the number is even
- `is_odd()` returns true if the number is odd
+ - `to_string()` returns the value of the number as a string.
### `boolean` object
@@ -2210,7 +2226,7 @@ an external dependency with the following methods:
- sources: any compiled or static sources the dependency has
- `get_variable(cmake : str, pkgconfig : str, configtool : str,
- default_value : str, pkgconfig_define : [str, str]) *(Added in
+ default_value : str, pkgconfig_define : [str, str])` *(Added in
0.51.0)* A generic variable getter method, which repalces the
get_*type*_variable methods. This allows one to get the variable
from a dependency without knowing specifically how that dependency
@@ -2238,7 +2254,7 @@ and has the following methods:
- `path()` which returns a string pointing to the script or executable
**NOTE:** You should not need to use this method. Passing the object
- itself should work in all cases. F.ex.: `run_command(obj, arg1, arg2)`
+ itself should work in all cases. For example: `run_command(obj, arg1, arg2)`
### `environment` object
diff --git a/docs/markdown/Release-notes-for-0.50.0.md b/docs/markdown/Release-notes-for-0.50.0.md
index 44e8573..62a4b80 100644
--- a/docs/markdown/Release-notes-for-0.50.0.md
+++ b/docs/markdown/Release-notes-for-0.50.0.md
@@ -334,3 +334,9 @@ Meson now generates a `meson-info.json` file in the `meson-info` directory
to provide introspection information about the latest meson run. This file
is updated when the build configuration is changed and the build files are
(re)generated.
+
+## New kwarg `install:` for `configure_file()`
+
+Previously when using `configure_file()`, you could install the outputted file
+by setting the `install_dir:` keyword argument. Now, there is an explicit kwarg
+`install:` to enable/disable it. Omitting it will maintain the old behaviour.
diff --git a/docs/markdown/Release-notes-for-0.51.0.md b/docs/markdown/Release-notes-for-0.51.0.md
index 86b2f70..b7e441c 100644
--- a/docs/markdown/Release-notes-for-0.51.0.md
+++ b/docs/markdown/Release-notes-for-0.51.0.md
@@ -110,7 +110,7 @@ dependency you have.
```meson
dep = dependency('could_be_cmake_or_pkgconfig')
# cmake returns 'YES', pkg-config returns 'ON'
-if ['YES', 'ON'].contains(dep.get_variable(pkg-config : 'var-name', cmake : 'COP_VAR_NAME', default_value : 'NO'))
+if ['YES', 'ON'].contains(dep.get_variable(pkgconfig : 'var-name', cmake : 'COP_VAR_NAME', default_value : 'NO'))
error('Cannot build your project when dep is built with var-name support')
endif
```
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index 7802b92..24d9deb 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -78,6 +78,13 @@ string_var = '42'
num = string_var.to_int()
```
+Numbers can be converted to a string:
+
+```meson
+int_var = 42
+string_var = int_var.to_string()
+```
+
Booleans
--
diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md
index 694c190..3c27732 100644
--- a/docs/markdown/Unit-tests.md
+++ b/docs/markdown/Unit-tests.md
@@ -71,10 +71,23 @@ The simplest thing to do is just to run all tests, which is equivalent to runnin
$ meson test
```
-You can also run only a single test by giving its name:
+### Run subsets of tests
+
+For clarity, consider the meson.build containing:
+
+```meson
+
+test('A', ..., suite: 'foo')
+test('B', ..., suite: 'foo')
+test('C', ..., suite: 'bar')
+test('D', ..., suite: 'baz')
+
+```
+
+Specify test(s) by name like:
```console
-$ meson test testname
+$ meson test A D
```
Tests belonging to a suite `suite` can be run as follows
@@ -85,6 +98,18 @@ $ meson test --suite (sub)project_name:suite
Since version *0.46*, `(sub)project_name` can be omitted if it is the top-level project.
+Multiple suites are specified like:
+
+```console
+$ meson test --suite foo --suite bar
+```
+
+NOTE: If you choose to specify both suite(s) and specific test name(s), the
+test name(s) must be contained in the suite(s). This however is redundant--
+it would be more useful to specify either specific test names or suite(s).
+
+### Other test options
+
Sometimes you need to run the tests multiple times, which is done like this:
```console
@@ -127,4 +152,8 @@ Meson will report the output produced by the failing tests along with other usef
For further information see the command line help of Meson by running `meson test -h`.
-**NOTE:** If `meson test` does not work for you, you likely have a old version of Meson. In that case you should call `mesontest` instead. If `mesontest` doesn't work either you have a very old version prior to 0.37.0 and should upgrade.
+## Legacy notes
+
+If `meson test` does not work for you, you likely have a old version of Meson.
+In that case you should call `mesontest` instead. If `mesontest` doesn't work
+either you have a very old version prior to 0.37.0 and should upgrade.
diff --git a/docs/markdown/Users.md b/docs/markdown/Users.md
index be11cc0..37939dc 100644
--- a/docs/markdown/Users.md
+++ b/docs/markdown/Users.md
@@ -8,6 +8,7 @@ If you have a project that uses Meson that you want to add to this list, please
listed in the [`meson` GitHub topic](https://github.com/topics/meson).
- [2048.cpp](https://github.com/plibither8/2048.cpp), a fully featured terminal version of the game "2048" written in C++
+ - [Aravis](https://github.com/AravisProject/aravis), a glib/gobject based library for video acquisition using Genicam cameras
- [Akira](https://github.com/akiraux/Akira), a native Linux app for UI and UX design built in Vala and Gtk
- [AQEMU](https://github.com/tobimensch/aqemu), a Qt GUI for QEMU virtual machines, since version 0.9.3
- [Arduino sample project](https://github.com/jpakkane/mesonarduino)
@@ -48,6 +49,7 @@ listed in the [`meson` GitHub topic](https://github.com/topics/meson).
- [Hardcode-Tray](https://github.com/bil-elmoussaoui/Hardcode-Tray), fixes hardcoded tray icons in Linux
- [HexChat](https://github.com/hexchat/hexchat), a cross-platform IRC client in C
- [IGT](https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/), Linux kernel graphics driver test suite
+ - [Irssi](https://github.com/irssi/irssi), a terminal chat client in C
- [iSH](https://github.com/tbodt/ish), Linux shell for iOS
- [Janet](https://github.com/janet-lang/janet), a functional and imperative programming language and bytecode interpreter
- [json](https://github.com/nlohmann/json), JSON for Modern C++
diff --git a/docs/markdown/snippets/dist-command.md b/docs/markdown/snippets/dist-command.md
new file mode 100644
index 0000000..026b8cd
--- /dev/null
+++ b/docs/markdown/snippets/dist-command.md
@@ -0,0 +1,10 @@
+## Dist is now a top level command
+
+Previously creating a source archive could only be done with `ninja
+dist`. Starting with this release Meson provides a top level `dist`
+that can be invoked directly. It also has a command line option to
+determine which kinds of archives to create:
+
+```meson
+meson dist --formats=xztar,zip
+```
diff --git a/docs/markdown/snippets/find_program_version.md b/docs/markdown/snippets/find_program_version.md
new file mode 100644
index 0000000..04424d7
--- /dev/null
+++ b/docs/markdown/snippets/find_program_version.md
@@ -0,0 +1,9 @@
+## Version check in `find_program()`
+
+A new `version` keyword argument has been added to `find_program` to specify
+the required version. See [`dependency()`](#dependency) for argument format.
+The version of the program is determined by running `program_name --version`
+command. If stdout is empty it fallbacks to stderr. If the output contains more
+text than simply a version number, only the first occurence of numbers separated
+by dots is kept. If the output is more complicated than that, the version
+checking will have to be done manually using [`run_command()`](#run_command).
diff --git a/docs/markdown/snippets/gtkdoc.md b/docs/markdown/snippets/gtkdoc.md
new file mode 100644
index 0000000..f1f4ed4
--- /dev/null
+++ b/docs/markdown/snippets/gtkdoc.md
@@ -0,0 +1,11 @@
+## gtkdoc-check support
+
+`gnome.gtkdoc()` now has a `check` keyword argument. If `true` runs it will run
+`gtkdoc-check` when running unit tests. Note that this has the downside of
+rebuilding the doc for each build, which is often very slow. It usually should
+be enabled only in CI.
+
+## `gnome.gtkdoc()` returns target object
+
+`gnome.gtkdoc()` now returns a target object that can be passed as dependency to
+other targets using generated doc files (e.g. in `content_files` of another doc).
diff --git a/docs/markdown/snippets/kconfig_enhancements.md b/docs/markdown/snippets/kconfig_enhancements.md
new file mode 100644
index 0000000..94e3872
--- /dev/null
+++ b/docs/markdown/snippets/kconfig_enhancements.md
@@ -0,0 +1,3 @@
+## Enhancements to the kconfig module
+
+`kconfig.load()` may now accept a `configure_file()` as input file.
diff --git a/docs/markdown/snippets/shared_module_defs.md b/docs/markdown/snippets/shared_module_defs.md
new file mode 100644
index 0000000..5bc1de7
--- /dev/null
+++ b/docs/markdown/snippets/shared_module_defs.md
@@ -0,0 +1,4 @@
+## Added `vs_module_defs` to `shared_module()`
+
+Like `shared_library()`, `shared_module()` now accepts
+`vs_module_defs` argument for controlling symbol exports, etc.