aboutsummaryrefslogtreecommitdiff
path: root/docs/yaml
AgeCommit message (Collapse)AuthorFilesLines
2023-04-11fix various spelling issuesJosh Soref7-9/+9
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-11Change "can not" to "cannot" throughout projectHiPhish1-1/+1
The word "cannot" expresses inability to do something whereas "can not" expresses the ability to refrain from doing something.
2023-03-28doc: Fix some broken linksXavier Claessens1-2/+2
2023-03-28Add support for meson.options as a replacement for meson_options.txtDylan Baker2-3/+3
We will still try to load `meson_options.txt` if `meson.options` doesn't exist. Because there are some advantages to using `meson.options` even with older versions of meson (such as better text editor handling) we will not warn about the existence of a `meson.options` file if a `meson_options.txt` file or symlink also exists. The name `meson.options` was picked instead of alternative proposals, such as `meson_options.build` for a couple of reasons: 1. meson.options is shorter 2. While the syntax is the same, only the `option()` function may be called in meson.options, while, it may not be called in meson.build 3. While the two files share a syntax and elementary types (strings, arrays, etc), they have different purposes: `meson.build` declares build targets, `meson.options` declares options. This is similar to the difference between C's `.c` and `.h` extensions. As an implementation detail `Interpreter.option_file` has been removed, as it is used exactly once, in the `project()` call to read the options, and we can just calculate it there and not store it. Fixes: #11176
2023-03-01docs: document default_options behaviourJohn Levon1-0/+5
As discussed in issue #8037, using `c_args` in `project()` leads to `CFLAGS` not being respected, which is a common mistake. Document this and suggest using `add_project_arguments()` instead. Signed-off-by: John Levon <levon@movementarian.org>
2023-03-01docs: fix a small typoJohn Levon1-1/+1
s/Accecpts/Accepts/ Signed-off-by: John Levon <levon@movementarian.org>
2023-02-20interpreter/mesonmain: Add build_options methodL. E. Segovia1-0/+15
This method allows meson.build to introspect on the changed options. It works by merely exposing the same set of data that is logged by MesonApp._generate. Fixes #10898
2023-02-15interpreter: add FeatureOption.enable_if and .disable_ifDylan Baker1-0/+60
This adds two new methods, that are conceptually related in the same way that `enable_auto_if` and `disable_auto_if` are. They are different however, in that they will always replace an `auto` value with an `enabled` or `disabled` value, or error if the feature is in the opposite state (calling `feature(disabled).enable_if(true)`, for example). This matters when the feature will be passed to dependency(required : …)`, which has different behavior when passed an enabled feature than an auto one. The `disable_if` method will be controversial, I'm sure, since it can be expressed via `feature.require()` (`feature.require(not condition) == feature.disable_if(condition)`). I have two defences of this: 1) `feature.require` is difficult to reason about, I would expect require to be equivalent to `feature.enable_if(condition)`, not to `feature.disable_if(not condition)`. 2) mixing `enable_if` and `disable_if` in the same call chain is much clearer than mixing `require` and `enable_if`: ```meson get_option('feat') \ .enable_if(foo) \ .disable_if(bar) \ .enable_if(opt) ``` vs ```meson get_option('feat') \ .enable_if(foo) \ .require(not bar) \ .enable_if(opt) ``` In the first chain it's immediately obvious what is happening, in the second, not so much, especially if you're not familiar with what `require` means.
2023-02-15interpreter: add a feature.enable_auto_ifDylan Baker1-0/+17
It's always been strange to me we don't have an opposite method of the `disable_auto_if` method, but I've been pressed to find a case where we _need_ one, because `disable_auto_if` can't be logically contorted to work. I finally found the case where they're not equivalent: when you don't want to convert to a boolean: ```meson f = get_option('feat').disable_auto_if(not foo) g = get_option('feat').enable_auto_if(foo) dep1 = dependency('foo', required : f) dep2 = dependency('foo', required : g) ```
2023-02-15docs: add description of license_files kwargEli Schwartz1-0/+16
Added in commit 2fa074917597fea0cf3332c6620d3414034825e4 but I forgot to document it.
2023-02-15preprocess: Add dependencies kwargXavier Claessens1-0/+4
2023-02-14allow install script to run in dry-run modeCharles Brunet1-0/+12
2023-02-10docs: Add cython to the languages accepted by project()Daniele Nicolodi1-2/+3
Fixes #11373.
2023-01-04document declare_dependency(object: ...)Paolo Bonzini2-2/+9
2023-01-04allow passing generated objects in the "objects" keyword argumentPaolo Bonzini1-2/+5
Generated objects can already be passed in the "objects" keyword argument as long as you go through an extract_objects() indirection. Allow the same even directly, since that is more intuitive than having to add them to "sources". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-12-27add builtin option to install licensesEli Schwartz1-0/+4
Unless `meson.install_dependency_manifest()` is explicitly used, this will cause a default implied one to be installed.
2022-12-27add license_files kwarg to projectEli Schwartz1-2/+10
Hook this up to installed dependency manifests. This is often needed above and beyond just an SPDX string -- e.g. many licenses have custom copyright lines.
2022-12-21fix build_target(objects: ...) documentationPaolo Bonzini1-4/+4
The documentation for build_target(...) does not list file or str as the possible types for the "objects" keyword argument, even though in theory the argument is meant for prebuild object files that are part of the sources. Of course that is only the theory, because an ExtractedObjects object is probably used a lot more than a file in the source tree. But at least make the reference manual's typing information accurate.
2022-12-21doc: Add missing include_directories kwarg to compiler.preprocess()Xavier Claessens1-0/+2
Fixes: #11202
2022-12-14docs: clarify the semantics of the required: kwarg everywhereEli Schwartz3-8/+23
Link to feature options consistently, and point out that it controls "whether" the function finds what it's trying to find. This clues people in to the fact that disabled features exist.
2022-12-14docs: simplify the documentation on required kwarg for subprojectEli Schwartz1-4/+1
It's a clone of dependency() anyway.
2022-12-06interpreter: compiler: Allow array for the prefix kwargMarvin Scholz1-5/+7
2022-11-30docs: clarify prog.full_path even moreEli Schwartz1-6/+8
The previous description update was lacking an example of why external_program cares about inter-target dependencies.
2022-11-30docs: clarify that prog.full_path has potentially valid usesEli Schwartz1-4/+10
Claiming that "it should literally never be used ever no matter what" is confusing and wrong -- it's definitely useful sometimes, but does result in downsides, like not tracking inter-target dependencies correctly. Ref: #10901
2022-11-11Fix typo in dependency() 'names' docstring [skip ci]Will Thompson1-1/+1
2022-10-24Add missing since annotations in docsElliott Sales de Andrade4-2/+6
This is based on searching for `@FeatureNew*` decorators. There is also one correction to a version in a decorators; `build_by_default` was added in #1303, which is 0.38.0, not 0.40.0.
2022-10-23Merge pull request #10916 from xclaesse/preprocessJussi Pakkanen1-0/+22
Add cc.preprocess() method
2022-10-23Add doc and release notes for cc.preprocess()Xavier Claessens1-0/+22
2022-10-23Fix typos in docsElliott Sales de Andrade9-13/+13
2022-10-22doc: Fix linkZhao, Gang1-1/+1
2022-10-10Document and test new WrapDB auto fallbackXavier Claessens1-0/+5
2022-08-29docs: make note of the path restriction on subdir()Eli Schwartz1-1/+4
It's mentioned in the error message if you try to do it, that you cannot use `..`, but it is probably useful to mention this in the online docs too.
2022-07-31documentation: extend custom_target installGerion Entrup1-2/+3
custom_target allows selective installation if it outputs more than one file. Mention this explicitly in install. Additionally, fix the types for install_dir. see: https://github.com/mesonbuild/meson/issues/505
2022-07-08implement the new preserve_path kwarg for install_data tooEli Schwartz1-0/+9
Primarily interesting to me because it is then available for the python module's install_sources method. Based on the new feature in install_headers.
2022-06-17docs: d_module_versions has an undocumented ability to accept integersEli Schwartz2-5/+7
Dlang uses both integer version "levels" and arbitrary string identifiers, and we support both, but don't mention it in the docs. Also update a test case to pass one via declare_dependency. We already test this kwarg for build_target.
2022-06-17docs: fix incorrect info for declare_dependency sourcesEli Schwartz1-1/+1
The type information is clearly wrong as it disagrees with the description w.r.t. generated headers. We also rely on it accepting custom targets for the obvious reason that we accept it in a build target too! In fact, we rely on this in the testsuite too.
2022-05-31Fix typo in documentation for add_*_argumentsKarl Linden2-2/+2
2022-05-30Implement `preserve_path` for install_headersFlorian "sp1rit"​1-0/+16
The `install_headers` function now has an optional argument `preserve_path` that allows installing multi-directory headerfile structures that live alongside sourcecode with a single command. For example, the headerfile structure headers = [ 'one.h', 'two.h', 'alpha/one.h', 'alpha/two.h', 'alpha/three.h' 'beta/one.h' ] can now be passed to `install_headers(headers, subdir: 'mylib', preserve_path: true)` and the resulting directory tree will look like {prefix} └── include    └── mylib       ├── alpha       │   ├── one.h       │   ├── two.h       │   └── three.h       ├── beta       │   └── one.h       ├── one.h       └── two.h Fixes #3371
2022-05-03interpreter: new function add_project_dependencies()Paolo Bonzini1-0/+16
This function can be used to add fundamental dependencies such as glib to all build products in one fell swoop. This can be useful whenever, due to a project's coding conventions, it is not really possible to compile any source file without including the dependency. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-02complete documentation of declare_dependencyRemi Thebault1-0/+14
2022-05-02docs: correct incorrect types for pch filesEli Schwartz1-1/+1
In the original RefMan 2.0 implementation, the types for this were filled in as `str | file`, but the code only ever accepted the former. Fix the documentation so that it aligns with reality. Fixes #10338
2022-04-20vcs_tag: handle non-str / non-file argumentsKirill Isakov1-1/+3
This makes vcs_tag behave like other commands so it accepts not only string and file arguments, but also exe, custom_tgt, and external_program.
2022-04-20vcs_tag: document the already supported file argKirill Isakov1-1/+3
2022-04-07docs: YAML: Add `arg_flattening: false` where requiredDaniel Mensinger12-0/+27
2022-04-07docs: Fix [[true]] --> `true`Daniel Mensinger1-2/+2
2022-04-01docs: fix inaccurate description of command targetsEli Schwartz2-2/+2
It isn't possible to have one target depend on a run_target, because those produce no outputs and are always out of date. But the docs didn't specify which types of target are valid here. Correct the docs to align with the implementation. Fixes #10198
2022-03-31docs: note that find_program accepts file objectsEli Schwartz1-4/+6
This was implemented in commit 280346da3ac5904ec097afe89ef45ad34bd4a173 but never properly documented (it predated the version-controlled docs).
2022-03-31docs: correct documentation of shared_library soversionsEli Schwartz1-2/+2
We have always accepted an int here as an alternative to a string, but the initial documentation thought it was only a string.
2022-03-30Add new debug() functionMarvin Scholz1-0/+14
Adds a new debug() function that can be used in the meson.build to log messages to the meson-log.txt that will not be printed to stdout when configuring the project.
2022-03-24Make compilers list per subprojectXavier Claessens1-1/+1
Previously subprojects inherited languages already added by main project, or any previous subproject. This change to have a list of compilers per interpreters, which means that if a subproject does not add 'c' language it won't be able to compile .c files any more, even if main project added the 'c' language. This delays processing list of compilers until the interpreter adds the BuildTarget into its list of targets. That way the interpreter can add missing languages instead of duplicating that logic into BuildTarget for the cython case.