diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Reference-manual.md | 20 | ||||
-rw-r--r-- | docs/markdown/SimpleStart.md | 8 | ||||
-rw-r--r-- | docs/markdown/Users.md | 2 | ||||
-rw-r--r-- | docs/markdown/images/osx_xcode.png | bin | 0 -> 186012 bytes | |||
-rw-r--r-- | docs/markdown/snippets/required_and_disabled_import.md | 5 |
5 files changed, 25 insertions, 10 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 16fcbbf..e96a6fc 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -973,19 +973,21 @@ a non-existing variable will cause a fatal error. ### import() -``` meson - module_object import(module_name) +``` + module_object import(string, required : bool | feature, disabler : bool) ``` -Imports the given extension module. Returns an opaque object that can -be used to call the methods of the module. Here's an example for a -hypothetical `testmod` module. +Imports the given extension module. Returns an object that can be used to call +the methods of the module. Here's an example for a hypothetical `testmod` +module. ```meson tmod = import('testmod') tmod.do_something() ``` +*Since 0.59.0* the required and disabler keyword arguments + ### include_directories() ``` meson @@ -2911,3 +2913,11 @@ sample piece of code with [`compiler.run()`](#compiler-object) or - `returncode()`: the return code of executing the compiled binary - `stderr()`: the standard error produced when the command was run - `stdout()`: the standard out produced when the command was run + +### `module` object + +Modules provide their own specific implementation methods, but all modules +proivide the following methods: + +- `bool found()`: returns True if the module was successfully imported, + otherwise false. *Since 0.59.0* diff --git a/docs/markdown/SimpleStart.md b/docs/markdown/SimpleStart.md index 371f1be..bf0d7ae 100644 --- a/docs/markdown/SimpleStart.md +++ b/docs/markdown/SimpleStart.md @@ -100,22 +100,22 @@ Double click the downloaded installer to start. If you are running a new macOS version, it might refuse to run the application with the following error message: - + This can be fixed by starting System Preferences, selecting the Security and Privacy entry. At the bottom it shows the blocked app and you can enable it by clicking on the "Open anyway" button. - + Now the installer should start. If not, double click on the downloaded installer file again. - + Once the installation is finished you can verify that the system is working via the terminal app. - + ## Running Meson diff --git a/docs/markdown/Users.md b/docs/markdown/Users.md index d6df32c..032ec1e 100644 --- a/docs/markdown/Users.md +++ b/docs/markdown/Users.md @@ -108,7 +108,7 @@ format files - [OTS](https://github.com/khaledhosny/ots), the OpenType Sanitizer, parses and serializes OpenType files (OTF, TTF) and WOFF and WOFF2 font files, validating and sanitizing them as it goes. Used by Chromium and Firefox - [Outlier](https://github.com/kerolasa/outlier), a small Hello World style Meson example project - [p11-kit](https://github.com/p11-glue/p11-kit), PKCS#11 module aggregator - - [Pacman](https://git.archlinux.org/pacman.git/tree/), a package manager for Arch Linux + - [Pacman](https://gitlab.archlinux.org/pacman/pacman.git), a package manager for Arch Linux - [Pango](https://git.gnome.org/browse/pango/), an Internationalized text layout and rendering library - [Parzip](https://github.com/jpakkane/parzip), a multithreaded reimplementation of Zip - [Peek](https://github.com/phw/peek), simple animated GIF screen recorder with an easy to use interface diff --git a/docs/markdown/images/osx_xcode.png b/docs/markdown/images/osx_xcode.png Binary files differnew file mode 100644 index 0000000..89075f3 --- /dev/null +++ b/docs/markdown/images/osx_xcode.png diff --git a/docs/markdown/snippets/required_and_disabled_import.md b/docs/markdown/snippets/required_and_disabled_import.md new file mode 100644 index 0000000..39ca307 --- /dev/null +++ b/docs/markdown/snippets/required_and_disabled_import.md @@ -0,0 +1,5 @@ +## The `import()` function gains `required` and `disabler` arguments + +In addition, modules now have a `found()` method, like programs and +dependencies. This allows them to be conditionally required, and used in most +places that an object with a `found()` method can be. |