diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Pkgconfig-module.md | 7 | ||||
-rw-r--r-- | docs/markdown/Reference-manual.md | 27 | ||||
-rw-r--r-- | docs/markdown/Release-notes-for-0.46.0.md | 7 | ||||
-rw-r--r-- | docs/markdown/snippets/pkgconfig-generator.md | 14 |
4 files changed, 55 insertions, 0 deletions
diff --git a/docs/markdown/Pkgconfig-module.md b/docs/markdown/Pkgconfig-module.md index 853cf50..77db809 100644 --- a/docs/markdown/Pkgconfig-module.md +++ b/docs/markdown/Pkgconfig-module.md @@ -51,3 +51,10 @@ keyword arguments. - `version` a string describing the version of this library - `d_module_versions` a list of module version flags used when compiling D sources referred to by this pkg-config file + +Since 0.46 a `StaticLibrary` or `SharedLibrary` object can optionally be passed +as first positional argument. If one is provided a default value will be +provided for all required fields of the pc file: +- `install_dir` is set to `pkgconfig` folder in the same location than the provided library. +- `description` is set to the project's name followed by the library's name. +- `name` is set to the library's name. diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 54b7131..5109b25 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1129,6 +1129,33 @@ This function has one keyword argument. recurse in the subdir if they all return `true` when queried with `.found()` +### subdir_done() + +``` meson + subdir_done() +``` + +Stops further interpretation of the meson script file from the point of +the invocation. All steps executed up to this point are valid and will +be executed by meson. This means that all targets defined before the call +of `subdir_done` will be build. + +If the current script was called by `subdir` the execution returns to the +calling directory and continues as if the script had reached the end. +If the current script is the top level script meson configures the project +as defined up to this point. + +Example: +```meson +project('example exit', 'cpp') +executable('exe1', 'exe1.cpp') +subdir_done() +executable('exe2', 'exe2.cpp') +``` + +The executable `exe1` will be build, while the executable `exe2` is not +build. + ### subproject() ``` meson diff --git a/docs/markdown/Release-notes-for-0.46.0.md b/docs/markdown/Release-notes-for-0.46.0.md index 395a94d..e062459 100644 --- a/docs/markdown/Release-notes-for-0.46.0.md +++ b/docs/markdown/Release-notes-for-0.46.0.md @@ -14,3 +14,10 @@ whose contents should look like this: ## Feature name A short description explaining the new feature and how it should be used. + +## Allow early return from a script + +Added the function `subdir_done()`. Its invocation exits the current script at +the point of invocation. All previously invoked build targets and commands are +build/executed. All following ones are ignored. If the current script was +invoked via `subdir()` the parent script continues normally. diff --git a/docs/markdown/snippets/pkgconfig-generator.md b/docs/markdown/snippets/pkgconfig-generator.md new file mode 100644 index 0000000..93920d3 --- /dev/null +++ b/docs/markdown/snippets/pkgconfig-generator.md @@ -0,0 +1,14 @@ +## Improvements to pkgconfig module + +A `StaticLibrary` or `SharedLibrary` object can optionally be passed +as first positional argument of the `generate()` method. If one is provided a +default value will be provided for all required fields of the pc file: +- `install_dir` is set to `pkgconfig` folder in the same location than the provided library. +- `description` is set to the project's name followed by the library's name. +- `name` is set to the library's name. + +Generating a .pc file is now as simple as: + +``` +pkgconfig.generate(mylib) +``` |