aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
AgeCommit message (Collapse)AuthorFilesLines
2021-04-15docs: add the 'since' tag to string.replacePeter Hutterer1-2/+2
2021-04-15docs: document default version for declare_dependency()Simon Ser1-1/+2
By default, the project version is picked.
2021-04-09docs: Fix the description of static_library's additional arguments [skip ci]Adam Jackson1-2/+1
2021-04-09Add global_source/build_root()Xavier Claessens1-0/+16
2021-03-23environment(): Allow stacking append() and prepend() (#8547)Xavier Claessens1-2/+13
* environment(): Allow stacking append() and prepend() * Update docs/markdown/Reference-manual.md Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
2021-03-18Allow add_dist_script() in subprojectsXavier Claessens1-6/+15
Fixes: #8440.
2021-03-18interpreter: Add varname as positional arg in dep.get_variable()Xavier Claessens1-2/+6
2021-03-16Add range() functionXavier Claessens1-0/+30
Fixes: #5026.
2021-03-16Add `meson devenv` command and meson.add_devenv()Xavier Claessens1-0/+13
2021-03-09Add str.replace() methodTristan Partin1-0/+3
2021-03-06minstall: Correctly set uid/gid of installed filesPeter Kjellerstedt1-1/+1
In commit caab4d3d, the uid and gid arguments passed to os.chown() by set_chown() were accidentally swapped, causing files to end up with incorrect owner/group if the owner and group are not the same. Also update the documentation to better indicate which argument to install_mode is which. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
2021-03-04docs: Clarify compiler.cmd_array() (#8454)Chris Mayo1-2/+1
Make it easier to understand that this array contains the compiler command, not arguments to it, and may only have one element.
2021-02-27install_man locale supportJason Woodward1-0/+5
Rather than having to manually build the locale aware man paths with `install_data('foo.fr.1', install_dir: join_paths(get_option('mandir'), 'fr', 'man1'), rename: 'foo.1')` Support doing `install_man('foo.fr.1', locale: 'fr')`
2021-02-26Allow printing UserOptions in the summaryStephen Gregoratto1-0/+1
2021-02-26meson: add .has_external_property() methodsTim-Philipp Müller1-0/+7
Useful in case of boolean values to distinguish between a boolean value having been set in the native/cross file and not having been provided, which can't be achieved by passing a fallback parameter to .get_external_property().
2021-02-25deprecated `meson.get_cross_property`Dylan Baker1-3/+3
It's a pure subset of `get_external_property`, and has odd behavior in host == build configurations. `get_external_property` is clear, and uses the standard `native : bool` syntax to control host vs build properties
2021-02-25Support multiple args in error()Xavier Claessens1-0/+3
Seems it got forgotten when that was added to warnings() and message(). Fixes: #8414.
2021-02-17Substitute @CURRENT_SOURCE_DIR@ in run_target() and custom_target()Xavier Claessens1-0/+17
run_target() does some variable substitutions since 0.57.0. This is a new behavior, and undocumented, caused by sharing more code with custom_target(). More consistency is better, so document it now. custom_target() was doing variable substitution in the past, because it shared some code with generator(), but that was undocumented. Some refactoring in 0.57.0 caused it to not replace @CURRENT_SOURCE_DIR@, @SOURCE_DIR@, and @BUILD_DIR@ anymore. This patch adds back @CURRENT_SOURCE_DIR@ and document it. It does not add back @SOURCE_DIR@ because it is duplicate with @SOURCE_ROOT@ that has a better name. Also do not add back @BUILD_DIR@ which is duplicate of @PRIVATE_DIR@, and not @BUILD_ROOT@ surprisingly, adding to the confusion.
2021-02-07Make installing non-existing subdirs a supported featurePeter Hutterer1-0/+10
install_subdir() with a non-existing subdir creates the directory in the target directory. This seems like an implementation detail but is quite useful to create new directories for e.g. configuration or plugins in the installed locations. git bisect says this started with 8fe816101467e66792251b4f57e0ddddb537764a. Let's add a test for it and document it to make this behavior official. Limitation: it can only create at the install_dir location, trying to create nested subdirectories does not work and indeed creates the wrong directory structure. That is a bug that should be fixed separately: install_subdir('blah', install_dir: get_option('prefix')) install_subdir('sub/foobar', install_dir: get_option('prefix')) install_subdir('foo/baz', install_dir: get_option('prefix')) $ tree ../_inst ../_inst ├── baz ├── blah └── foobar Fixes #2904
2021-02-07Merge pull request #8288 from bonzini/test-setup-exclude-suitesJussi Pakkanen1-0/+3
introduce add_test_setup(exclude suites: ...) keyword argument
2021-02-05run_target: Add env kwargXavier Claessens1-0/+4
Re-implement it in backend using the same code path as for custom_target(). This for example handle setting PATH on Windows when command is an executable.
2021-02-02doc: fix typosEli Schwartz1-2/+2
2021-02-02interpreter, mtest: introduce add_test_setup(exclude_suites: ...)Paolo Bonzini1-0/+3
This new keyword argument makes it possible to run specific test setups only on a subset of the tests. For example, to mark some tests as slow and avoid running them by default: add_test_setup('quick', exclude_suites: ['slow'], is_default: true) add_test_setup('slow') It will then be possible to run the slow tests with either `meson test --setup slow` or `meson test --suite slow`.
2021-01-31Capitalize "Meson" consistently as it is a proper name. [skip ci]Jussi Pakkanen1-6/+6
2021-01-30add_install_script: add skip_if_destdir kwargXavier Claessens1-0/+4
It is common, at least in GNOME projects, to have scripts that must be run only in the final destination, to update system icon cache, etc. Skipping them from Meson ensures we can properly log that they have not been run instead of relying on such scripts to to it (they don't always).
2021-01-30Rewrap long text lines in docs. [skip ci]Jussi Pakkanen1-91/+104
2021-01-29Can read project version from a file.Jussi Pakkanen1-1/+3
2021-01-27intepreter: Allow using file objects for the script_name of add_*_scriptDylan Baker1-2/+14
It's a bit silly and conveluted to have to call find_program on the output of configure_file, so let's just allow passing files as the script name.
2021-01-27custom_target: Add env kwargXavier Claessens1-0/+4
2021-01-27test: Make timeout <= 0 infinite duractionXavier Claessens1-2/+5
2021-01-21interpreter: accept external programs and dependencies for summaryPaolo Bonzini1-1/+5
2021-01-12summary: align left, not align middleEli Schwartz1-7/+7
aligning along the left is, I think, what most projects want to do. Aligning along the middle looks subjectively ugly, and objectively prevents me from further indenting an element, e.g. Build information: prefix : /usr sysconfdir : /etc conf file : /etc/myprogram.conf
2021-01-05mtest: Add support for rust unit testsDylan Baker1-0/+1
Rust has it's own built in unit test format, which is invoked by compiling a rust executable with the `--test` flag to rustc. The tests are then run by simply invoking that binary. They output a custom test format, which this patch adds parsing support for. This means that we can report each subtest in the junit we generate correctly, which should be helpful for orchestration systems like gitlab and jenkins which can parse junit XML.
2020-12-14doc: fix typos for doubled words [skip ci]Eli Schwartz1-2/+2
"more more" is one place where we don't need more. Fixes #8097
2020-12-03Add prelinking support for static libraries.Jussi Pakkanen1-0/+4
2020-11-12interpreter: Add get_keys function for configuration_data (#7887)Jones1-0/+6
2020-11-05docs: Recommend to use SPDX license identifiers [skip ci]Michael Weiss1-7/+8
Some license identifiers are ambiguous (e.g. "GPL3"). The SPDX license identifiers avoid this by providing standardized and unique identifiers (e.g. "GPL-3.0-only" or "GPL-3.0-or-later" for the previous example). Because SPDX short-form identifiers are also both human- and machine-readable we should recommend them in the documentation. More information (advantages, details, etc.) can be found here: - https://spdx.dev/resources/use/#identifiers - https://spdx.dev/ids/ Fix #7905.
2020-10-19fix markdown issuePaolo Bonzini1-1/+1
2020-10-16Fix consistency in variables kwargXavier Claessens1-1/+1
Share common code to extract the `variables` kwarg in declare_dependency() and pkg.generate().
2020-10-08dependency: support boolean argument "allow_fallback"Paolo Bonzini1-4/+13
Sometimes, distros want to configure a project so that it does not use any bundled library. In this case, meson.build might want to do something like this, where slirp is a combo option with values auto/system/internal: slirp = dependency('', required: false) if get_option('slirp') != 'internal' slirp = dependency('slirp', required: get_option('slirp') == 'system') endif if not slirp.found() slirp = subproject('libslirp', ...) .variable('...') endif and we cannot use "fallback" because the "system" value should never look for a subproject. This worked until 0.54.x, but in 0.55.x this breaks because of the automatic subproject search. Note that the desired effect here is backwards compared to the policy of doing an automatic search on "required: true"; we only want to do the search if "required" is false! It would be possible to look for the dependency with `required: false` and issue the error manually, but it's ugly and it may produce an error message that looks "different" from Meson's. Instead, with this change it is possible to achieve this effect in an even simpler way: slirp = dependency('slirp', required: get_option('slirp') != 'auto', allow_fallback: get_option('slirp') == 'system' ? false : ['slirp', 'libslirp_dep']) The patch also adds support for "allow_fallback: true", which is simple and enables automatic fallback to a wrap even for non-required dependencies.
2020-10-08docs: improve documentation of subproject fallbackPaolo Bonzini1-15/+34
Automatic fallback to subprojects is complicated and should be pointed out outside the "fallback" keyword argument. It is also surprising that fallback to a subproject will not happen if override_dependency has already been used with the request dependency. Document all this.
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen1-2/+9
2020-10-02docs: Fixup find_program search path documentation [skip ci]Nirbheek Chauhan1-5/+16
It was slightly wrong, and also make it a bullet point for easier parsing.
2020-10-01deprecated get_configtool_variable and get_pkgconfig_variableDylan Baker1-10/+14
The get_variable method is able to do everything they do and more, making it generally more useful. Let's tell people to stop using the old ones.
2020-10-01Document search order of find_programRasmus Thomsen1-1/+4
2020-10-01document keys() method of dictionary object [skip ci]Alexandros Theodotou1-0/+2
2020-09-29Merge pull request #7772 from xclaesse/deprecate-source-rootJussi Pakkanen1-7/+13
Deprecate meson.build_root() and meson.source_root()
2020-09-29Improve documentation about using shell in custom_target() [skip ci]Jon Turney1-0/+4
Add a note about the portability of using shell constructs in the custom_target() command.
2020-09-28Add meson.project_build/source_root() methodsXavier Claessens1-2/+8
2020-09-23Deprecate meson.build_root() and meson.source_root()Xavier Claessens1-6/+6
Those function are common source of issue when used in a subproject because they point to the parent project root which is rarely what is expected and is a violation of subproject isolation.