aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Adding-arguments.md2
-rw-r--r--docs/markdown/Comparisons.md2
-rw-r--r--docs/markdown/Compiler-properties.md2
-rw-r--r--docs/markdown/Creating-Linux-binaries.md2
-rw-r--r--docs/markdown/Cross-compilation.md7
-rw-r--r--docs/markdown/Reference-manual.md4
-rw-r--r--docs/markdown/Release-notes-for-0.41.0.md19
-rw-r--r--docs/markdown/Subprojects.md2
-rw-r--r--docs/markdown/Syntax.md8
-rw-r--r--docs/markdown/i18n-module.md2
10 files changed, 41 insertions, 9 deletions
diff --git a/docs/markdown/Adding-arguments.md b/docs/markdown/Adding-arguments.md
index e049e82..0bf5944 100644
--- a/docs/markdown/Adding-arguments.md
+++ b/docs/markdown/Adding-arguments.md
@@ -15,7 +15,7 @@ Global compiler arguments are set with the following command. As an example you
add_global_arguments('-DFOO=bar', language : 'c')
```
-This makes Meson add the define to all C compilations. Usually you would use this setting for flags for global settings. Note that for setting the C/C++ language standard (the `-std=c99` argument in GCC), you would probably want to use a default option of the `project()` function. For details see the [reference manual](Reference manual).
+This makes Meson add the define to all C compilations. Usually you would use this setting for flags for global settings. Note that for setting the C/C++ language standard (the `-std=c99` argument in GCC), you would probably want to use a default option of the `project()` function. For details see the [reference manual](Reference-manual.md).
Global arguments have certain limitations. They all have to be defined before any build targets are specified. This ensures that the global flags are the same for every single source file built in the entire project with one exception. Compilation tests that are run as part of your project configuration do not use these flags. The reason for that is that you may need to run a test compile with and without a given flag to determine your build setup. For this reason tests do not use these global arguments.
diff --git a/docs/markdown/Comparisons.md b/docs/markdown/Comparisons.md
index 4ceb930..eb0e4dd 100644
--- a/docs/markdown/Comparisons.md
+++ b/docs/markdown/Comparisons.md
@@ -50,7 +50,7 @@ Implemented in Java. Poor Windows support. Heavily focused on Google's way of do
### Pros ###
-The fastest build system [see measurements](Performance comparison), user friendly, designed to be as invisible to the developer as possible, native support for modern tools (precompiled headers, coverage, Valgrind etc). Not Turing complete so build definition files are easy to read and understand.
+The fastest build system [see measurements](Performance-comparison.md), user friendly, designed to be as invisible to the developer as possible, native support for modern tools (precompiled headers, coverage, Valgrind etc). Not Turing complete so build definition files are easy to read and understand.
### Cons ###
diff --git a/docs/markdown/Compiler-properties.md b/docs/markdown/Compiler-properties.md
index c33d917..83fc0d9 100644
--- a/docs/markdown/Compiler-properties.md
+++ b/docs/markdown/Compiler-properties.md
@@ -10,7 +10,7 @@ Here we extract the C compiler. We could also have given the argument `cpp` to g
## System information
-This is a bit complex and more thoroughly explained on the page on [cross compilation](Cross compilation). But if you just want to know the operating system your code will run on, issue this command:
+This is a bit complex and more thoroughly explained on the page on [cross compilation](Cross-compilation.md). But if you just want to know the operating system your code will run on, issue this command:
```meson
host_machine.system()
diff --git a/docs/markdown/Creating-Linux-binaries.md b/docs/markdown/Creating-Linux-binaries.md
index 13940b5..3c48122 100644
--- a/docs/markdown/Creating-Linux-binaries.md
+++ b/docs/markdown/Creating-Linux-binaries.md
@@ -50,7 +50,7 @@ Old distros might have too old versions of some tools. For Meson this could incl
## Adding dependencies
-You want to embed and statically link every dependency you can (especially C++ dependencies). Meson's [Wrap package manager might be of use here](Wrap dependency system manual). This is equivalent to what you would do on Windows, OSX, Android etc. Sometimes static linking is not possible. In these cases you need to copy the .so files inside your package. Let's use SDL2 as an example. First we download and install it as usual giving it our custom install prefix (that is, `./configure --prefix=${HOME}/devroot`). This makes Meson's dependency detector pick it up automatically.
+You want to embed and statically link every dependency you can (especially C++ dependencies). Meson's [Wrap package manager](Wrap-dependency-system-manual.md) might be of use here. This is equivalent to what you would do on Windows, OSX, Android etc. Sometimes static linking is not possible. In these cases you need to copy the .so files inside your package. Let's use SDL2 as an example. First we download and install it as usual giving it our custom install prefix (that is, `./configure --prefix=${HOME}/devroot`). This makes Meson's dependency detector pick it up automatically.
## Building and installing
diff --git a/docs/markdown/Cross-compilation.md b/docs/markdown/Cross-compilation.md
index c6817eb..b7ef354 100644
--- a/docs/markdown/Cross-compilation.md
+++ b/docs/markdown/Cross-compilation.md
@@ -58,6 +58,13 @@ c_link_args = ['-some_link_arg']
In most cases you don't need the size and alignment settings, Meson will detect all these by compiling and running some sample programs. If your build requires some piece of data that is not listed here, Meson will stop and write an error message describing how to fix the issue. If you need extra compiler arguments to be used during cross compilation you can set them with `[langname]_args = [args]`. Just remember to specify the args as an array and not as a single string (i.e. not as `'-DCROSS=1 -DSOMETHING=3'`).
+One important thing to note, if you did not define an `exe_wrapper` in the previous section, is that Meson will make a best-effort guess at whether it can run the generated binaries on the build machine. It determines whether this is possible by looking at the `system` and `cpu_family` of build vs host. There will however be cases where they do match up, but the build machine is actually not compatible with the host machine. Typically this will happen if the libc used by the build and host machines are incompatible, or the code relies on kernel features not available on the build machine. One concrete example is a macOS build machine producing binaries for an iOS Simulator x86-64 host. They're both `darwin` and the same architecture, but their binaries are not actually compatible. In such cases you may use the `needs_exe_wrapper` property to override the auto-detection:
+
+```ini
+[properties]
+needs_exe_wrapper = true
+```
+
The last bit is the definition of host and target machines. Every cross build definition must have one or both of them. If it had neither, the build would not be a cross build but a native build. You do not need to define the build machine, as all necessary information about it is extracted automatically. The definitions for host and target machines look the same. Here is a sample for host machine.
```ini
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index c835f6f..29c073c 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -124,7 +124,7 @@ When a list of strings is passed to the `command:` keyword argument, it takes an
These are all the supported keyword arguments:
- `input` the input file name. If it's not specified in configuration mode, all the variables in the `configuration:` object (see above) are written to the `output:` file.
-- `output` the output file name. In configuration mode, the permissions of the input file (if it is specified) are copied to the output file.
+- `output` the output file name (since v0.41.0, may contain `@PLAINNAME@` or `@BASENAME@` substitutions). In configuration mode, the permissions of the input file (if it is specified) are copied to the output file.
- `configuration` as explained above, this is where you pass the configuration data object as returned by `configuration_data()`
- `command` as explained above, if specified, Meson does not create the file itself but rather runs the specified command, which allows you to do fully custom file generation
- `install_dir` the subdirectory to install the generated file to (e.g. `share/myproject`), if omitted the file is not installed.
@@ -345,7 +345,7 @@ If you want to generate files for general purposes such as for generating header
value get_option(option_name)
```
-Obtains the value of the [project build option](Build options) specified in the positional argument.
+Obtains the value of the [project build option](Build-options.md) specified in the positional argument.
### get_variable()
diff --git a/docs/markdown/Release-notes-for-0.41.0.md b/docs/markdown/Release-notes-for-0.41.0.md
index 7da9ed7..b24e03f 100644
--- a/docs/markdown/Release-notes-for-0.41.0.md
+++ b/docs/markdown/Release-notes-for-0.41.0.md
@@ -61,3 +61,22 @@ Targets for building rust now take a `rust_args` keyword.
Code coverage can be generated for tests by passing the `--cov` argument to
the `run_tests.py` test runner. Note, since multiple processes are used,
coverage must be combined before producing a report (`coverage3 combine`.)
+
+## Reproducible builds
+
+All known issues have been fixed and Meson can now build reproducible Debian
+packages out of the box.
+
+## Extended template substitution in configure_file
+
+The output argument of `configure_file()` is parsed for @BASENAME@ and
+@PLAINNAME@ substitutions.
+
+## Cross-config property for overriding whether an exe wrapper is needed
+
+The new `needs_exe_wrapper` property allows overriding auto-detection for
+cases where `build_machine` appears to be compatible with `host_machine`,
+but actually isn't. For example when:
+- `build_machine` is macOS and `host_machine` is the iOS Simulator
+- the `build_machine`'s libc is glibc but the `host_machine` libc is uClibc
+- code relies on kernel features not available on the `build_machine`
diff --git a/docs/markdown/Subprojects.md b/docs/markdown/Subprojects.md
index b91366d..2dd012e 100644
--- a/docs/markdown/Subprojects.md
+++ b/docs/markdown/Subprojects.md
@@ -69,4 +69,4 @@ This uses the system dependency when available and the self built version if not
# Obtaining subprojects
-Meson ships with a dependency system to automatically obtain dependency subprojects. It is documented in the [Wrap dependency system manual](Wrap dependency system manual).
+Meson ships with a dependency system to automatically obtain dependency subprojects. It is documented in the [Wrap dependency system manual](Wrap-dependency-system-manual.md).
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index 2a7428b..09369e6 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -8,8 +8,7 @@ The syntax of Meson's specification language has been kept as simple as possible
The main building blocks of the language are *variables*, *numbers*, *booleans*, *strings*, *arrays*, *function calls*, *method calls*, *if statements* and *includes*.
-Usually one Meson statement takes just one line. There is no way to have multiple statements on one line as in e.g. *C*. Function and method calls' argument lists can be split over multiple lines. Meson will autodetect this case and do the right thing. Apart from line ending whitespace has no syntactical meaning.
-
+Usually one Meson statement takes just one line. There is no way to have multiple statements on one line as in e.g. *C*. Function and method calls' argument lists can be split over multiple lines. Meson will autodetect this case and do the right thing. In other cases you can get multi-line statements by ending the line with a `\`. Apart from line ending whitespace has no syntactic meaning.
Variables
--
@@ -318,3 +317,8 @@ Most source trees have multiple subdirectories to process. These can be handled
test_data_dir = 'data'
subdir('tests')
```
+
+User-defined functions and methods
+--
+
+Meson does not currently support user-defined functions or methods. The addition of user-defined functions would make Meson Turing-complete which would make it harder to reason about and more difficult to integrate with tools like IDEs. More details about this are [in the FAQ](FAQ.md#why-is-meson-not-just-a-python-module-so-i-could-code-my-build-setup-in-python). If because of this limitation you find yourself copying and pasting code a lot you may be able to use a [`foreach` loop instead](#foreach-statements).
diff --git a/docs/markdown/i18n-module.md b/docs/markdown/i18n-module.md
index 9388be8..172f73e 100644
--- a/docs/markdown/i18n-module.md
+++ b/docs/markdown/i18n-module.md
@@ -19,6 +19,8 @@ This function also defines targets for maintainers to use:
**Note**: These output to the source directory
* `<project_id>-pot`: runs `xgettext` to regenerate the pot file
+* `<project_id>-update-po`: regenerates the `.po` files from current `.pot` file
+* `<project_id>-gmo`: builds the translations without installing
### i18n.merge_file()