aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-03-17 13:27:31 -0400
committerXavier Claessens <xclaesse@gmail.com>2021-03-18 08:37:44 -0400
commit848e360450c397f1dcfc4d8d3f614df05806699a (patch)
tree8115c94c08608b28f730daeb42bcebd2fa3e2aef /docs/markdown
parentc756d9789558d7100383759e4f2aa8d4b2321620 (diff)
downloadmeson-848e360450c397f1dcfc4d8d3f614df05806699a.zip
meson-848e360450c397f1dcfc4d8d3f614df05806699a.tar.gz
meson-848e360450c397f1dcfc4d8d3f614df05806699a.tar.bz2
interpreter: Add varname as positional arg in dep.get_variable()
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Reference-manual.md8
-rw-r--r--docs/markdown/snippets/dep_get_variable.md8
2 files changed, 14 insertions, 2 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index a70c94b..d81be47 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -2678,7 +2678,7 @@ an external dependency with the following methods:
- includes: any include_directories
- sources: any compiled or static sources the dependency has
- - `get_variable(cmake : str, pkgconfig : str, configtool : str,
+ - `get_variable(varname, cmake : str, pkgconfig : str, configtool : str,
internal: str, default_value : str, pkgconfig_define : [str, str])`
*(since 0.51.0)*: a generic variable getter method, which replaces the
get_*type*_variable methods. This allows one to get the variable
@@ -2686,8 +2686,12 @@ an external dependency with the following methods:
was found. If default_value is set and the value cannot be gotten
from the object then default_value is returned, if it is not set
then an error is raised.
-
*(since 0.54.0)* added `internal` keyword.
+ *(since 0.58.0)* added `varname` as first positional argument. It is used as
+ default value for `cmake`, `pkgconfig`, `configtool` and `internal` keyword
+ arguments. It is useful in the common case where `pkgconfig` and `internal`
+ use the same variable name, in which case it's easier to write `dep.get_variable('foo')`
+ instead of `dep.get_variable(pkgconfig: 'foo', internal: 'foo')`.
### `disabler` object
diff --git a/docs/markdown/snippets/dep_get_variable.md b/docs/markdown/snippets/dep_get_variable.md
new file mode 100644
index 0000000..54373d9
--- /dev/null
+++ b/docs/markdown/snippets/dep_get_variable.md
@@ -0,0 +1,8 @@
+## `dep.get_variable(varname)`
+
+`dep.get_variable()` now has `varname` as first positional argument.
+It is used as default value for `cmake`, `pkgconfig`, `configtool` and `internal`
+keyword arguments. It is useful in the common case where `pkgconfig` and `internal`
+use the same variable name, in which case it's easier to write `dep.get_variable('foo')`
+instead of `dep.get_variable(pkgconfig: 'foo', internal: 'foo')`.
+