Commit Graph

1850 Commits

Author SHA1 Message Date
Remi Thebault 5e4ea9f0f4 add release snippet for declare_dependency 2022-03-03 08:42:56 -08:00
Remi Thebault 037fa77c64 Document D features in `declare_dependency` 2022-03-03 08:42:56 -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
Tristan Partin 96b2469544 Rename JDK system dep to JNI
JNI is a more apt name because it currently only supports the JNI. I
also believe that CMake uses the terminology JNI here as well.

JNI is currently the only way to interact with the JVM through native
code, but there is a project called "Project Panama" which aims to be
another way for native code to interact with the JVM.
2022-03-02 16:23:09 -05:00
Tristan Partin 18147b91ff Deprecate java.generate_native_header() in favor of java.generate_native_headers()
After implementing a much more extensive Java native module than what
currently exists in the tests, I found shortcomings.

1. You need to be able to pass multiple Java files.
2. Meson needs more information to better track the generated native
   headers.
3. Meson wasn't tracking the header files generated from inner classes.

This new function should fix all the issues the old function had with
room to grow should more functionality need to be added. What I
implemented here in this new function is essentially what I have done in
the Heterogeneous-Memory Storage Engine's Java bindings.
2022-03-01 13:18:50 -08:00
Xavier Claessens 6acfe48f32 Allow setting method/separator in environment() and meson.add_devenv() 2022-02-28 09:03:27 -05:00
Xavier Claessens 24f224777d devenv: Add --dump option
It prints all envorinmente variables that have been modified. Can be
used by shell scripts that wish to setup their environment themself.
2022-02-28 09:03:27 -05:00
Xavier Claessens 30cdb2a280 devenv: Setup GDB auto-load scripts
When the project instals GDB helper scripts, copy them into
meson-private directory with the right tree layout and write a .gdbinit
script to load them automatically.
2022-02-28 09:03:27 -05:00
Xavier Claessens 6fafeb13b3 devenv: Source bash completion scripts 2022-02-28 09:03:27 -05:00
Xavier Claessens 79c6075b56 devenv: Set PYTHONPATH where we install python modules 2022-02-28 09:03:27 -05:00
Xavier Claessens 7a926d8dff doc: Fix spelling developper->developer
Mistaken from French développeur.
2022-02-28 08:11:53 -05:00
Tristan Partin 80cb87e7b7 Change jar() default install dir
The previous install dir seemed incorrect when looking at various Linux
distributions.
2022-02-28 11:44:29 +02:00
Dudemanguy e7b8059f7b docs: correct the shaderc documentation
The documentation on how shaderc is checked in meson was quite behind.
Update it to mention that pkg-config is the default and preferred method
of checking. Also be specific about what order everything is checked in
since shaderc is confusing.
2022-02-28 00:23:14 -05:00
Mark Bolhuis 5a4177523e modules/wayland: Add unstable_wayland module 2022-02-27 14:33:33 -05:00
Andrea Pappacoda fcca265035 cmake: configure_package_config_file can now take a dict 2022-02-27 11:45:26 -05:00
Eli Schwartz 78945fb983
python module: add option to specify a python environment to install to
The default behavior of installing relative to prefix may be unexpected,
and is definitely wrong in many cases.

Give users control in order to specify that yes, they actually want to
install to a venv.

This is particularly useful for projects that use meson as a build
system for a python module, where *all* files shall be installed into
the python site-packages.
2022-02-22 22:22:16 -05:00
Stone Tickle e8e7fd98e2 add all supported arguments in docs for summary() 2022-02-20 14:24:05 +02:00
Eli Schwartz 00aa43d267
fix missing documentation for testsuite option in test.json
stdout line matching supports count since commit
66d62a224e to fail if certain output is
present (count: 0) but it was never documented in the contribution
guidelines.
2022-02-15 16:50:41 -05:00
Eli Schwartz 6240920c21
pkgconfig module: allow custom variables to reference builtin directories
Automatically generate additional variables and write them into the
generated pkg-config file.

This means projects no longer need to manually define the ones they
use, which is annoying for dataonly usages (it used to forbid setting
the base library-relevant "reserved" ones, and now allows it only for
dataonly. But it's bloat to manualy list them anyway).

It also fixes a regression in commit
248e6cf473 which caused libdir to not be
set, and to be unsettable, if the pkg-config file has no libraries but
uses the ${libdir} expansion in a custom variable. This could be
considered likely a case for dataonly, but it's not guaranteed.
2022-02-15 16:50:41 -05: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
andy5995 b1e6cc5553 implement 'dist --allow-dirty' flag
closes #9824
2022-02-10 21:23:20 -05:00
Alyssa Ross 755b2ab6da Contributing.md: fix typo 2022-02-10 13:08:05 -08: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
Daniel Mensinger 63870da449 cmake: Deprecate CMake <3.17 support 2022-02-03 11:25:59 -05:00
Daniel Mensinger 78619e2c40 cmake: Drop CMake server support and bump min. CMake to >= 3.14 2022-02-03 11:25:59 -05:00
Jussi Pakkanen 9a1a5c2b74
Merge pull request #9834 from bonzini/test-verbose-kwarg
New keyword argument `verbose` for tests and benchmarks
2022-02-02 20:25:55 +02:00
William Toohey b4d9b2551c Genericise TI compiler and add MSP430 support 2022-02-02 16:45:05 +02:00
Andrea Pappacoda 316cf3a717 cmake: add arch_independent kwarg
CMake's write_basic_package_version_file has supported since version 3.14
an ARCH_INDEPENDENT option that makes it skip its architecture check in
the Version file.

With this patch Meson now supports it as well, and the change is also
compatible with older CMake versions, as they will simply ignore the
option.

This also slightly changes the contents of the generated Version file
when arch_independent is not set: previously, the if() needed to skip
the arch check was always filled with an empty string, while CMake puts
"FALSE" (or "TRUE") in it. Now, that if() will always be filled with
either "False" or "True", better matching CMake's behaviour.
2022-02-01 23:48:17 -05:00
Eli Schwartz a45446b6e5
minstall: stop running ldconfig for the user
This was a nice idea in theory, but in practice it had various problems:

- On the only platform where ldconfig is expected to be run, it is
  really slow, even when the user uses a non-default prefix and ldconfig
  doesn't even have permission to run, nor can do anything useful due to
  ld.so.conf state
- On FreeBSD, it bricked the system: #9592
- On cross builds, it should not be used and broke installing, because
  ldconfig may not be runnable without binfmt + qemu: #9707
- it prints weird and confusing errors in the common "custom prefix"
  layout: #9241

Some of these problems can be or have been fixed. But it's a constant
source of footguns and complaints and for something that was originally
supposed to be just "it's the right thing to do anyway, so just do it
automatically" it is entirely too risky.

Ultimately I do not think there is justification for keeping this
feature in since it doesn't actually make everyone happy. Better for
users to decide whether they need this themselves.

This is anyways the case for cmake and autotools and generally any other
build system, so it should not be too intimidating...

Fixes #9721
2022-02-01 16:52:26 -05:00
Guillaume Quenneville 6c1bb02f13 Updated precompiled library documentation
Fix link, change wording
2022-02-01 16:34:00 -05:00
Andrew Krasavin b564e34221 new custom dependency lookup for libdl 2022-02-01 15:51:15 -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
Eli Schwartz 689504b860
gnome: add documentation for new kwargs
This was forgotten in commit bc8c938148 --
sorry!
2022-01-31 18:25:18 -05:00
Eli Schwartz 8d64853229
doc: fix regression that deleted all methods from the reference manual
Regressed in commit bfb12222c3.

This needs to iterate over all methods, process them, and add them to a
list. Instead, it deleted all methods, processed all remaining methods,
and appended them to the in-use iterator.

Use a second list, instead.

Fixes #9922
2022-01-31 18:21:31 -05:00
Stone Tickle bd1c464f59 print warning when using fastyaml loader 2022-01-31 18:40:40 +01:00
Stone Tickle b0d29dd6ad mention fastyaml loader in the docs 2022-01-31 18:40:40 +01:00
Stone Tickle f5ffb0a1e9 add --quiet option to genrefman 2022-01-31 18:40:40 +01:00
Stone Tickle bfb12222c3 add fastyaml loader 2022-01-31 18:40:40 +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
Arsen Arsenović 6f59a86cd7 docs: correct weakref typo in Reference-tables.md 2022-01-26 19:22:17 -05:00
Arsen Arsenović 57ce83b396 compilers/c_function_attributes: add retain
retain is a relatively young attribute which has proven itself useful
for working with --gc-sections -z start-stop-gc.
2022-01-26 19:22:17 -05:00
Tristan Partin ab924fc1de Add docs for JDK system dependency
For whatever reason, the original PR was merged without documentation.
2022-01-26 15:28:35 +02:00
Eli Schwartz dafc2cdb6b
docs: fix bad advice in the README
Do not recommend running the 'upload' target by default in order to
build the docs. That will fail with permission errors when trying to
push to a repo most people don't have commit access to, and if they did
have commit access it would be an even worse problem -- unpredictably
overwriting the main website without any guarantee it was generated from
the latest version of the docs!

Plus, it does not actually work. The first thing it does is spawn an
error message that required files do not exist, because the actual docs
were not, in fact, built. So they cannot be uploaded either.

The docs will build by default if you do not specify a non-default
target.

Fixes #9873
2022-01-25 02:05:03 -05:00
andy5995 a00ede432f Contributing.md:specify max line length for docs
I thought it would good to specify a general rule here so people can set
their line wrapping appropriately.

[skip ci]
2022-01-23 15:27:59 +02:00
andy5995 14d811f647 Subprojects.md:add extra detail
This adds a link
https://mesonbuild.com/Builtin-options.html#specifying-options-per-subproject
in two different places and provides an example for changing the default
options.

This info is partially based on a [recent
discussion](https://github.com/mesonbuild/meson/discussions/9830)
between me and @eli-schwartz

[skip ci]
2022-01-23 15:27:09 +02:00
andy5995 baff6bccac Subprojects.md:add link to is_subproject() 2022-01-23 01:40:23 -05:00
Eli Schwartz 603244b059
fix broken version annotations for the new itstool_join feature
It was not added in 0.61.0 as that was already released.
2022-01-22 22:11:32 -05:00
Jussi Pakkanen 4316b71017
Merge pull request #9742 from ximion/wip/itstool
i18n: Add support for joining XML localization via itstool
2022-01-22 01:01:29 +02:00
Matthias Klumpp 02fb0c3f8b i18n: Add support for joining XML localization via itstool 2022-01-21 22:26:17 +01:00