diff options
Diffstat (limited to 'docs')
34 files changed, 819 insertions, 416 deletions
diff --git a/docs/markdown/Build-options.md b/docs/markdown/Build-options.md index ec4a3bb..66c9cb5 100644 --- a/docs/markdown/Build-options.md +++ b/docs/markdown/Build-options.md @@ -19,6 +19,7 @@ option('combo_opt', type : 'combo', choices : ['one', 'two', 'three'], value : ' option('integer_opt', type : 'integer', min : 0, max : 5, value : 3) # Since 0.45.0 option('free_array_opt', type : 'array', value : ['one', 'two']) option('array_opt', type : 'array', choices : ['one', 'two', 'three'], value : ['one', 'two']) +option('some_feature', type : 'feature', value : 'enabled') ``` ## Build option types @@ -60,8 +61,46 @@ empty. The `value` parameter specifies the default value of the option and if it is unset then the values of `choices` will be used as the default. +As of 0.47.0 -Dopt= and -Dopt=[] both pass an empty list, before this -Dopt= +would pass a list with an empty string. + This type is available since version 0.44.0 +### Features + +A `feature` option has three states: `enabled`, `disabled` or `auto`. It is intended +to be passed as value for the `required` keyword argument of most functions. +Currently supported in +[`dependency()`](Reference-manual.md#dependency), +[`find_library()`](Reference-manual.md#compiler-object), +[`find_program()`](Reference-manual.md#find_program) and +[`add_languages()`](Reference-manual.md#add_languages) functions. + +- `enabled` is the same as passing `required : true`. +- `auto` is the same as passing `required : false`. +- `disabled` do not look for the dependency and always return 'not-found'. + +When getting the value of this type of option using `get_option()`, a special +object is returned instead of the string representation of the option's value. +That object has three methods returning boolean and taking no argument: +`enabled()`, `disabled()`, and `auto()`. + +```meson +d = dependency('foo', required : get_option('myfeature')) +if d.found() + app = executable('myapp', 'main.c', dependencies : [d]) +endif +``` + +If the value of a `feature` option is set to `auto`, that value is overriden by +the global `auto_features` option (which defaults to `auto`). This is intended +to be used by packagers who want to have full control on which dependencies are +required and which are disabled, and not rely on build-deps being installed +(at the right version) to get a feature enabled. They could set +`auto_features=enabled` to enable all features and disable explicitly only the +few they don't want, if any. + +This type is available since version 0.47.0 ## Using build options diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index 39db4fa..b23cc94 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -12,11 +12,7 @@ universal options, base options, compiler options. A list of these options can be found by running `meson --help`. All these can be set by passing to `meson` (aka `meson setup`) in any of -these ways: - -| --option=value | -| --option value | -| -Doption=value | +these ways: `--option=value`, `--option value`, `-Doption=value`. They can also be edited after setup using `meson configure`. @@ -25,21 +21,31 @@ Installation options are all relative to the prefix, except: * When the prefix is `/usr`: `sysconfdir` defaults to `/etc`, `localstatedir` defaults to `/var`, and `sharedstatedir` defaults to `/var/lib` * When the prefix is `/usr/local`: `localstatedir` defaults to `/var/local`, and `sharedstatedir` defaults to `/var/local/lib` -| Option | Default value | Description -| ------ | ------------- | ----------- -| prefix | see below | Installation prefix -| libdir | see below | Library directory -| libexecdir | libexec | Library executable directory -| bindir | bin | Executable directory -| sbindir | sbin | System executable directory -| includedir | include | Header file directory -| datadir | share | Data file directory -| mandir | share/man | Manual page directory -| infodir | share/info | Info page directory -| localedir | share/locale | Locale data directory -| sysconfdir | etc | Sysconf data directory -| localstatedir | var | Localstate data directory -| sharedstatedir | com | Architecture-independent data directory +| Option | Default value | Description | +| ------ | ------------- | ----------- | +| prefix | see below | Installation prefix | +| libdir | see below | Library directory | +| libexecdir | libexec | Library executable directory | +| bindir | bin | Executable directory | +| sbindir | sbin | System executable directory | +| includedir | include | Header file directory | +| datadir | share | Data file directory | +| mandir | share/man | Manual page directory | +| infodir | share/info | Info page directory | +| localedir | share/locale | Locale data directory | +| sysconfdir | etc | Sysconf data directory | +| localstatedir | var | Localstate data directory | +| sharedstatedir | com | Architecture-independent data directory | +| werror | false | Treat warnings as erros | +| warnlevel {1, 2, 3} | 1 | Set the warning level. From 1 = lowest to 3 = highest | +| layout {mirror,flat} | mirror | Build directory layout. | +| default-library {shared, static, both} | shared | Default library type. | +| backend {ninja, vs,<br>vs2010, vs2015, vs2017, xcode} | | Backend to use (default: ninja). | +| stdsplit | | Split stdout and stderr in test logs. | +| errorlogs | | Whether to print the logs from failing tests. | +| cross-file CROSS_FILE | | File describing cross compilation environment. | +| wrap-mode {default, nofallback, nodownload, forcefallback} | | Special wrap mode to use | + `prefix` defaults to `C:/` on Windows, and `/usr/local/` otherwise. You should always override this value. @@ -62,19 +68,19 @@ a builddir and then run `meson configure` on it with no options. The following options are available. Note that they may not be available on all platforms or with all compilers: -| Option | Default value | Possible values | Description -| ----------- | ------------- | --------------- | ----------- -| b_asneeded | true | true, false | Use -Wl,--as-needed when linking -| b_bitcode | false | true, false | Embed Apple bitcode, see below -| b_colorout | always | auto, always, never | Use colored output -| b_coverage | false | true, false | Enable coverage tracking -| b_lundef | true | true, false | Don't allow undefined symbols when linking -| b_lto | false | true, false | Use link time optimization -| b_ndebug | false | true, false, if-release | Disable asserts -| b_pch | true | true, false | Use precompiled headers -| b_pgo | off | off, generate, use | Use profile guided optimization -| b_sanitize | none | see below | Code sanitizer to use -| b_staticpic | true | true, false | Build static libraries as position independent +| Option | Default value | Possible values | Description | +| ----------- | ------------- | --------------- | ----------- | +| b_asneeded | true | true, false | Use -Wl,--as-needed when linking | +| b_bitcode | false | true, false | Embed Apple bitcode, see below | +| b_colorout | always | auto, always, never | Use colored output | +| b_coverage | false | true, false | Enable coverage tracking | +| b_lundef | true | true, false | Don't allow undefined symbols when linking | +| b_lto | false | true, false | Use link time optimization | +| b_ndebug | false | true, false, if-release | Disable asserts | +| b_pch | true | true, false | Use precompiled headers | +| b_pgo | off | off, generate, use | Use profile guided optimization | +| b_sanitize | none | see below | Code sanitizer to use | +| b_staticpic | true | true, false | Build static libraries as position independent | The value of `b_sanitize` can be one of: `none`, `address`, `thread`, `undefined`, `memory`, `address,undefined`. @@ -97,18 +103,18 @@ The following options are available. Note that both the options themselves and the possible values they can take will depend on the target platform or compiler being used: -| Option | Default value | Possible values | Description -| ------ | ------------- | --------------- | ----------- -| c_args | | free-form comma-separated list | C compile arguments to use -| c_link_args | | free-form comma-separated list | C link arguments to use -| c_std | none | none, c89, c99, c11, gnu89, gnu99, gnu11 | C language standard to use -| c_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against -| cpp_args | | free-form comma-separated list | C++ compile arguments to use -| cpp_link_args| | free-form comma-separated list | C++ link arguments to use -| cpp_std | none | none, c++98, c++03, c++11, c++14, c++17, <br/>c++1z, gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z | C++ language standard to use -| cpp_debugstl | false | true, false | C++ STL debug mode -| cpp_eh | sc | none, a, s, sc | C++ exception handling type -| cpp_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against +| Option | Default value | Possible values | Description | +| ------ | ------------- | --------------- | ----------- | +| c_args | | free-form comma-separated list | C compile arguments to use | +| c_link_args | | free-form comma-separated list | C link arguments to use | +| c_std | none | none, c89, c99, c11, gnu89, gnu99, gnu11 | C language standard to use | +| c_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against | +| cpp_args | | free-form comma-separated list | C++ compile arguments to use | +| cpp_link_args| | free-form comma-separated list | C++ link arguments to use | +| cpp_std | none | none, c++98, c++03, c++11, c++14, c++17, <br/>c++1z, gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z | C++ language standard to use | +| cpp_debugstl | false | true, false | C++ STL debug mode | +| cpp_eh | sc | none, a, s, sc | C++ exception handling type | +| cpp_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against | The default values of `c_winlibs` and `cpp_winlibs` are in compiler-specific argument forms, but the libraries are: kernel32, user32, gdi32, winspool, diff --git a/docs/markdown/Continuous-Integration.md b/docs/markdown/Continuous-Integration.md index 60e76d1..9ec46b2 100644 --- a/docs/markdown/Continuous-Integration.md +++ b/docs/markdown/Continuous-Integration.md @@ -85,7 +85,37 @@ test_script: ## Travis without Docker -This setup is not recommended but included here for completeness +You can cheat your way around docker by using **python** as language and setting your compiler in the build **matrix**. This example just uses **linux** and **c** but can be easily adapted to **c++** and **osx**. + +```yaml +sudo: false + +os: linux +dist: trusty + +language: python + +python: 3.6 + +matrix: + include: + - env: CC=gcc + - env: CC=clang + +install: + - export NINJA_LATEST=$(curl -s https://api.github.com/repos/ninja-build/ninja/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep ninja-linux.zip) + - wget "$NINJA_LATEST" + - unzip -q ninja-linux.zip -d build + - export PATH="$PWD/build:$PATH" + - pip install meson + +script: + - meson builddir + - ninja -C builddir + - ninja -C builddir test +``` + +This setup uses the **beta** group. It is not recommended but included here for completeness: ```yaml sudo: false diff --git a/docs/markdown/Contributing.md b/docs/markdown/Contributing.md index 7b5fe73..c0eea29 100644 --- a/docs/markdown/Contributing.md +++ b/docs/markdown/Contributing.md @@ -18,6 +18,31 @@ Github](https://github.com/mesonbuild/meson/pulls). This causes them to be run through the CI system. All submissions must pass a full CI test run before they are even considered for submission. +## Keeping pull requests up to date + +It is possible that while your pull request is being reviewed, other +changes are committed to master that cause merge conflicts that must +be resolved. The basic rule for this is very simple: keep your pull +request up to date using rebase _only_. + +Do not merge head back to your branch. Any merge commits in your pull +request make it not acceptable for merging into master and you must +remove them. + +## Special procedure for new features + +Every new feature requires some extra steps, namely: + + - Must include a project test under `test cases/`, or if that's not + possible or if the test requires a special environment, it must go + into `run_unittests.py`. + - Must be registered with the [FeatureChecks framework](Release-notes-for-0.47.0.md#Feature_detection_based_on_meson_version_in_project) + that will warn the user if they try to use a new feature while + targetting an older meson version. + - Needs a release note snippet inside `docs/markdown/snippets/` with + a heading and a brief paragraph explaining what the feature does + with an example. + ## Acceptance and merging The kind of review and acceptance any merge proposal gets depends on @@ -57,6 +82,32 @@ In a simplified list form the split would look like the following: - changes breaking backwards compatibility - support for new languages +## Strategy for merging pull requests to trunk + +Meson's merge strategy should fullfill the following guidelines: + +- preserve as much history as possible + +- have as little junk in the repo as possible + +- everything in the "master lineage" should always pass all tests + +These goals are slightly contradictory so the correct thing to do +often requires some judgement on part of the person doing the +merge. Github provides three different merge options, The rules of +thumb for choosing between them goes like this: + + - single commit pull requests should always be rebased + + - a pull request with one commit and one "fixup" commit (such as + testing something to see if it passes CI) should be squashed + + - large branches with many commits should be merged with a merge + commit, especially if one of the commits does not pass all tests + (which happens in e.g. large and difficult refactorings) + +If in doubt, ask for guidance on IRC. + ## Tests All new features must come with automatic tests that thoroughly prove @@ -116,6 +167,8 @@ Continuous integration systems currently used: allows `[skip ci]` anywhere in the commit messages. - [AppVeyor](https://www.appveyor.com/docs/how-to/filtering-commits/#skip-directive-in-commit-message) requires `[skip ci]` or `[skip appveyor]` in the commit title. +- [Sider](https://sider.review) + runs Flake8 (see below) ## Documentation @@ -157,6 +210,13 @@ $ cd meson $ flake8 ``` +To run it automatically before committing: + +```console +$ flake8 --install-hook=git +$ git config --bool flake8.strict true +``` + ## C/C++ coding style Meson has a bunch of test code in several languages. The rules for diff --git a/docs/markdown/Design-rationale.md b/docs/markdown/Design-rationale.md index 7cf67a4..1c65fa8 100644 --- a/docs/markdown/Design-rationale.md +++ b/docs/markdown/Design-rationale.md @@ -193,7 +193,7 @@ keyword arguments. They look like this. ```meson project('compile several', 'c') -sources = ['main.c', 'file1.c', 'file2.c', 'file3.c'] +sourcelist = ['main.c', 'file1.c', 'file2.c', 'file3.c'] executable('program', sources : sourcelist) ``` @@ -202,7 +202,7 @@ External dependencies are simple to use. ```meson project('external lib', 'c') libdep = find_dep('extlibrary', required : true) -sources = ['main.c', 'file1.c', 'file2.c', 'file3.c'] +sourcelist = ['main.c', 'file1.c', 'file2.c', 'file3.c'] executable('program', sources : sourcelist, dep : libdep) ``` diff --git a/docs/markdown/Getting-meson.md b/docs/markdown/Getting-meson.md index 29f2424..4f45ef7 100644 --- a/docs/markdown/Getting-meson.md +++ b/docs/markdown/Getting-meson.md @@ -63,7 +63,7 @@ select the installer options as follows:   - + With this, you will have `python` and `pip` in `PATH`, and you can install Meson with pip. You will also be able to directly run `meson` in any shell on diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md index 634fe79..6b63f8a 100644 --- a/docs/markdown/Gnome-module.md +++ b/docs/markdown/Gnome-module.md @@ -40,8 +40,8 @@ file called `foobar.h`, which you can then include in your sources. * `install_dir`: (*Added 0.37.0*) location to install the header or bundle depending on previous options * `install_header`: (*Added 0.37.0*) if true, install the header file -* `source_dir`: a list of subdirectories where the resource compiler - should look up the files, relative to the location of the XML file +* `source_dir`: a list of directories where the resource compiler + should look up the files Returns an array containing: `[c_source, header_file]` or `[gresource_bundle]` diff --git a/docs/markdown/Installing.md b/docs/markdown/Installing.md index b8e6a81..8348d4a 100644 --- a/docs/markdown/Installing.md +++ b/docs/markdown/Installing.md @@ -4,7 +4,8 @@ short-description: Installing targets # Installing -By default Meson will not install anything. Build targets can be installed by tagging them as installable in the definition. +By default Meson will not install anything. Build targets can be +installed by tagging them as installable in the definition. ```meson project('install', 'c') @@ -14,8 +15,8 @@ shared_library('mylib', 'libfile.c', install : true) There is usually no need to specify install paths or the like. Meson will automatically install it to the standards-conforming location. In this particular case the executable is installed to the `bin` -subdirectory of the install prefix. However if you wish to override the -install dir, you can do that with the `install_dir` argument. +subdirectory of the install prefix. However if you wish to override +the install dir, you can do that with the `install_dir` argument. ```meson executable('prog', 'prog.c', install : true, install_dir : 'my/special/dir') @@ -42,7 +43,9 @@ install_data(['file1.txt', 'file2.txt'], install_dir : 'share/myapp') ``` -Sometimes you want to copy an entire subtree directly. For this use case there is the `install_subdir` command, which can be used like this. +Sometimes you want to copy an entire subtree directly. For this use +case there is the `install_subdir` command, which can be used like +this. ```meson install_subdir('mydir', install_dir : 'include') # mydir subtree -> include/mydir @@ -59,7 +62,10 @@ install_data(sources : 'foo.dat', install_dir : '/etc') # -> /etc/foo.dat ## Custom install behavior -Sometimes you need to do more than just install basic targets. Meson makes this easy by allowing you to specify a custom script to execute at install time. As an example, here is a script that generates an empty file in a custom directory. +Sometimes you need to do more than just install basic targets. Meson +makes this easy by allowing you to specify a custom script to execute +at install time. As an example, here is a script that generates an +empty file in a custom directory. ```bash #!/bin/sh @@ -68,7 +74,10 @@ mkdir "${DESTDIR}/${MESON_INSTALL_PREFIX}/mydir" touch "${DESTDIR}/${MESON_INSTALL_PREFIX}/mydir/file.dat" ``` -As you can see, Meson sets up some environment variables to help you write your script (`DESTDIR` is not set by Meson, it is inherited from the outside environment). In addition to the install prefix, Meson also sets the variables `MESON_SOURCE_ROOT` and `MESON_BUILD_ROOT`. +As you can see, Meson sets up some environment variables to help you +write your script (`DESTDIR` is not set by Meson, it is inherited from +the outside environment). In addition to the install prefix, Meson +also sets the variables `MESON_SOURCE_ROOT` and `MESON_BUILD_ROOT`. Telling Meson to run this script at install time is a one-liner. @@ -76,12 +85,32 @@ Telling Meson to run this script at install time is a one-liner. meson.add_install_script('myscript.sh') ``` -The argument is the name of the script file relative to the current subdirectory. +The argument is the name of the script file relative to the current +subdirectory. ## DESTDIR support -Sometimes you need to install to a different directory than the install prefix. This is most common when building rpm or deb packages. This is done with the `DESTDIR` environment variable and it is used just like with other build systems: +Sometimes you need to install to a different directory than the +install prefix. This is most common when building rpm or deb +packages. This is done with the `DESTDIR` environment variable and it +is used just like with other build systems: ```console $ DESTDIR=/path/to/staging/area ninja install ``` + +## Custom install behaviour + +The default install target (executed via, e.g., `ninja install`) does +installing with reasonable default options. More control over the +install behaviour can be achieved with the `meson install` command, +that has been available since 0.47.0. + +For example, if you wish to install the current setup without +rebuilding the code (which the default install target always does) and +only installing those files that have changed, you would run this +command in the build tree: + +```console +$ meson install --no-rebuild --only-changed +``` diff --git a/docs/markdown/Module-reference.md b/docs/markdown/Module-reference.md deleted file mode 100644 index 60be7bd..0000000 --- a/docs/markdown/Module-reference.md +++ /dev/null @@ -1,20 +0,0 @@ -Meson has a selection of modules to make common requirements easy to use. -Modules can be thought of like the standard library of a programming language. -Currently Meson provides the following modules. - -* [Gnome](Gnome-module.md) -* [i18n](i18n-module.md) -* [Qt4](Qt4-module.md) -* [Qt5](Qt5-module.md) -* [Pkgconfig](Pkgconfig-module.md) -* [Python3](Python-3-module.md) -* [RPM](RPM-module.md) -* [Windows](Windows-module.md) - -In addition there are unstable modules. These are meant for testing new -functionality but note that they do *not* provide a stable API. It can -change in arbitrary ways between releases. The modules might also be removed -without warning in future releases. - - * [SIMD](Simd-module.md) - diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 9829781..db8eed1 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -60,7 +60,8 @@ endif Takes one keyword argument, `required`. It defaults to `true`, which means that if any of the languages specified is not found, Meson will halt. Returns true if all languages specified were found and false -otherwise. +otherwise. Since *0.47.0* the value of a [`feature`](Build-options.md#features) +option can also be passed to the `required` keyword argument. ### add_project_arguments() @@ -118,11 +119,12 @@ are never run in parallel. buildtarget both_libraries(library_name, list_of_sources, ...) ``` -Builds both a static and shared library with the given sources. Positional and -keyword arguments are otherwise the same as for [`library`](#library). Source -files will be compiled only once and object files will be reused to build both -shared and static libraries, unless `b_staticpic` user option or `pic` argument -are set to false in which case sources will be compiled twice. +Builds both a static and shared library with the given +sources. Positional and keyword arguments are otherwise the same as +for [`library`](#library). Source files will be compiled only once and +object files will be reused to build both shared and static libraries, +unless `b_staticpic` user option or `pic` argument are set to false in +which case sources will be compiled twice. The returned [buildtarget](#build-target-object) always represents the shared library. In addition it supports the following extra methods: @@ -231,9 +233,12 @@ following. - `build_by_default` *(added 0.38.0)* causes, when set to true, to have this target be built by default, that is, when invoking plain `ninja`; the default value is false -- `build_always` if `true` this target is always considered out of - date and is rebuilt every time, useful for things such as build - timestamps or revision control tags +- `build_always` (deprecated) if `true` this target is always considered out of + date and is rebuilt every time. Equivalent to setting both + `build_always_stale` and `build_by_default` to true. +- `build_always_stale` if `true` the target is always considered out of date. + Useful for things such as build timestamps or revision control tags. + The associated command is run even if the outputs are up to date. - `capture`, there are some compilers that can't be told to write their output to a file but instead write it to standard output. When this argument is set to true, Meson captures `stdout` and writes it @@ -354,7 +359,8 @@ otherwise. This function supports the following keyword arguments: cross compiled binary will run on), usually only needed if you build a tool to be used during compilation. - `required`, when set to false, Meson will proceed with the build - even if the dependency is not found + even if the dependency is not found. Since *0.47.0* the value of a + [`feature`](Build-options.md#features) option can also be passed. - `static` tells the dependency provider to try to get static libraries instead of dynamic ones (note that this is not supported by all dependency backends) @@ -540,7 +546,9 @@ Keyword arguments are the following: abort if no program can be found. If `required` is set to `false`, Meson continue even if none of the programs can be found. You can then use the `.found()` method on the returned object to check - whether it was found or not. + whether it was found or not. Since *0.47.0* the value of a + [`feature`](Build-options.md#features) option can also be passed to the + `required` keyword argument. - `native` *(since 0.43)* defines how this executable should be searched. By default it is set to `false`, which causes Meson to first look for the @@ -663,17 +671,24 @@ installed, and so on, use a [`custom_target`](#custom_target) instead. value get_option(option_name) ``` -Obtains the value of the [project build option](Build-options.md) specified in the positional argument. +Obtains the value of the [project build option](Build-options.md) +specified in the positional argument. -Note that the value returned for built-in options that end in `dir` such as -`bindir` and `libdir` is always a path relative to (and inside) the `prefix`. +Note that the value returned for built-in options that end in `dir` +such as `bindir` and `libdir` is always a path relative to (and +inside) the `prefix`. -The only exceptions are: `sysconfdir`, `localstatedir`, and `sharedstatedir` -which will return the value passed during configuration as-is, which may be -absolute, or relative to `prefix`. [`install_dir` arguments](Installing.md) -handles that as expected, but if you need the absolute path to one of these -e.g. to use in a define etc., you should use `join_paths(get_option('prefix'), -get_option('localstatedir')))` +The only exceptions are: `sysconfdir`, `localstatedir`, and +`sharedstatedir` which will return the value passed during +configuration as-is, which may be absolute, or relative to `prefix`. +[`install_dir` arguments](Installing.md) handles that as expected, but +if you need the absolute path to one of these e.g. to use in a define +etc., you should use `join_paths(get_option('prefix'), +get_option('localstatedir'))` + +For options of type `feature` a special object is returned instead of +a string. See [`feature` options](Build-options.md#features) +documentation for more details. ### get_variable() @@ -721,8 +736,8 @@ the search path, since there is no global search path. For something like that, see [`add_project_arguments()`](#add_project_arguments). See also `implicit_include_directories` parameter of -[executable()](#executable), which adds current source and build directories -to include path. +[executable()](#executable), which adds current source and build +directories to include path. Each directory given is converted to two include paths: one that is relative to the source root and one relative to the build root. @@ -758,9 +773,15 @@ executable('some-tool', sources, ... ``` -If the build tree is `/tmp/build-tree`, the following include paths will be added to the `executable()` call: `-I/tmp/build-tree/include -I/home/user/project.git/include`. +If the build tree is `/tmp/build-tree`, the following include paths +will be added to the `executable()` call: `-I/tmp/build-tree/include +-I/home/user/project.git/include`. -This function has one keyword argument `is_system` which, if set, flags the specified directories as system directories. This means that they will be used with the `-isystem` compiler argument rather than `-I` on compilers that support this flag (in practice everything except Visual Studio). +This function has one keyword argument `is_system` which, if set, +flags the specified directories as system directories. This means that +they will be used with the `-isystem` compiler argument rather than +`-I` on compilers that support this flag (in practice everything +except Visual Studio). ### install_data() @@ -789,10 +810,10 @@ arguments. The following keyword arguments are supported: To leave any of these three as the default, specify `false`. -- `rename` if specified renames each source file into corresponding file - from `rename` list. Nested paths are allowed and they are joined with - `install_dir`. Length of `rename` list must be equal to the number of sources. - *(added 0.46.0)* +- `rename` if specified renames each source file into corresponding + file from `rename` list. Nested paths are allowed and they are + joined with `install_dir`. Length of `rename` list must be equal to + the number of sources. *(added 0.46.0)* See [Installing](Installing.md) for more examples. @@ -976,10 +997,11 @@ The keyword arguments for this are the same as for [`executable`](#executable) w libraries. Defaults to `dylib` for shared libraries and `rlib` for static libraries. -`static_library`, `shared_library` and `both_libraries` also accept these keyword -arguments. +`static_library`, `shared_library` and `both_libraries` also accept +these keyword arguments. -Note: You can set `name_prefix` and `name_suffix` to `[]`, or omit them for the default behaviour for each platform. +Note: You can set `name_prefix` and `name_suffix` to `[]`, or omit +them for the default behaviour for each platform. ### message() @@ -1062,14 +1084,14 @@ Project supports the following keyword arguments. runresult run_command(command, list_of_args, ...) ``` -Runs the command specified in positional arguments. -`command` can be a string, or the output of [`find_program()`](#find_program), -[`files()`](#files) or [`configure_file()`](#configure_file), or -[a compiler object](#compiler-object). +Runs the command specified in positional arguments. `command` can be +a string, or the output of [`find_program()`](#find_program), +[`files()`](#files) or [`configure_file()`](#configure_file), or [a +compiler object](#compiler-object). -Returns [an opaque object](#run-result-object) containing the result of the -invocation. The command is run from an *unspecified* directory, and -Meson will set three environment variables `MESON_SOURCE_ROOT`, +Returns [an opaque object](#run-result-object) containing the result +of the invocation. The command is run from an *unspecified* directory, +and Meson will set three environment variables `MESON_SOURCE_ROOT`, `MESON_BUILD_ROOT` and `MESON_SUBDIR` that specify the source directory, build directory and subdirectory the target was defined in, respectively. @@ -1097,7 +1119,7 @@ output as far as Meson is concerned. It is only meant for tasks such as running a code formatter or flashing an external device's firmware with a built file. -The script is run from an *unspecified* directory, and Meson will set +The command is run from an *unspecified* directory, and Meson will set three environment variables `MESON_SOURCE_ROOT`, `MESON_BUILD_ROOT` and `MESON_SUBDIR` that specify the source directory, build directory and subdirectory the target was defined in, respectively. @@ -1165,9 +1187,10 @@ variables defined in the [`executable`](#executable) it is loaded by, you will need to set the `export_dynamic` argument of the executable to `true`. -**Note:** Linking to a shared module is not supported on some platforms, notably -OSX. Consider using a [`shared_library`](#shared_library) instead, if you need -to both `dlopen()` and link with a library. +**Note:** Linking to a shared module is not supported on some +platforms, notably OSX. Consider using a +[`shared_library`](#shared_library) instead, if you need to both +`dlopen()` and link with a library. *Added 0.37.0* @@ -1272,15 +1295,16 @@ argument to [`dependency()`](#dependency). void test(name, executable, ...) ``` -Defines a test to run with the test harness. Takes two positional arguments, -the first is the name of the test and the second is the executable to run. -The executable can be an [executable build target object](#build-target-object) -returned by [`executable()`](#executable) or an -[external program object](#external-program-object) returned by -[`find_program()`](#find_program). The executable's exit code is used by the -test harness to record the outcome of the test, for example exit code zero -indicates success. For more on the Meson test harness protocol read -[Unit Tests](Unit-tests.md). +Defines a test to run with the test harness. Takes two positional +arguments, the first is the name of the test and the second is the +executable to run. The executable can be an [executable build target +object](#build-target-object) returned by +[`executable()`](#executable) or an [external program +object](#external-program-object) returned by +[`find_program()`](#find_program). The executable's exit code is used +by the test harness to record the outcome of the test, for example +exit code zero indicates success. For more on the Meson test harness +protocol read [Unit Tests](Unit-tests.md). Keyword arguments are the following: @@ -1374,6 +1398,28 @@ the following methods. `MESON_INSTALL_DESTDIR_PREFIX`, and `MESONINTROSPECT` set. All additional arguments are passed as parameters. + Meson uses the `DESTDIR` environment variable as set by the + inherited environment to determine the (temporary) installation + location for files. Your install script must be aware of this while + manipulating and installing files. The correct way to handle this is + with the `MESON_INSTALL_DESTDIR_PREFIX` variable which is always set + and contains `DESTDIR` (if set) and `prefix` joined together. This + is useful because both are usually absolute paths and there are + platform-specific edge-cases in joining two absolute paths. + + In case it is needed, `MESON_INSTALL_PREFIX` is also always set and + has the value of the `prefix` option passed to Meson. + + `MESONINTROSPECT` contains the path to the introspect command that + corresponds to the `meson` executable that was used to configure the + build. (This might be a different path then the first executable + found in `PATH`.) It can be used to query build configuration. Note + that the value will contain many parts, f.ex., it may be `python3 + /path/to/meson.py introspect`. The user is responsible for splitting + the string to an array if needed by splitting lexically like a UNIX + shell would. If your script uses Python, `shlex.split()` is the + easiest correct way to do this. + - `add_postconf_script(script_name, arg1, arg2, ...)` will run the executable given as an argument after all project files have been generated. This script will have the environment variables @@ -1437,26 +1483,6 @@ the following methods. build](Unity-builds.md) (multiple sources are combined before compilation to reduce build time) and `false` otherwise. - To determine the installation location, the script should use the - `DESTDIR`, `MESON_INSTALL_PREFIX`, `MESON_INSTALL_DESTDIR_PREFIX` - variables. `DESTDIR` will be set only if it is inherited from the - outside environment. `MESON_INSTALL_PREFIX` is always set and has - the value of the `prefix` option passed to - Meson. `MESON_INSTALL_DESTDIR_PREFIX` is always set and contains - `DESTDIR` and `prefix` joined together. This is useful because both - are absolute paths, and many path-joining functions such as - [`os.path.join` in - Python](https://docs.python.org/3/library/os.path.html#os.path.join) - special-case absolute paths. - - `MESONINTROSPECT` contains the path to the introspect command that - corresponds to the `meson` executable that was used to configure the - build. (This might be a different path then the first executable - found in `PATH`.) It can be used to query build configuration. Note - that the value may contain many parts, i.e. it may be `python3 - /path/to/meson.py introspect`. The user is responsible for splitting - the string to an array if needed. - - `override_find_program(progname, program)` [*(Added 0.46.0)*](Release-notes-for-0-46-0.html#can-override-find_program) specifies that whenever `find_program` is used to find a program @@ -1464,11 +1490,14 @@ the following methods. instead return `program`, which may either be the result of `find_program` or `configure_file`. -- `project_version()` returns the version string specified in `project` function call. +- `project_version()` returns the version string specified in + `project` function call. -- `project_license()` returns the array of licenses specified in `project` function call. +- `project_license()` returns the array of licenses specified in + `project` function call. -- `project_name()` returns the project name specified in the `project` function call. +- `project_name()` returns the project name specified in the `project` + function call. - `version()` return a string with the version of Meson. @@ -1479,15 +1508,17 @@ doing the actual compilation. See [Cross-compilation](Cross-compilation.md). It has the following methods: -- `cpu_family()` returns the CPU family name. [This table](Reference-tables.md#cpu-families) - contains all known CPU families. These are guaranteed to continue working. +- `cpu_family()` returns the CPU family name. [This + table](Reference-tables.md#cpu-families) contains all known CPU + families. These are guaranteed to continue working. - `cpu()` returns a more specific CPU name, such as `i686`, `amd64`, etc. -- `system()` returns the operating system name. - [This table](Reference-tables.html#operating-system-names) Lists all of the - currently known Operating System names, these are guaranteed to continue working. +- `system()` returns the operating system name. [This + table](Reference-tables.html#operating-system-names) Lists all of + the currently known Operating System names, these are guaranteed to + continue working. - `endian()` returns `big` on big-endian systems and `little` on little-endian systems. @@ -1497,8 +1528,8 @@ Currently, these values are populated using and [`platform.machine()`](https://docs.python.org/3.4/library/platform.html#platform.machine). If you think the returned values for any of these are incorrect for your -system or CPU, or if your OS is not in the linked table, please file [a -bug report](https://github.com/mesonbuild/meson/issues/new) with +system or CPU, or if your OS is not in the linked table, please file +[a bug report](https://github.com/mesonbuild/meson/issues/new) with details and we'll look into it. ### `host_machine` object @@ -1563,14 +1594,16 @@ the following methods: Meson will proceed even if the library is not found. By default the library is searched for in the system library directory (e.g. /usr/lib). This can be overridden with the `dirs` keyword - argument, which can be either a string or a list of strings. + argument, which can be either a string or a list of strings. Since + *0.47.0* the value of a [`feature`](Build-options.md#features) + option can also be passed to the `required` keyword argument. - `first_supported_argument(list_of_strings)`, given a list of strings, returns the first argument that passes the `has_argument` test or an empty array if none pass. -- `first_supported_link_argument(list_of_strings)` *(added 0.46.0)*, given a - list of strings, returns the first argument that passes the +- `first_supported_link_argument(list_of_strings)` *(added 0.46.0)*, + given a list of strings, returns the first argument that passes the `has_link_argument` test or an empty array if none pass. - `get_define(definename)` returns the given preprocessor symbol's @@ -1593,11 +1626,12 @@ the following methods: the specified command line argument, that is, can compile code without erroring out or printing a warning about an unknown flag. -- `has_link_argument(argument_name)` *(added 0.46.0)* returns true if the linker - accepts the specified command line argument, that is, can compile and link - code without erroring out or printing a warning about an unknown flag. Link - arguments will be passed to the compiler, so should usually have the `-Wl,` - prefix. On VisualStudio a `/link` argument will be prepended. +- `has_link_argument(argument_name)` *(added 0.46.0)* returns true if + the linker accepts the specified command line argument, that is, can + compile and link code without erroring out or printing a warning + about an unknown flag. Link arguments will be passed to the + compiler, so should usually have the `-Wl,` prefix. On VisualStudio + a `/link` argument will be prepended. - `has_function(funcname)` returns true if the given function is provided by the standard library or a library passed in with the @@ -1642,9 +1676,9 @@ the following methods: `has_argument` but takes multiple arguments and uses them all in a single compiler invocation, available since 0.37.0. -- `has_multi_link_arguments(arg1, arg2, arg3, ...)` *(added 0.46.0)* is the same - as `has_link_argument` but takes multiple arguments and uses them all in a - single compiler invocation. +- `has_multi_link_arguments(arg1, arg2, arg3, ...)` *(added 0.46.0)* + is the same as `has_link_argument` but takes multiple arguments and + uses them all in a single compiler invocation. - `has_type(typename)` returns true if the specified token is a type, you can specify external dependencies to use with `dependencies` @@ -1801,10 +1835,10 @@ The following methods are defined for all [dictionaries](Syntax.md#dictionaries) - `has_key(key)` returns `true` if the dictionary contains the key given as argument, `false` otherwise -- `get(key, fallback)`, returns the value for the key given as first argument - if it is present in the dictionary, or the optional fallback value given - as the second argument. If a single argument was given and the key was not - found, causes a fatal error +- `get(key, fallback)`, returns the value for the key given as first + argument if it is present in the dictionary, or the optional + fallback value given as the second argument. If a single argument + was given and the key was not found, causes a fatal error You can also iterate over dictionaries with the [`foreach` statement](Syntax.md#foreach-statements). @@ -1824,10 +1858,11 @@ A build target is either an [executable](#executable), - `extract_all_objects()` is same as `extract_objects` but returns all object files generated by this target. Since 0.46.0 keyword argument - `recursive` must be set to `true` to also return objects passed to the - `object` argument of this target. By default only objects built for this - target are returned to maintain backward compatibility with previous versions. - The default will eventually be changed to `true` in a future version. + `recursive` must be set to `true` to also return objects passed to + the `object` argument of this target. By default only objects built + for this target are returned to maintain backward compatibility with + previous versions. The default will eventually be changed to `true` + in a future version. - `extract_objects()` returns an opaque value representing the generated object files of arguments, usually used to take single @@ -1894,10 +1929,11 @@ contains a target with the following methods: this and will also allow Meson to setup inter-target dependencies correctly. Please file a bug if that doesn't work for you. -- `[index]` returns an opaque object that references this target, and can be - used as a source in other targets. When it is used as such it will make that - target depend on this custom target, but the only source added will be the - one that corresponds to the index of the custom target's output argument. +- `[index]` returns an opaque object that references this target, and + can be used as a source in other targets. When it is used as such it + will make that target depend on this custom target, but the only + source added will be the one that corresponds to the index of the + custom target's output argument. ### `dependency` object @@ -1914,22 +1950,23 @@ an external dependency with the following methods: (*Added 0.45.0*) A warning is issued if the variable is not defined, unless a `default` parameter is specified. - - `get_configtool_variable(varname)` (*Added 0.44.0*) will get the + - `get_configtool_variable(varname)` (*Added 0.44.0*) will get the command line argument from the config tool (with `--` prepended), or, if invoked on a non config-tool dependency, error out. - `type_name()` which returns a string describing the type of the dependency, the most common values are `internal` for deps created - with `declare_dependencies` and `pkgconfig` for system dependencies + with `declare_dependency()` and `pkgconfig` for system dependencies obtained with Pkg-config. - `version()` is the version number as a string, for example `1.2.8` - - `partial_dependency(compile_args : false, link_args : false, links : false, - includes : false, source : false)` (*added 0.46.0) returns a new dependency - object with the same name, version, found status, type name, and methods as - the object that called it. This new object will only inherit other - attributes from its parent as controlled by keyword arguments. + - `partial_dependency(compile_args : false, link_args : false, links + : false, includes : false, source : false)` (*added 0.46.0*) returns + a new dependency object with the same name, version, found status, + type name, and methods as the object that called it. This new + object will only inherit other attributes from its parent as + controlled by keyword arguments. If the parent has any dependencies, those will be applied to the new partial dependency with the same rules. So , given: @@ -1940,8 +1977,9 @@ an external dependency with the following methods: dep3 = dep2.partial_dependency(compile_args : true) ``` - dep3 will add `['-Werror=foo', '-Werror=bar']` to the compiler args of - any target it is added to, but libfoo will not be added to the link_args. + dep3 will add `['-Werror=foo', '-Werror=bar']` to the compiler args + of any target it is added to, but libfoo will not be added to the + link_args. The following arguments will add the following attributes: @@ -1969,7 +2007,7 @@ and has the following methods: - `found()` which returns whether the executable was found -- `path()` which returns a string pointing to the script or executable +- `path()` which returns a string pointing to the script or executable **NOTE:** You should not need to use this method. Passing the object itself should work in all cases. F.ex.: `run_command(obj, arg1, arg2)` @@ -1980,27 +2018,42 @@ detailed information about how environment variables should be set during tests. It should be passed as the `env` keyword argument to tests. It has the following methods. -- `append(varname, value)` appends the given value to the old value of - the environment variable, e.g. `env.append('FOO', 'BAR', separator - : ';')` produces `BOB;BAR` if `FOO` had the value `BOB` and plain - `BAR` if the value was not defined. If the separator is not - specified explicitly, the default path separator for the host - operating system will be used, i.e. ';' for Windows and ':' for - UNIX/POSIX systems. +- `append(varname, value1, value2, ...)` appends the given values to + the old value of the environment variable, e.g. `env.append('FOO', + 'BAR', 'BAZ', separator : ';')` produces `BOB;BAR;BAZ` if `FOO` had + the value `BOB` and plain `BAR;BAZ` if the value was not defined. If + the separator is not specified explicitly, the default path + separator for the host operating system will be used, i.e. ';' for + Windows and ':' for UNIX/POSIX systems. -- `prepend(varname, value)` is the same as `append` except that it +- `prepend(varname, value1, value2, ...)` is the same as `append` except that it writes to the beginning of the variable -- `set(varname, value)` sets environment variable in the first - argument to the value in the second argument, e.g. - `env.set('FOO', 'BAR')` sets envvar `FOO` to value `BAR` +- `set(varname, value1, value2)` sets the environment variable + specified in the first argument to the values in the second argument + joined by the separator, e.g. `env.set('FOO', 'BAR'),` sets envvar + `FOO` to value `BAR`. See `append()` above for how separators work. + +**Note:** All these methods overwrite the previously-defined value(s) +if called twice with the same `varname`. ### `external library` object This object is returned by [`find_library()`](#find_library) and contains an external (i.e. not built as part of this project) -library. This object has only one method, `found`, which returns -whether the library was found. +library. This object has the following methods: + + - `found` which returns whether the library was found. + + - `type_name()` (*added 0.48.0*) which returns a string describing + the type of the dependency, which will be `library` in this case. + + - `partial_dependency(compile_args : false, link_args : false, links + : false, includes : false, source : false)` (*added 0.46.0*) returns + a new dependency object with the same name, version, found status, + type name, and methods as the object that called it. This new + object will only inherit other attributes from its parent as + controlled by keyword arguments. ### `generator` object diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md index d0a2c83..6486aa2 100644 --- a/docs/markdown/Reference-tables.md +++ b/docs/markdown/Reference-tables.md @@ -23,6 +23,7 @@ These are return values of the `get_id` method in a compiler object. | nagfor | The NAG Fortran compiler | | lcc | Elbrus C/C++/Fortran Compiler | | arm | ARM compiler | +| armclang | ARMCLANG compiler | ## Script environment variables @@ -46,8 +47,10 @@ set in the cross file. | ia64 | Itanium processor | | arm | 32 bit ARM processor | | aarch64 | 64 bit ARM processor | -| ppc64 | 64 bit PPC processors (Big Endian) | -| ppc64le | 64 bit PPC processors (Little Endian) | +| mips | 32 bit MIPS processor | +| mips64 | 64 bit MIPS processor | +| ppc | 32 bit PPC processors | +| ppc64 | 64 bit PPC processors | | e2k | MCST Elbrus processor | | parisc | HP PA-RISC processor | | sparc64 | SPARC v9 processor | diff --git a/docs/markdown/Release-notes-for-0.47.0.md b/docs/markdown/Release-notes-for-0.47.0.md index fa4a34c..9736256 100644 --- a/docs/markdown/Release-notes-for-0.47.0.md +++ b/docs/markdown/Release-notes-for-0.47.0.md @@ -1,20 +1,10 @@ --- title: Release 0.47 -short-description: Release notes for 0.46 (preliminary) +short-description: Release notes for 0.47 ... # New features -This page is a placeholder for the eventual release notes. - -Notable new features should come with release note updates. This is -done by creating a file snippet called `snippets/featurename.md` and -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 @@ -22,8 +12,291 @@ 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. -## Concatenate string literals returned from get_define +## Concatenate string literals returned from `get_define()` After obtaining the value of a preprocessor symbol consecutive string literals are merged into a single string literal. For example a preprocessor symbol's value `"ab" "cd"` is returned as `"abcd"`. + +## ARM compiler(version 6) for C and CPP + +Cross-compilation is now supported for ARM targets using ARM compiler +version 6 - ARMCLANG. The required ARMCLANG compiler options for +building a shareable library are not included in the current Meson +implementation for ARMCLANG support, so it can not build shareable +libraries. This current Meson implementation for ARMCLANG support can +not build assembly files with arm syntax (we need to use armasm instead +of ARMCLANG for the `.s` files with this syntax) and only supports GNU +syntax. + +The default extension of the executable output is `.axf`. +The environment path should be set properly for the ARM compiler executables. +The `--target`, `-mcpu` options with the appropriate values should be mentioned +in the cross file as shown in the snippet below. + +``` +[properties] +c_args = ['--target=arm-arm-none-eabi', '-mcpu=cortex-m0plus'] +cpp_args = ['--target=arm-arm-none-eabi', '-mcpu=cortex-m0plus'] + +``` + +Note: +- The current changes are tested on Windows only. +- PIC support is not enabled by default for ARM, + if users want to use it, they need to add the required arguments + explicitly from cross-file(`c_args`/`cpp_args`) or some other way. + +## New base build option for LLVM (Apple) bitcode support + +When building with clang on macOS, you can now build your static and shared +binaries with embedded bitcode by enabling the `b_bitcode` [base +option](Builtin-options.md#Base_options) by passing `-Db_bitcode=true` to +Meson. + +This is better than passing the options manually in the environment since Meson +will automatically disable conflicting options such as `b_asneeded`, and will +disable bitcode support on targets that don't support it such as +`shared_module()`. + +Since this requires support in the linker, it is currently only enabled when +using Apple ld. In the future it can be extended to clang on other platforms +too. + +## New compiler check: `check_header()` + +The existing compiler check `has_header()` only checks if the header exists, +either with the `__has_include` C++11 builtin, or by running the pre-processor. + +However, sometimes the header you are looking for is unusable on some platforms +or with some compilers in a way that is only detectable at compile-time. For +such cases, you should use `check_header()` which will include the header and +run a full compile. + +Note that `has_header()` is much faster than `check_header()`, so it should be +used whenever possible. + +## New action `copy:` for `configure_file()` + +In addition to the existing actions `configuration:` and `command:`, +[`configure_file()`](#Reference-manual.md#configure_file) now accepts a keyword +argument `copy:` which specifies a new action to copy the file specified with +the `input:` keyword argument to a file in the build directory with the name +specified with the `output:` keyword argument. + +These three keyword arguments are, as before, mutually exclusive. You can only +do one action at a time. + +## New keyword argument `encoding:` for `configure_file()` + +Add a new keyword to [`configure_file()`](#Reference-manual.md#configure_file) +that allows the developer to specify the input and output file encoding. The +default value is the same as before: UTF-8. + +In the past, Meson would not handle non-UTF-8/ASCII files correctly, and in the +worst case would try to coerce it to UTF-8 and mangle the data. UTF-8 is the +standard encoding now, but sometimes it is necessary to process files that use +a different encoding. + +For additional details see [#3135](https://github.com/mesonbuild/meson/pull/3135). + +## New keyword argument `output_format:` for `configure_file()` + +When called without an input file, `configure_file` generates a +C header file by default. A keyword argument was added to allow +specifying the output format, for example for use with nasm or yasm: + +``` +conf = configuration_data() +conf.set('FOO', 1) + +configure_file('config.asm', + configuration: conf, + output_format: 'nasm') +``` + +## Substitutions in `custom_target(depfile:)` + +The `depfile` keyword argument to `custom_target` now accepts the `@BASENAME@` +and `@PLAINNAME@` substitutions. + +## Deprecated `build_always:` for custom targets + +Setting `build_always` to `true` for a custom target not only marks the target +to be always considered out of date, but also adds it to the set of default +targets. This option is therefore deprecated and the new option +`build_always_stale` is introduced. + +`build_always_stale` *only* marks the target to be always considered out of +date, but does not add it to the set of default targets. The old behaviour can +be achieved by combining `build_always_stale` with `build_by_default`. + +The documentation has been updated accordingly. + +## New built-in object type: dictionary + +Meson dictionaries use a syntax similar to python's dictionaries, +but have a narrower scope: they are immutable, keys can only +be string literals, and initializing a dictionary with duplicate +keys causes a fatal error. + +Example usage: + +```meson +d = {'foo': 42, 'bar': 'baz'} + +foo = d.get('foo') +foobar = d.get('foobar', 'fallback-value') + +foreach key, value : d + Do something with key and value +endforeach +``` + +## Array options treat `-Dopt=` and `-Dopt=[]` as equivalent + +Prior to this change passing -Dopt= to an array opt would be interpreted as +`['']` (an array with an empty string), now `-Dopt=` is the same as `-Dopt=[]`, an +empty list. + +## Feature detection based on `meson_version:` in `project()` + +Meson will now print a `WARNING:` message during configuration if you use +a function or a keyword argument that was added in a meson version that's newer +than the version specified inside `project()`. For example: + +```meson +project('featurenew', meson_version: '>=0.43') + +cdata = configuration_data() +cdata.set('FOO', 'bar') +message(cdata.get_unquoted('FOO')) +``` + +This will output: + +``` +The Meson build system +Version: 0.47.0.dev1 +Source dir: C:\path\to\srctree +Build dir: C:\path\to\buildtree +Build type: native build +Project name: featurenew +Project version: undefined +Build machine cpu family: x86_64 +Build machine cpu: x86_64 +WARNING: Project targetting '>=0.43' but tried to use feature introduced in '0.44.0': configuration_data.get_unquoted() +Message: bar +Build targets in project: 0 +WARNING: Project specifies a minimum meson_version '>=0.43' which conflicts with: + * 0.44.0: {'configuration_data.get_unquoted()'} +``` + +## New type of build option for features + +A new type of [option called `feature`](Build-options.md#features) can be +defined in `meson_options.txt` for the traditional `enabled / disabled / auto` +tristate. The value of this option can be passed to the `required` keyword +argument of functions `dependency()`, `find_library()`, `find_program()` and +`add_languages()`. + +A new global option `auto_features` has been added to override the value of all +`auto` features. It is intended to be used by packagers to have full control on +which feature must be enabled or disabled. + +## New options to `gnome.gdbus_codegen()` + +You can now pass additional arguments to gdbus-codegen using the `extra_args` +keyword. This is the same for the other gnome function calls. + +Meson now automatically adds autocleanup support to the generated code. This +can be modified by setting the autocleanup keyword. + +For example: + +```meson +sources += gnome.gdbus_codegen('com.mesonbuild.Test', + 'com.mesonbuild.Test.xml', + autocleanup : 'none', + extra_args : ['--pragma-once']) +``` + +## Made 'install' a top level Meson command + +You can now run `meson install` in your build directory and it will do +the install. It has several command line options you can toggle the +behaviour that is not in the default `ninja install` invocation. This +is similar to how `meson test` already works. + +For example, to install only the files that have changed, you can do: + +```console +$ meson install --only-changed +``` + +## `install_mode:` keyword argument extended to all installable targets + +It is now possible to pass an `install_mode` argument to all installable targets, +such as `executable()`, libraries, headers, man pages and custom/generated +targets. + +The `install_mode` argument can be used to specify the file mode in symbolic +format and optionally the owner/uid and group/gid for the installed files. + +## New built-in option `install_umask` with a default value 022 + +This umask is used to define the default permissions of files and directories +created in the install tree. Files will preserve their executable mode, but the +exact permissions will obey the `install_umask`. + +The `install_umask` can be overridden in the meson command-line: + +```console +$ meson --install-umask=027 builddir/ +``` + +A project can also override the default in the `project()` call: + +```meson +project('myproject', 'c', + default_options : ['install_umask=027']) +``` + +To disable the `install_umask`, set it to `preserve`, in which case permissions +are copied from the files in their origin. + +## Octal and binary string literals + +Octal and binary integer literals can now be used in build and option files. + +```meson +int_493 = 0o755 +int_1365 = 0b10101010101 +``` + +## New keyword arguments: 'check' and 'capture' for `run_command()` + +If `check:` is `true`, then the configuration will fail if the command returns a +non-zero exit status. The default value is `false` for compatibility reasons. + +`run_command()` used to always capture the output and stored it for use in +build files. However, sometimes the stdout is in a binary format which is meant +to be discarded. For that case, you can now set the `capture:` keyword argument +to `false`. + +## Windows resource files dependencies + +The `compile_resources()` function of the `windows` module now takes +the `depend_files:` and `depends:` keywords. + +When using binutils's `windres`, dependencies on files `#include`'d by the +preprocessor are now automatically tracked. + +## Polkit support for privileged installation + +When running `install`, if installation fails with a permission error and +`pkexec` is available, Meson will attempt to use it to spawn a permission +dialog for privileged installation and retry the installation. + +If `pkexec` is not available, the old behaviour is retained and you will need +to explicitly run the install step with `sudo`. diff --git a/docs/markdown/Release-notes-for-0.48.0.md b/docs/markdown/Release-notes-for-0.48.0.md new file mode 100644 index 0000000..cf3db4c --- /dev/null +++ b/docs/markdown/Release-notes-for-0.48.0.md @@ -0,0 +1,17 @@ +--- +title: Release 0.48 +short-description: Release notes for 0.48 (preliminary) +... + +# New features + +This page is a placeholder for the eventual release notes. + +Notable new features should come with release note updates. This is +done by creating a file snippet called `snippets/featurename.md` and +whose contents should look like this: + + ## Feature name + + A short description explaining the new feature and how it should be used. + diff --git a/docs/markdown/Running-Meson.md b/docs/markdown/Running-Meson.md index 7db22bf..00b70ed 100644 --- a/docs/markdown/Running-Meson.md +++ b/docs/markdown/Running-Meson.md @@ -10,6 +10,9 @@ directly from the source tree with the command the command is simply `meson`. In this manual we only use the latter format for simplicity. +Additionally, the invocation can pass options to meson. +The list of options is documented [here](Builtin-options.md). + At the time of writing only a command line version of Meson is available. This means that Meson must be invoked using the terminal. If you wish to use the MSVC compiler, you need to run Meson diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md index e5e4107..a8e7273 100644 --- a/docs/markdown/Unit-tests.md +++ b/docs/markdown/Unit-tests.md @@ -113,6 +113,12 @@ $ meson test --gdb --repeat=10000 testname This runs the test up to 10 000 times under GDB automatically. If the program crashes, GDB will halt and the user can debug the application. Note that testing timeouts are disabled in this case so `meson test` will not kill `gdb` while the developer is still debugging it. The downside is that if the test binary freezes, the test runner will wait forever. +```console +$ meson test --print-errorlogs +``` + +Meson will report the output produced by the failing tests along with other useful informations as the environmental variables. This is useful, for example, when you run the tests on Travis-CI, Jenkins and the like. + For further information see the command line help of Meson by running `meson test -h`. **NOTE:** If `meson test` does not work for you, you likely have a old version of Meson. In that case you should call `mesontest` instead. If `mesontest` doesn't work either you have a very old version prior to 0.37.0 and should upgrade. diff --git a/docs/markdown/Users.md b/docs/markdown/Users.md index a15e5eb..d328b97 100644 --- a/docs/markdown/Users.md +++ b/docs/markdown/Users.md @@ -17,17 +17,19 @@ listed in the [`meson` GitHub topic](https://github.com/topics/meson). - [Dpdk](http://dpdk.org/browse/dpdk), Data plane development kit, a set of libraries and drivers for fast packet processing - [DXVK](https://github.com/doitsujin/dxvk), a Vulkan-based Direct3D 11 implementation for Linux using Wine - [Emeus](https://github.com/ebassi/emeus), Constraint based layout manager for GTK+ + - [ESP8266 Arduino sample project](https://github.com/trilader/arduino-esp8266-meson) Sample project for using the ESP8266 Arduino port with Meson + - [Fractal](https://wiki.gnome.org/Apps/Fractal/), a Matrix messaging client for GNOME - [Frida](https://github.com/frida/frida-core), a dynamic binary instrumentation toolkit - [fwupd](https://github.com/hughsie/fwupd), a simple daemon to allow session software to update firmware - [Geary](https://wiki.gnome.org/Apps/Geary), an email application built around conversations, for the GNOME 3 desktop. - [GLib](https://gitlab.gnome.org/GNOME/glib), cross-platform C library used by GTK+ and GStreamer (not the default yet) - - [Gnome Boxes](https://gitlab.gnome.org/GNOME/gnome-boxes), a Gnome hypervisor - - [Gnome Builder](https://gitlab.gnome.org/GNOME/gnome-builder), an IDE for the Gnome platform - - [Gnome MPV](https://github.com/gnome-mpv/gnome-mpv), Gnome frontend to the mpv video player - - [Gnome Recipes](https://gitlab.gnome.org/GNOME/recipes), application for cooking recipes - - [Gnome Software](https://gitlab.gnome.org/GNOME/gnome-software), an app store for Gnome - - [Gnome Twitch](https://github.com/vinszent/gnome-twitch), an app for viewing Twitch streams on Gnome desktop - - [Gnome Usage](https://gitlab.gnome.org/GNOME/gnome-usage), a Gnome application for visualizing system resources + - [GNOME Boxes](https://gitlab.gnome.org/GNOME/gnome-boxes), a GNOME hypervisor + - [GNOME Builder](https://gitlab.gnome.org/GNOME/gnome-builder), an IDE for the GNOME platform + - [GNOME MPV](https://github.com/gnome-mpv/gnome-mpv), GNOME frontend to the mpv video player + - [GNOME Recipes](https://gitlab.gnome.org/GNOME/recipes), application for cooking recipes + - [GNOME Software](https://gitlab.gnome.org/GNOME/gnome-software), an app store for GNOME + - [GNOME Twitch](https://github.com/vinszent/gnome-twitch), an app for viewing Twitch streams on GNOME desktop + - [GNOME Usage](https://gitlab.gnome.org/GNOME/gnome-usage), a GNOME application for visualizing system resources - [Graphene](https://ebassi.github.io/graphene/), a thin type library for graphics - [Grilo](https://git.gnome.org/browse/grilo) and [Grilo plugins](https://git.gnome.org/browse/grilo-plugins), the Grilo multimedia framework - [GStreamer](https://cgit.freedesktop.org/gstreamer/gstreamer/), multimedia framework (not the default yet) @@ -45,6 +47,7 @@ listed in the [`meson` GitHub topic](https://github.com/topics/meson). - [libfuse](https://github.com/libfuse/libfuse), the reference implementation of the Linux FUSE (Filesystem in Userspace) interface - [Libgit2-glib](https://git.gnome.org/browse/libgit2-glib), a GLib wrapper for libgit2 - [Libhttpseverywhere](https://git.gnome.org/browse/libhttpseverywhere), a library to enable httpseverywhere on any desktop app + - [libmodulemd](https://github.com/fedora-modularity/libmodulemd), a GObject Introspected library for managing [Fedora Project](https://getfedora.org/) module metadata. - [Libosmscout](https://github.com/Framstag/libosmscout), a C++ library for offline map rendering, routing and location lookup based on OpenStreetMap data - [libspng](https://gitlab.com/randy408/libspng), a C library for reading and writing Portable Network Graphics (PNG) @@ -54,7 +57,7 @@ format files - [Kiwix libraries](https://github.com/kiwix/kiwix-lib) - [Mesa](https://cgit.freedesktop.org/mesa/mesa/), An open source graphics driver project - [MiracleCast](https://github.com/albfan/miraclecast), connect external monitors to your system via Wifi-Display specification aka Miracast - - [Nautilus](https://gitlab.gnome.org/GNOME/nautilus), the Gnome file manager + - [Nautilus](https://gitlab.gnome.org/GNOME/nautilus), the GNOME file manager - [Nemo](https://github.com/linuxmint/nemo), the file manager for the Cinnamon desktop environment - [Orc](http://cgit.freedesktop.org/gstreamer/orc/), the Optimized Inner Loop Runtime Compiler (not the default yet) - [Outlier](https://github.com/kerolasa/outlier), a small Hello World style meson example project diff --git a/docs/markdown/Windows-module.md b/docs/markdown/Windows-module.md index 8098c11..39f1ba6 100644 --- a/docs/markdown/Windows-module.md +++ b/docs/markdown/Windows-module.md @@ -16,6 +16,8 @@ has the following keyword argument. - `depend_files` lists resource files that the resource script depends on (e.g. bitmap, cursor, font, html, icon, message table, binary data or manifest files referenced by the resource script) (*since 0.47.0*) +- `depends` lists target(s) that this target depends on, even though it does not + take them as an argument (e.g. as above, but generated) (*since 0.47.0*) - `include_directories` lists directories to be both searched by the resource compiler for referenced resource files, and added to the preprocessor include search path. diff --git a/docs/markdown/howtox.md b/docs/markdown/howtox.md index acc18d7..adcec7c 100644 --- a/docs/markdown/howtox.md +++ b/docs/markdown/howtox.md @@ -1,6 +1,8 @@ # How do I do X in Meson? -This page lists code snippets for common tasks. These are written mostly using the C compiler, but the same approach should work on almost all other compilers. +This page lists code snippets for common tasks. These are written +mostly using the C compiler, but the same approach should work on +almost all other compilers. ## Set compiler @@ -10,6 +12,20 @@ When first running Meson, set it in an environment variable. $ CC=mycc meson <options> ``` +Note that environment variables like `CC` _always_ refer to the native +compiler. That is, the compiler used to compile programs that run on +the current machine. The compiler used in cross compilation is set +with the cross file. + +This behaviour is different from e.g. Autotools, where cross +compilation is done by setting `CC` to point to the cross compiler +(such as `/usr/bin/arm-linux-gnueabihf-gcc`). The reason for this is +that Meson supports natively the case where you compile helper tools +(such as code generators) and use the results during the +build. Because of this Meson needs to know both the native and the +cross compiler. The former is set via the environment variables and +the latter via the cross file only. + ## Set default C/C++ language version ```meson @@ -25,7 +41,9 @@ executable(..., override_options : ['c_std=c11']) ## Enable threads -Lots of people seem to do this manually with `find_library('pthread')` or something similar. Do not do that. It is not portable. Instead do this. +Lots of people seem to do this manually with `find_library('pthread')` +or something similar. Do not do that. It is not portable. Instead do +this. ```meson thread_dep = dependency('threads') @@ -77,7 +95,8 @@ configure_file(...) ## Generate a runnable script with `configure_file` -`configure_file` preserves metadata so if your template file has execute permissions, the generated file will have them too. +`configure_file` preserves metadata so if your template file has +execute permissions, the generated file will have them too. ## Producing a coverage report @@ -99,7 +118,11 @@ The coverage report can be found in the meson-logs subdirectory. ## Add some optimization to debug builds -By default the debug build does not use any optimizations. This is the desired approach most of the time. However some projects benefit from having some minor optimizations enabled. GCC even has a specific compiler flag `-Og` for this. To enable its use, just issue the following command. +By default the debug build does not use any optimizations. This is the +desired approach most of the time. However some projects benefit from +having some minor optimizations enabled. GCC even has a specific +compiler flag `-Og` for this. To enable its use, just issue the +following command. ```console $ meson configure -Dc_args=-Og @@ -109,13 +132,17 @@ This causes all subsequent builds to use this command line argument. ## Use address sanitizer -Clang comes with a selection of analysis tools such as the [address sanitizer](https://clang.llvm.org/docs/AddressSanitizer.html). Meson has native support for these with the `b_sanitize` option. +Clang comes with a selection of analysis tools such as the [address +sanitizer](https://clang.llvm.org/docs/AddressSanitizer.html). Meson +has native support for these with the `b_sanitize` option. ```console $ meson <other options> -Db_sanitize=address ``` -After this you just compile your code and run the test suite. Address sanitizer will abort executables which have bugs so they show up as test failures. +After this you just compile your code and run the test suite. Address +sanitizer will abort executables which have bugs so they show up as +test failures. ## Use Clang static analyzer @@ -125,7 +152,9 @@ Install scan-build and configure your project. Then do this: $ ninja scan-build ``` -You can use the `SCANBUILD` environment variable to choose the scan-build executable. +You can use the `SCANBUILD` environment variable to choose the +scan-build executable. + ```console $ SCANBUILD=<your exe> ninja scan-build ``` @@ -133,16 +162,20 @@ $ SCANBUILD=<your exe> ninja scan-build ## Use profile guided optimization -Using profile guided optimization with GCC is a two phase operation. First we set up the project with profile measurements enabled and compile it. +Using profile guided optimization with GCC is a two phase +operation. First we set up the project with profile measurements +enabled and compile it. ```console $ meson <Meson options, such as --buildtype=debugoptimized> -Db_pgo=generate $ ninja -C builddir ``` -Then we need to run the program with some representative input. This step depends on your project. +Then we need to run the program with some representative input. This +step depends on your project. -Once that is done we change the compiler flags to use the generated information and rebuild. +Once that is done we change the compiler flags to use the generated +information and rebuild. ```console $ meson configure -Db_pgo=use @@ -153,7 +186,9 @@ After these steps the resulting binary is fully optimized. ## Add math library (`-lm`) portably -Some platforms (e.g. Linux) have a standalone math library. Other platforms (pretty much everyone else) do not. How to specify that `m` is used only when needed? +Some platforms (e.g. Linux) have a standalone math library. Other +platforms (pretty much everyone else) do not. How to specify that `m` +is used only when needed? ```meson cc = meson.get_compiler('c') diff --git a/docs/markdown/snippets/bitcode_support.md b/docs/markdown/snippets/bitcode_support.md deleted file mode 100644 index a0d7ad9..0000000 --- a/docs/markdown/snippets/bitcode_support.md +++ /dev/null @@ -1,15 +0,0 @@ -## New base build option for LLVM (Apple) bitcode support - -When building with clang on macOS, you can now build your static and shared -binaries with embedded bitcode by enabling the `b_bitcode` [base -option](Builtin-options.md#Base_options) by passing `-Db_bitcode=true` to -Meson. - -This is better than passing the options manually in the environment since Meson -will automatically disable conflicting options such as `b_asneeded`, and will -disable bitcode support on targets that don't support it such as -`shared_module()`. - -Since this requires support in the linker, it is currently only enabled when -using Apple ld. In the future it can be extended to clang on other platforms -too. diff --git a/docs/markdown/snippets/compiler_check_header.md b/docs/markdown/snippets/compiler_check_header.md deleted file mode 100644 index 8981d13..0000000 --- a/docs/markdown/snippets/compiler_check_header.md +++ /dev/null @@ -1,12 +0,0 @@ -## New compiler check: check_header() - -The existing compiler check `has_header()` only checks if the header exists, -either with the `__has_include` C++11 builtin, or by running the pre-processor. - -However, sometimes the header you are looking for is unusable on some platforms -or with some compilers in a way that is only detectable at compile-time. For -such cases, you should use `check_header()` which will include the header and -run a full compile. - -Note that `has_header()` is much faster than `check_header()`, so it should be -used whenever possible. diff --git a/docs/markdown/snippets/configure_file_copy.md b/docs/markdown/snippets/configure_file_copy.md deleted file mode 100644 index fee04e4..0000000 --- a/docs/markdown/snippets/configure_file_copy.md +++ /dev/null @@ -1,10 +0,0 @@ -## New action 'copy' for configure_file() - -In addition to `configuration:` and `command:`, -[`configure_file()`](#Reference-manual.md#configure_file) now accepts a keyword -argument `copy:` which specifies a new action: copying the file specified with -the `input:` keyword argument to a file in the build directory with the name -specified with the `output:` keyword argument. - -These three keyword arguments are, as before, mutually exclusive. You can only -do one action at a time. diff --git a/docs/markdown/snippets/configure_file_encoding.md b/docs/markdown/snippets/configure_file_encoding.md deleted file mode 100644 index 8082177..0000000 --- a/docs/markdown/snippets/configure_file_encoding.md +++ /dev/null @@ -1,12 +0,0 @@ -## New encoding keyword for configure_file - -Add a new keyword to [`configure_file()`](#Reference-manual.md#configure_file) -that allows the developer to specify the input and output file encoding. - -If the file encoding of the input is not UTF-8 meson can crash (see #1542). -A crash as with UTF-16 is the best case and the worst meson will silently -corrupt the output file for example with ISO-2022-JP. For additional details -see pull request #3135. - -The new keyword defaults to UTF-8 and the documentation strongly suggest to -convert the file to UTF-8 when possible. diff --git a/docs/markdown/snippets/configure_file_output_format.md b/docs/markdown/snippets/configure_file_output_format.md deleted file mode 100644 index e522885..0000000 --- a/docs/markdown/snippets/configure_file_output_format.md +++ /dev/null @@ -1,14 +0,0 @@ -## New keyword argument `output_format` for configure_file() - -When called without an input file, `configure_file` generates a -C header file by default. A keyword argument was added to allow -specifying the output format, for example for use with nasm or yasm: - -``` -conf = configuration_data() -conf.set('FOO', 1) - -configure_file('config.asm', - configuration: conf, - output_format: 'nasm') -``` diff --git a/docs/markdown/snippets/configure_file_overwrite_warning.md b/docs/markdown/snippets/configure_file_overwrite_warning.md new file mode 100644 index 0000000..550407d --- /dev/null +++ b/docs/markdown/snippets/configure_file_overwrite_warning.md @@ -0,0 +1,39 @@ +## Meson warns if two calls to configure_file() write to the same file + +If two calls to [`configure_file()`](#Reference-manual.md#configure_file) +write to the same file Meson will print a `WARNING:` message during +configuration. For example: +```meson +project('configure_file', 'cpp') + +configure_file( + input: 'a.in', + output: 'out', + command: ['./foo.sh'] + ) +configure_file( + input: 'a.in', + output: 'out', + command: ['./foo.sh'] +) + +``` + +This will output: + +``` +The Meson build system +Version: 0.47.0.dev1 +Source dir: /path/to/srctree +Build dir: /path/to/buildtree +Build type: native build +Project name: configure_file +Project version: undefined +Build machine cpu family: x86_64 +Build machine cpu: x86_64 +Configuring out with command +WARNING: Output file out for configure_file overwritten. First time written in line 3 now in line 8 +Configuring out with command +Build targets in project: 0 +Found ninja-1.8.2 at /usr/bin/ninja +``` diff --git a/docs/markdown/snippets/custom-target-depends.md b/docs/markdown/snippets/custom-target-depends.md deleted file mode 100644 index e2b2ed7..0000000 --- a/docs/markdown/snippets/custom-target-depends.md +++ /dev/null @@ -1,4 +0,0 @@ -## Substitutions in `custom_target(depends:)` - -The `depfile` keyword argument to `custom_target` now accepts the `@BASENAME@` -and `@PLAINNAME@` substitutions. diff --git a/docs/markdown/snippets/dict_builtin.md b/docs/markdown/snippets/dict_builtin.md deleted file mode 100644 index 1bd24ce..0000000 --- a/docs/markdown/snippets/dict_builtin.md +++ /dev/null @@ -1,19 +0,0 @@ -## New built-in object dictionary - -Meson dictionaries use a syntax similar to python's dictionaries, -but have a narrower scope: they are immutable, keys can only -be string literals, and initializing a dictionary with duplicate -keys causes a fatal error. - -Example usage: - -```meson -dict = {'foo': 42, 'bar': 'baz'} - -foo = dict.get('foo') -foobar = dict.get('foobar', 'fallback-value') - -foreach key, value : dict - Do something with key and value -endforeach -``` diff --git a/docs/markdown/snippets/feature_new.md b/docs/markdown/snippets/feature_new.md deleted file mode 100644 index 7480634..0000000 --- a/docs/markdown/snippets/feature_new.md +++ /dev/null @@ -1,32 +0,0 @@ -## Feature detection based on meson_version in project() - -Meson will now print a `WARNING:` message during configuration if you use -a function or a keyword argument that was added in a meson version that's newer -than the version specified inside `project()`. For example: - -```meson -project('featurenew', meson_version: '>=0.43') - -cdata = configuration_data() -cdata.set('FOO', 'bar') -message(cdata.get_unquoted('FOO')) -``` - -This will output: - -``` -The Meson build system -Version: 0.47.0.dev1 -Source dir: C:\path\to\srctree -Build dir: C:\path\to\buildtree -Build type: native build -Project name: featurenew -Project version: undefined -Build machine cpu family: x86_64 -Build machine cpu: x86_64 -WARNING: Project targetting '>=0.43' but tried to use feature introduced in '0.44.0': get_unquoted -Message: bar -Build targets in project: 0 -Minimum version of features used: -0.44.0: {'get_unquoted'} -``` diff --git a/docs/markdown/snippets/gdbus_codegen_options.md b/docs/markdown/snippets/gdbus_codegen_options.md deleted file mode 100644 index d3dd84c..0000000 --- a/docs/markdown/snippets/gdbus_codegen_options.md +++ /dev/null @@ -1,14 +0,0 @@ -## New options to gnome.gdbus_codegen - -You can now pass additional arguments to gdbus-codegen using the `extra_args` -keyword. This is the same for the other gnome function calls. - -Meson now automatically adds autocleanup support to the generated code. This -can be modified by setting the autocleanup keyword. - -For example: - - sources += gnome.gdbus_codegen('com.mesonbuild.Test', - 'com.mesonbuild.Test.xml', - autocleanup : 'none', - extra_args : ['--pragma-once']) diff --git a/docs/markdown/snippets/install_mode-extended.md b/docs/markdown/snippets/install_mode-extended.md deleted file mode 100644 index b0ee4c3..0000000 --- a/docs/markdown/snippets/install_mode-extended.md +++ /dev/null @@ -1,8 +0,0 @@ -## install_mode argument extended to all installable targets - -It is now possible to pass an install_mode argument to all installable targets, -such as executable(), libraries, headers, man pages and custom/generated -targets. - -The install_mode argument can be used to specify the file mode in symbolic -format and optionally the owner/uid and group/gid for the installed files. diff --git a/docs/markdown/snippets/install_umask.md b/docs/markdown/snippets/install_umask.md deleted file mode 100644 index b3a2427..0000000 --- a/docs/markdown/snippets/install_umask.md +++ /dev/null @@ -1,17 +0,0 @@ -## New built-in option install_umask with a default value 022 - -This umask is used to define the default permissions of files and directories -created in the install tree. Files will preserve their executable mode, but the -exact permissions will obey the install_umask. - -The install_umask can be overridden in the meson command-line: - - $ meson --install-umask=027 builddir/ - -A project can also override the default in the project() call: - - project('myproject', 'c', - default_options : ['install_umask=027']) - -To disable the install_umask, set it to 'preserve', in which case permissions -are copied from the files in their origin. diff --git a/docs/markdown/snippets/integer-base.md b/docs/markdown/snippets/integer-base.md deleted file mode 100644 index 0a27c9a..0000000 --- a/docs/markdown/snippets/integer-base.md +++ /dev/null @@ -1,9 +0,0 @@ -## Octal and binary string literals - -Octal and binary integer literals can now be used in build and option files. - -```meson -int_493 = 0o755 -int_1365 = 0b10101010101 -``` - diff --git a/docs/markdown/snippets/run_command_check.md b/docs/markdown/snippets/run_command_check.md deleted file mode 100644 index 018456b..0000000 --- a/docs/markdown/snippets/run_command_check.md +++ /dev/null @@ -1,4 +0,0 @@ -## New 'check' keyword argument for the run_command function - -If `check` is `true`, then the configuration will fail if the command returns a -non-zero exit status. The default value is `false` for compatibility reasons. diff --git a/docs/markdown/snippets/windows-resources-dependencies.md b/docs/markdown/snippets/windows-resources-dependencies.md deleted file mode 100644 index e30e18c..0000000 --- a/docs/markdown/snippets/windows-resources-dependencies.md +++ /dev/null @@ -1,7 +0,0 @@ -## Windows resource files dependencies - -The `compile_resources()` function of the `windows` module now takes -the `depend_files:` keyword. - -When using binutils's `windres`, dependencies on files `#include`'d by the -preprocessor are now automatically tracked. diff --git a/docs/sitemap.txt b/docs/sitemap.txt index e915df2..2d43e18 100644 --- a/docs/sitemap.txt +++ b/docs/sitemap.txt @@ -5,6 +5,7 @@ index.md Manual.md Overview.md Running-Meson.md + Builtin-options.md Using-with-Visual-Studio.md Meson-sample.md Syntax.md @@ -67,6 +68,7 @@ index.md Shipping-prebuilt-binaries-as-wraps.md fallback-wraptool.md Release-notes.md + Release-notes-for-0.48.0.md Release-notes-for-0.47.0.md Release-notes-for-0.46.0.md Release-notes-for-0.45.0.md |