Commit Graph

38 Commits

Author SHA1 Message Date
Eli Schwartz 5c0145c54d
docs: correct incorrect types for pch files
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-05-02 00:20:10 -04:00
Kirill Isakov 39dd1ff9e8 vcs_tag: handle non-str / non-file arguments
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-20 20:53:19 -04:00
Kirill Isakov 33aa803521 vcs_tag: document the already supported file arg 2022-04-20 20:53:19 -04:00
Daniel Mensinger 99f510a817 docs: YAML: Add `arg_flattening: false` where required 2022-04-07 17:16:26 -04:00
Eli Schwartz cc8e67ce59
docs: fix inaccurate description of command targets
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-04-01 07:03:35 -04:00
Eli Schwartz 3455f21f72
docs: note that find_program accepts file objects
This was implemented in commit 280346da3a
but never properly documented (it predated the version-controlled docs).
2022-03-31 22:52:31 -04:00
Eli Schwartz 34d39dce57 docs: correct documentation of shared_library soversions
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-31 18:09:01 +03:00
Marvin Scholz 2cdddbab56 Add new debug() function
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-30 06:57:30 -04:00
Xavier Claessens f2d21bf8a9 Make compilers list per subproject
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.
2022-03-24 12:27:06 -04:00
rusty-snake 90fba42511 Fix missing ' in custom_target docs 2022-03-22 19:11:29 -04:00
Tristan Partin 39f1d52e4a Add ability to add resources to jars
Previously Meson lacked the ability to add resources to jar files.

Fixes #9945
2022-03-22 13:21:26 +02:00
Eli Schwartz bf5d11f049
docs: fix incorrect default for test is_parallel
In the original RefMan 2.0 implementation, this incorrectly started
claiming that the default is false.

Fixes #10155
2022-03-20 10:24:03 -04:00
Jussi Pakkanen 69ade4f4cf
Merge pull request #9339 from dcbaker/submit/structured_sources
Structured Sources
2022-03-13 01:01:55 +02:00
Dylan Baker d35f11fc08 docs: document the rust_crate_type build_target keyword 2022-03-07 18:35:31 -05:00
Dylan Baker 9cf7a12561 docs: Add docs for structured_sources 2022-03-07 12:33:33 -08:00
Eli Schwartz 2bcc204a11
document and raise an error for disallowed combination of install_headers args
It makes no sense to specify both:
- install_dir, which overrides the -Dincludedir= builtin option
- subdir, which suffixes the -Dincludedir= builtin option

We've always silently ignored the subdir in this case, which is really
surprising if someone actually passed it and expected it to do
something. We also confusingly didn't say anything in the documentation
about it.

Document that the options are incompatible, and explicitly check to see
if they are both passed -- if so, raise an error message pointing out
that only install_dir should be used.

Fixes #10046
2022-03-02 17:17:45 -05:00
Xavier Claessens 6acfe48f32 Allow setting method/separator in environment() and meson.add_devenv() 2022-02-28 09:03:27 -05:00
Stone Tickle e8e7fd98e2 add all supported arguments in docs for summary() 2022-02-20 14:24:05 +02:00
Nirbheek Chauhan 2d56ff135e shared module: Allow linking on Android
Android requires shared modules that use symbols from other shared
modules to be linked before they can be dlopen()ed in the correct
order. Not doing so leads to a missing symbol error:
https://github.com/android/ndk/issues/201

We need to always allow linking for this. Also add a soname, although
it's not confirmed that it's needed, and it doesn't really hurt if it
isn't needed.
2022-02-14 23:30:24 -05:00
Jan Tojnar df451f1013 meson: Allow directory options outside of prefix
This bring us in line with Autotools and CMake and it is useful
for platforms like Nix, which install projects
into multiple independent prefixes.

As a consequence, `get_option` might return absolute paths for some
directory options, if a directory outside of prefix is passed.

This is technically a backwards incompatible change but its effect
should be minimal, thanks to widespread use of `join_paths`/`/` operator
and pkg-config generator module. It should only cause an issue when
a path were constructed by concatenating the value of directory path option.

Also remove a comment about commonpath since we do not use that since
<00f5dadd5b>.

Fixes: https://github.com/mesonbuild/meson/issues/2561
2022-02-09 11:04:59 -05:00
Dylan Baker 5ad9e77838 docs: strongly recommend the use of SPDX instead of array of license
The array of licenses is not clear, where and SPDX expression using AND
and OR is very clear, take for example this: `['Apache', 'GPLv2']`. What
does that mean? Any Apache license you like and GPLv2? Using a valid
SPDX license identifier however makes it extremely clear what is meant:
`'Apache-2.0 OR GPL-2.0-only'`. It is very clear that you mean, "this is
Apache 2.0, however, you can use as GPL-2.0 for the purpose of linking
it into your GPL-2.0 project".
2022-02-03 12:45:40 -05:00
Paolo Bonzini fc661c35a2 interpreter: support for forcibly verbose logging of some tests
Add a new keyword argument to test() and benchmark(), completing the
implementation of the feature.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-02-01 09:05:26 +01:00
Andrea Pappacoda 7528c69fcc docs: find_program can return the current Python3 interpreter
This was the case since 067ff7eeae, i.e.
version 0.50.0. Fixes #3856
2022-01-29 22:17:48 -05:00
Dylan Baker 8b5c6ab8f1
docs: Add the `configuration` keyword argument to `configure_File`
We were missing the most important keyword argument of them all!
2021-12-08 14:41:24 -05:00
Pablo Correa Gómez 4f882ff8ec add install_symlink function
Allows installing symlinks directly from meson, which can
become useful in multiple scenarios. Current main use is to
help moving forward #9557
2021-12-01 13:59:54 -05:00
Dylan Baker c664d63ed1 docs: add missing argument documentation for run_command capture 2021-11-29 18:12:33 -08:00
Nirbheek Chauhan af5993fffd shared_module: Add soname when used as a link target
Emit a detailed deprecation warning that explains what to do instead.
Also add a unittest.

```
DEPRECATION: target prog links against shared module mymod, which is incorrect.
             This will be an error in the future, so please use shared_library() for mymod instead.
             If shared_module() was used for mymod because it has references to undefined symbols,
             use shared_libary() with `override_options: ['b_lundef=false']` instead.
```

Fixes https://github.com/mesonbuild/meson/issues/9492
2021-11-24 23:18:53 +05:30
rusty-snake 5af556e2b8 Fix markdown formating in find_program.yaml
fixes #9528
2021-11-05 21:03:44 +05:30
Volker Weißmann 2c079d855e Added warning if run_command is called without the check kwarg 2021-10-30 22:26:28 -04:00
Xavier Claessens 6298e29070 message: Allow bool
It has always been working even if not documented and there is no reason
to not accept it. However, change "True/False" to "true/false" to be
consistent with meson language.

Fixes: #9436
2021-10-26 10:59:13 -04:00
Hofer-Julian 939394ed31 Fix typos
"seperator" -> "separator"
2021-10-21 06:57:57 -04:00
Eli Schwartz 9b2bc0be6d
doc: fix yaml indentation typo that broke building the website 2021-10-08 17:42:10 -04:00
Eli Schwartz 108bd996ee
add install_emptydir function
This replaces the absolute hack of using

```
install_subdir('nonexisting', install_dir: 'share')
```

which requires you to make sure you don't accidentally or deliberately
have a completely different directory with the same name in your source
tree that is full of files you don't want installed. It also avoids
splitting the name in two and listing them in the wrong order.

You can also set the install mode of each directory component by listing
them one at a time in order, and in fact create nested structures at
all.

Fixes #1604
Properly fixes #2904
2021-10-08 14:35:00 -04:00
Daniel Mensinger 0b9c7b74be
docs: Update YAML docs after rebase 2021-10-03 12:19:46 +02:00
Daniel Mensinger af24d18842
docs: Added new static docs 2021-10-03 12:19:45 +02:00
Daniel Mensinger 4e1e98cc31
docs: added install_tag docs 2021-10-03 12:19:45 +02:00
Daniel Mensinger 6f78695f86
docs: added unset_variable() 2021-10-03 12:19:45 +02:00
Daniel Mensinger 2b482e39a9
docs: Add the YAML Reference manual 2021-10-03 11:46:34 +02:00