From 9b5a5c2e61b3eda633acbe859b0e40e9597dac25 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 21 Aug 2017 00:22:33 +0300 Subject: [PATCH] Wrapped and alphabetized the remaining modules. --- docs/markdown/Pkgconfig-module.md | 44 ++++++++++++++++++++++--------- docs/markdown/Python-3-module.md | 15 ++++++++--- docs/markdown/Qt4-module.md | 3 ++- docs/markdown/Qt5-module.md | 13 ++++++--- docs/markdown/RPM-module.md | 10 +++++-- docs/markdown/Windows-module.md | 11 +++++--- docs/markdown/i18n-module.md | 36 +++++++++++++++++++------ 7 files changed, 98 insertions(+), 34 deletions(-) diff --git a/docs/markdown/Pkgconfig-module.md b/docs/markdown/Pkgconfig-module.md index 2424421e6..8814d192c 100644 --- a/docs/markdown/Pkgconfig-module.md +++ b/docs/markdown/Pkgconfig-module.md @@ -1,24 +1,42 @@ # Pkgconfig module -This module is a simple generator for [pkg-config](https://pkg-config.freedesktop.org/) files. +This module is a simple generator for +[pkg-config](https://pkg-config.freedesktop.org/) files. ## Usage -To use this module, just do: **`pkg = import('pkgconfig')`**. The following function will then be available as `pkg.generate()`. You can, of course, replace the name `pkg` with anything else. +To use this module, just do: **`pkg = import('pkgconfig')`**. The +following function will then be available as `pkg.generate()`. You +can, of course, replace the name `pkg` with anything else. ### pkg.generate() -The generated file's properties are specified with the following keyword arguments. +The generated file's properties are specified with the following +keyword arguments. -- `libraries` a list of built libraries (usually results of shared_library) that the user needs to link against -- `version` a string describing the version of this library -- `name` the name of this library - `description` a string describing the library -- `filebase`, the base name to use for the pkg-config file, as an example the value of `libfoo` would produce a pkg-config file called `libfoo.pc` -- `subdirs` which subdirs of `include` should be added to the header search path, for example if you install headers into `${PREFIX}/include/foobar-1`, the correct value for this argument would be `foobar-1` +- `extra_cflags` a list of extra compiler flags to be added to the + `Cflags` field after the header search path +- `filebase`, the base name to use for the pkg-config file, as an + example the value of `libfoo` would produce a pkg-config file called + `libfoo.pc` +- `install_dir` the directory to install to, defaults to the value of + option `libdir` followed by `/pkgconfig` +- `libraries` a list of built libraries (usually results of + shared_library) that the user needs to link against +- `libraries_private` list of strings to put in the + `Libraries.private` field +- `name` the name of this library +- `subdirs` which subdirs of `include` should be added to the header + search path, for example if you install headers into + `${PREFIX}/include/foobar-1`, the correct value for this argument + would be `foobar-1` - `requires` list of strings to put in the `Requires` field -- `requires_private` list of strings to put in the `Requires.private` field -- `libraries_private` list of strings to put in the `Libraries.private` field -- `install_dir` the directory to install to, defaults to the value of option `libdir` followed by `/pkgconfig` -- `extra_cflags` a list of extra compiler flags to be added to the `Cflags` field after the header search path -- `variables` a list of strings with custom variables to add to the generated file. The strings must be in the form `name=value` and may reference other pkgconfig variables, e.g. `datadir=${prefix}/share`. The names `prefix`, `libdir` and `installdir` are reserved and may not be used. +- `requires_private` list of strings to put in the `Requires.private` + field +- `variables` a list of strings with custom variables to add to the + generated file. The strings must be in the form `name=value` and may + reference other pkgconfig variables, + e.g. `datadir=${prefix}/share`. The names `prefix`, `libdir` and + `installdir` are reserved and may not be used. +- `version` a string describing the version of this library diff --git a/docs/markdown/Python-3-module.md b/docs/markdown/Python-3-module.md index 2a33ba8f9..fa1d78e33 100644 --- a/docs/markdown/Python-3-module.md +++ b/docs/markdown/Python-3-module.md @@ -1,16 +1,22 @@ # Python 3 module -This module provides support for dealing with Python 3. It has the following methods. +This module provides support for dealing with Python 3. It has the +following methods. ## find_python -This is a cross platform way of finding the Python 3 executable, which may have a different name on different operating systems. Returns an external program object. +This is a cross platform way of finding the Python 3 executable, which +may have a different name on different operating systems. Returns an +external program object. *Added 0.38.0* ## extension_module -Creates a `shared_module` target that is named according to the naming conventions of the target platform. All positional and keyword arguments are the same as for [shared_module](Reference-manual.md#shared_module). +Creates a `shared_module` target that is named according to the naming +conventions of the target platform. All positional and keyword +arguments are the same as for +[shared_module](Reference-manual.md#shared_module). *Added 0.38.0* @@ -22,6 +28,7 @@ Returns a string with the Python language version such as `3.5`. ## sysconfig_path -Returns the Python sysconfig path without prefix, such as `lib/python3.6/site-packages`. +Returns the Python sysconfig path without prefix, such as +`lib/python3.6/site-packages`. *Added 0.40.0* diff --git a/docs/markdown/Qt4-module.md b/docs/markdown/Qt4-module.md index 77e271dab..4be1be59b 100644 --- a/docs/markdown/Qt4-module.md +++ b/docs/markdown/Qt4-module.md @@ -1,3 +1,4 @@ # Qt4 module -This module provides support for Qt4's `moc`, `uic` and `rcc` tools. It is used identically to the [Qt 5 module](Qt5-module.md). +This module provides support for Qt4's `moc`, `uic` and `rcc` +tools. It is used identically to the [Qt 5 module](Qt5-module.md). diff --git a/docs/markdown/Qt5-module.md b/docs/markdown/Qt5-module.md index 64d29204a..7082309ad 100644 --- a/docs/markdown/Qt5-module.md +++ b/docs/markdown/Qt5-module.md @@ -1,10 +1,15 @@ # Qt5 module -The Qt5 module provides tools to automatically deal with the various tools and steps required for Qt. The module has one method. +The Qt5 module provides tools to automatically deal with the various +tools and steps required for Qt. The module has one method. ## preprocess -This method takes four keyword arguments, `moc_headers`, `moc_sources`, `ui_files` and `qresources` which define the files that require preprocessing with `moc`, `uic` and `rcc`. It returns an opaque object that should be passed to a main build target. A simple example would look like this: +This method takes four keyword arguments, `moc_headers`, +`moc_sources`, `ui_files` and `qresources` which define the files that +require preprocessing with `moc`, `uic` and `rcc`. It returns an +opaque object that should be passed to a main build target. A simple +example would look like this: ```meson qt5 = import('qt5') @@ -15,4 +20,6 @@ executable('myprog', 'main.cpp', 'myclass.cpp', moc_files, ``` -The 'modules' argument is used to include Qt modules in the project. See the Qt documentation for the [list of modules](http://doc.qt.io/qt-5/qtmodules.html). +The 'modules' argument is used to include Qt modules in the project. +See the Qt documentation for the [list of +modules](http://doc.qt.io/qt-5/qtmodules.html). diff --git a/docs/markdown/RPM-module.md b/docs/markdown/RPM-module.md index 3939937d3..cab6d968a 100644 --- a/docs/markdown/RPM-module.md +++ b/docs/markdown/RPM-module.md @@ -1,10 +1,16 @@ # RPM module -The RPM module can be used to create a sample rpm spec file for a Meson project. It autodetects installed files, dependencies and so on. Using it is very simple. At the very end of your Meson project (that is, the end of your top level `meson.build` file) add these two lines. +The RPM module can be used to create a sample rpm spec file for a +Meson project. It autodetects installed files, dependencies and so +on. Using it is very simple. At the very end of your Meson project +(that is, the end of your top level `meson.build` file) add these two +lines. ```meson rpm = import('rpm') rpm.generate_spec_template() ``` -Run Meson once on your code and the template will be written in your build directory. Then remove the two lines above and manually edit the template to add missing information. After this it is ready for use. +Run Meson once on your code and the template will be written in your +build directory. Then remove the two lines above and manually edit the +template to add missing information. After this it is ready for use. diff --git a/docs/markdown/Windows-module.md b/docs/markdown/Windows-module.md index b2b514569..1d4b9bffe 100644 --- a/docs/markdown/Windows-module.md +++ b/docs/markdown/Windows-module.md @@ -1,12 +1,17 @@ # Windows module -This module provides functionality used to build applications for Windows. +This module provides functionality used to build applications for +Windows. ## Methods ### compile_resources -Compiles Windows `rc` files specified in the positional arguments. Returns an opaque object that you put in the list of sources for the target you want to have the resources in. This method has the following keyword argument. +Compiles Windows `rc` files specified in the positional +arguments. Returns an opaque object that you put in the list of +sources for the target you want to have the resources in. This method +has the following keyword argument. - `args` lists extra arguments to pass to the resource compiler - - `include_directories` which does the same thing as it does on target declarations: specifies header search directories +- `include_directories` which does the same thing as it does on target + declarations: specifies header search directories diff --git a/docs/markdown/i18n-module.md b/docs/markdown/i18n-module.md index 172f73e8e..5e6004abe 100644 --- a/docs/markdown/i18n-module.md +++ b/docs/markdown/i18n-module.md @@ -4,16 +4,33 @@ This module provides internationalisation and localisation functionality. ## Usage -To use this module, just do: **`i18n = import('i18n')`**. The following functions will then be available as methods on the object with the name `i18n`. You can, of course, replace the name `i18n` with anything else. +To use this module, just do: **`i18n = import('i18n')`**. The +following functions will then be available as methods on the object +with the name `i18n`. You can, of course, replace the name `i18n` with +anything else. ### i18n.gettext() -Sets up gettext localisation so that translations are built and placed into their proper locations during install. Takes one positional argument which is the name of the gettext module. +Sets up gettext localisation so that translations are built and placed +into their proper locations during install. Takes one positional +argument which is the name of the gettext module. -* `languages`: list of languages that are to be generated. As of 0.37.0 this is optional and the [LINGUAS](https://www.gnu.org/software/gettext/manual/html_node/po_002fLINGUAS.html) file is read. -* `data_dirs`: (*Added 0.36.0*) list of directories to be set for `GETTEXTDATADIRS` env var (Requires gettext 0.19.8+), used for local its files -* `preset`: (*Added 0.37.0*) name of a preset list of arguments, current option is `'glib'`, see [source](https://github.com/mesonbuild/meson/blob/master/mesonbuild/modules/i18n.py) for for their value -* `args`: list of extra arguments to pass to `xgettext` when generating the pot file +* `args`: list of extra arguments to pass to `xgettext` when + generating the pot file + +* `data_dirs`: (*Added 0.36.0*) list of directories to be set for + `GETTEXTDATADIRS` env var (Requires gettext 0.19.8+), used for local + its files + +* `languages`: list of languages that are to be generated. As of + 0.37.0 this is optional and the + [LINGUAS](https://www.gnu.org/software/gettext/manual/html_node/po_002fLINGUAS.html) + file is read. + +* `preset`: (*Added 0.37.0*) name of a preset list of arguments, + current option is `'glib'`, see + [source](https://github.com/mesonbuild/meson/blob/master/mesonbuild/modules/i18n.py) + for for their value This function also defines targets for maintainers to use: **Note**: These output to the source directory @@ -24,10 +41,13 @@ This function also defines targets for maintainers to use: ### i18n.merge_file() -This merges translations into a text file using `msgfmt`. See [custom_target](https://github.com/mesonbuild/meson/wiki/Reference%20manual#custom_target) for normal keywords. In addition it accepts these keywords: +This merges translations into a text file using `msgfmt`. See +[custom_target](https://github.com/mesonbuild/meson/wiki/Reference%20manual#custom_target) +for normal keywords. In addition it accepts these keywords: +* `data_dirs`: (*Added 0.41.0*) list of directories for its files (See + also `i18n.gettext()`) * `po_dir`: directory containing translations, relative to current directory -* `data_dirs`: (*Added 0.41.0*) list of directories for its files (See also `i18n.gettext()`) * `type`: type of file, valid options are `'xml'` (default) and `'desktop'` *Added 0.37.0*