aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-07-03 14:00:47 +0300
committerGitHub <noreply@github.com>2021-07-03 14:00:47 +0300
commitec5baa62c8d8c578630a0962bbeea49bedd16a24 (patch)
tree05dffb3b12b45ab500f0c3ea6e40edef4cce1db1 /docs/markdown/Reference-manual.md
parentf21685a83330a4bbe1e59c3641a0d24f1efe8825 (diff)
parentbc4201a7f1e93d6afb62caa8ce81bb1b0211b70c (diff)
downloadmeson-ec5baa62c8d8c578630a0962bbeea49bedd16a24.zip
meson-ec5baa62c8d8c578630a0962bbeea49bedd16a24.tar.gz
meson-ec5baa62c8d8c578630a0962bbeea49bedd16a24.tar.bz2
Merge pull request #8950 from dcbaker/submit/import-required-disabled
Add required and disabled to import, modules.found method
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r--docs/markdown/Reference-manual.md20
1 files changed, 15 insertions, 5 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*