Commit Graph

2246 Commits

Author SHA1 Message Date
Dylan Baker 8655287c56 docs: Add ld64.lld to linker reference table
I forgot to ask the original author to add this to the original MR
(#11243)
2023-01-10 15:12:19 -05:00
andy5995 25e73b6c9e Users.md: add slapt-get
@jaos please review
2023-01-04 19:49:36 -05:00
Luke Elliott d573db77bc clang-cl: supports /std:c++20 now.
See https://github.com/llvm/llvm-project/commit/a8f75d49
2023-01-04 09:47:13 -08:00
Paolo Bonzini 2c8c0f9586 document declare_dependency(object: ...) 2023-01-04 09:44:32 -08:00
Paolo Bonzini 8d2940024b allow passing generated objects in the "objects" keyword argument
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>
2023-01-04 09:44:32 -08:00
Eli Schwartz 0544ffabf1
add builtin option to install licenses
Unless `meson.install_dependency_manifest()` is explicitly used, this
will cause a default implied one to be installed.
2022-12-27 20:29:46 -05:00
Eli Schwartz 2fa0749175
add license_files kwarg to project
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-27 20:29:46 -05:00
Stephan Lachnit 1dce178022 docs: update IDE-integrations [skip-ci]
- change asabil.meson to vscode-meson
- remove unmaintained Meson-UI and Meson Cmake Wrapper
- remove note that Ecplise CDT support is experimental
2022-12-27 09:19:53 -05:00
Stephan Lachnit d3ad05e5e5 docs: add mmeson to IDE integrations [skip-ci] 2022-12-27 09:19:53 -05:00
Jussi Pakkanen a6d088ba3d Created release note page for 1.0.0. 2022-12-23 18:13:43 +02:00
Oliver Kraitschy c10a76fd95 Users.md: add i3 2022-12-22 18:05:12 +02:00
Paolo Bonzini 9e1baebb23 fix build_target(objects: ...) documentation
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-21 13:36:18 -08:00
Xavier Claessens a0b37a77ab doc: Add missing include_directories kwarg to compiler.preprocess()
Fixes: #11202
2022-12-21 08:31:30 -05:00
Amit D 2e54f772d3 Users.md: Add PostgreSQL 2022-12-19 12:28:37 -05:00
Eli Schwartz 57f91bb593
docs: clarify the semantics of the required: kwarg everywhere
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-14 18:59:26 -05:00
Eli Schwartz a910e1b971
docs: simplify the documentation on required kwarg for subproject
It's a clone of dependency() anyway.
2022-12-14 18:59:26 -05:00
Eli Schwartz a1de195d7d
docs: update description of supported functions for feature options
We support these for a couple more things now.
2022-12-14 18:59:26 -05:00
Andreas Deininger b249470a4c Fixing typos
Convert http to https in some links
2022-12-12 12:10:37 -05:00
Jussi Pakkanen 248c1d9bd5
Merge pull request #11071 from tristan957/java-module
Java module 1.0.0 updates
2022-12-12 01:12:23 +02:00
Ewout ter Hoeven 9c1bf2bf4c DOCS: Rust-module: Remove note about unstable API
Remove the note about the unstable API of the Rust module, since it's no longer unstable as of Meson 1.0.0.
2022-12-11 16:34:00 -05:00
Tristan Partin 2e600ef710
Rename java.generate_native_headers to java.native_headers
This follows the Meson naming scheme which typically leaves off a verb
like generate.
2022-12-11 14:50:26 -06:00
Tristan Partin b746e92f62
Remove java.generate_native_header
This API existed for 2 minor releases and was worthless for pretty much
every usecase.
2022-12-11 14:50:23 -06:00
Jussi Pakkanen dbb33aaf92
Merge pull request #11024 from dcbaker/submit/bindgen-dependencies
Add a `dependencies` keyword argument to bindgen
2022-12-11 00:09:27 +02:00
Xavier Claessens 17c0a7f76a doc: Add date in release notes 2022-12-09 23:38:26 +02:00
Jussi Pakkanen 2ec3fe7a4a
Merge pull request #10990 from xclaesse/devenv
devenv: various improvements
2022-12-09 15:26:06 +02:00
Xavier Claessens 09cbc53f57 devenv: Document recent changes 2022-12-07 11:59:07 -05:00
Marvin Scholz 85a58f12f0 interpreter: compiler: Allow array for the prefix kwarg 2022-12-06 10:59:00 -05:00
Angelo Haller cee7ecde3d docs: Add missing import to the windows module example. 2022-12-06 09:53:15 -05:00
Dylan Baker d49e6bc038 modules/rust: Add support for dependencies in bindgen
This is needed for cases where we need external C headers, which are
passed to clang.
2022-12-05 12:23:55 -08:00
Dylan Baker bb875280b6 modules/rust: Add support for string include_directories
Which we support for basically every other case, but not this one.
2022-12-05 15:20:09 -05:00
andy5995 1fc67456c0 Users.md:add aawordsearch project 2022-12-05 12:47:25 +02:00
Tony Finch 8a725589e7 docs: change old SourceForge link to GitHub
I accidentally followed a very old link and was briefly discombobulated.
To save other people from this mistake, use the current location
of the Meson repository, and tweak the surrounding text so it is
more clear that it was written nearly 10 years ago.

Signed-off-by: Tony Finch <dot@dotat.at>
2022-12-05 02:00:42 -05:00
Eli Schwartz fae24d86f5
docs: clarify prog.full_path even more
The previous description update was lacking an example of why
external_program cares about inter-target dependencies.
2022-11-30 20:19:56 -05:00
Eli Schwartz dcc50b9967
docs: clarify that prog.full_path has potentially valid uses
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-30 18:26:59 -05:00
David Robillard 81d7c24a59 Add warning_level=everything
Adds a new maximum warning level that is roughly equivalent to "all warnings".
This adds a way to use `/Wall` with MSVC (without the previous broken warning),
`-Weverything` with clang, and almost all general warnings in GCC with
strictness roughly equivalent to clang's `-Weverything`.

The GCC case must be implemented by meson since GCC doesn't provide a similar
option.  To avoid maintenance headaches for meson, this warning level is
defined objectively: all warnings are included except those that require
specific values or are specific to particular language revisions.  This warning
level is mainly intended for new code, and it is expected (nearly guaranteed)
that projects will need to add some suppressions to build cleanly with it.

More commonly, it's just a handy way to occasionally take a look at what
warnings are present with some compiler, in case anything interesting shows up
you might want to enable in general.

Since the warnings enabled at this level are inherently unstable with respect
to compiler versions, it is intended for use by developers and not to be set as
the default.
2022-11-27 16:50:48 -05:00
Eli Schwartz 9751c1fe61
add missing documentation for python installation default pure kwarg 2022-11-26 19:56:00 -05:00
David Robillard e85138fcc8 Fix various spelling errors
Found with codespell.
2022-11-24 15:17:23 -05:00
David Robillard c05b2ba231 Fix broken link in release notes 2022-11-24 16:01:33 +02:00
Eli Schwartz 0404ad5601
compilers: remove opinionated c++ warning flag
-Wnon-virtual-dtor is not what people think of as a standard warning
flag. It was previously removed from -Wall in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16190 on the grounds that
people didn't like it and were refusing to use -Wall at all because it
forced this warning. Instead, it is enabled by -Weffc++ which is
typically not enabled and even comes with GCC documentation warnings
stating that the standard library doesn't obey it, and you might need to
`grep -v` and filter out warnings. (!!!)

It doesn't fit into the typical semantics of Meson's warning_level
option, which usually aligns with compiler standard warning levels
rather than a niche ideological warning level.

It was originally added in commit 22af56e05a,
but without any specific rationale included, and has gone unquestioned
since then -- except by the Meson users who see it, assume there is a
finely crafted design behind it, and quietly opt out by rolling their own
warning options with `add_project_arguments('-Wall', ...)`.

Furthermore a GCC component maintainer for the C++ standard library
opened a Meson bug report specially to tell us that this warning flag is
a "dumb option" and "broken by design" and "doesn't warn about the right
thing anyway", thus it should not be used. This is a reasonably
authoritative source that maybe, just maybe, this flag... is too
opinionated to force upon Meson users without recourse. It's gone beyond
opinionated and into the realm of compiler vendors seem to think that
the state of the language would be better if the flag did not exist at
all, whether default or not.

Fixes #11096
2022-11-22 23:27:33 -05:00
Dylan Baker c642a7693e modules/rust: stabilize
Mesa is using the rust module in production, so we should stabilize
it.
2022-11-19 23:00:53 +02:00
Tristan Partin a2cac72d9b Change `unstable_external_project` to `unstable-external_project`
Apparently this is a misspelling even though it has been in the docs
since the creation of the module.
2022-11-15 19:33:32 -05:00
tastytea 8dfa55005e escape asterisk used for footnote
unescaped it's turned into a list item
2022-11-15 15:51:01 +02:00
Hagen Möbius 0bfe776132 Update Qt6-module.md
- qt5 -> qt6
- remove version information from when the Qt6 module was not a thing
- linked to dependency function
- highlight version information with *...* and placing it at the front of options or on new lines in text
- reformatted for shorter lines
2022-11-13 21:48:01 +02:00
Ralf Gommers 3646697892 Add a note on relocatable pkg-config files to reference manual. 2022-11-13 14:37:45 -05:00
Kleis Auke Wolthuizen e4538a0362 docs: installation tags for the GNOME module
PR #10826 adds a couple of missing installation tags for the GNOME
module, ensure we document these.
2022-11-13 11:16:37 -05:00
Guilherme Janczak 69dae6395d docs: improve ESL text, fix some English errors
Fixes:
- Incorrect, redundant, or overabundant usage of "just"
- Missing punctuation
- Missing "the"
- Parenthesized text far from what it describes

There are some subjective changes, I hope those aren't controversial.
2022-11-11 22:24:19 +02:00
Will Thompson f9328f7757 Fix typo in dependency() 'names' docstring [skip ci] 2022-11-11 11:52:28 -05:00
Guilherme Janczak 3336cc8b27 fix typo 2022-11-10 21:56:06 -05:00
Xavier Claessens 9463595b11 genrelnotes: Jump to version 1.0.0 2022-11-09 17:20:41 +02:00
Xavier Claessens a6db624aad Implement `in` operator on string 2022-11-06 17:22:00 +02:00
Jussi Pakkanen c1e9a0ea60 Generate release notes for 0.64. 2022-11-06 15:42:05 +02:00
Garrett D'Amore 535bd377b4 Document binary literals. 2022-11-02 17:23:07 -04:00
Elliott Sales de Andrade 8c5838bfea Add missing since annotations in docs
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-24 21:47:46 -04:00
Robert Cohn 1939e567d6 basic support for oneapi compilers 2022-10-24 18:55:22 +03:00
Xavier Claessens 942aea230f Add MASM compiler
ml and armasm are Microsoft's Macro Assembler, part of MSVC.
2022-10-24 14:52:13 +02:00
Elliott Sales de Andrade 9c4d6088b1 Accept disablers in summary values
They are commonly used as a replacement for a `dependency`, and not
accepting them in `summary` breaks the last example in [1] when used as
a value.

[1] https://mesonbuild.com/Disabler.html#disabling-parts-of-the-build
2022-10-24 11:17:18 +02:00
Xavier Claessens eb731cda75 Add missing doc for NASM language 2022-10-24 11:06:57 +02:00
Xavier Claessens d29ef2b128 Add yasm as fallback for nasm language 2022-10-24 11:06:57 +02:00
Xavier Claessens 01ee141339 Add NASM compiler 2022-10-24 11:06:57 +02:00
Jussi Pakkanen 4c2b64188d
Merge pull request #10916 from xclaesse/preprocess
Add cc.preprocess() method
2022-10-23 17:24:46 +03:00
Xavier Claessens d53486bf9c Add doc and release notes for cc.preprocess() 2022-10-23 12:21:46 +02:00
Elliott Sales de Andrade fa2585d0b3 Fix typos in docs 2022-10-23 03:06:39 +03:00
Zhao, Gang b98356e055 doc: Fix link 2022-10-22 13:18:07 +03:00
Tatsuyuki Ishi 673dca5c07 Add b_thinlto_cache for automatically configuring incremental ThinLTO 2022-10-13 04:18:13 -04:00
Xavier Claessens aaabd6224f Make `meson wrap update` command update all wraps in parallel
This moves the implementation into msubprojects because it has all the
infrastructure to update wraps in parallel while keeping "meson wrap"
UX.
2022-10-11 15:54:59 -04:00
Jussi Pakkanen 46acd6cd4a
Merge pull request #8941 from xclaesse/wrapdb
Automatically use WrapDB fallback
2022-10-10 22:17:00 +03:00
Xavier Claessens 8c3a87847e Document and test new WrapDB auto fallback 2022-10-10 12:47:32 -04:00
Tristan Partin 80b101443d Add BSD support to the JNISystemDependency
Supports all BSDs that Meson currently supports.

Fixes #10883
2022-10-09 16:47:47 +03:00
Jan Tojnar a590cfde0c compilers: Add optimization=plain option
https://github.com/mesonbuild/meson/pull/9287 changed the `optimization=0`
to pass `-O0` to the compiler. This change is reasonable by itself
but unfortunately, it breaks `buildtype=plain`, which promises
that “no extra build flags are used”.

`buildtype=plain` is important for distros like NixOS,
which manage compiler flags for optimization and hardening
themselves.

Let’s introduce a new optimization level that does nothing
and set it as the default for `buildtype=plain`.
2022-10-09 14:43:18 +03:00
Xavier Claessens 9fd5eb6056 doc: Add missing netrc release notes 2022-09-29 14:05:30 -04:00
Xavier Claessens 8e0bf28ba6 doc: Fix wayland release notes
The core_only kwarg got renamed to include_core_only.
2022-09-29 14:05:30 -04:00
Paolo Borelli a58ec322b3 gnome: add support for update-mime-database
Fixes https://github.com/mesonbuild/meson/issues/10865
2022-09-28 12:07:24 -04:00
Xavier Claessens 2a262d2936 Automatically tag systemtap files 2022-09-28 00:13:49 -04:00
Xavier Claessens a010274d4b Automaticall tag installed tests
It is common, at least in GNOME projects, to install tests. Files goes
into various locations, including:
- /usr/lib/x86_64-linux-gnu/installed-tests
- /usr/share/installed-tests
- /usr/libexec/installed-tests

It is safe to assume that everything that goes into a "installed-tests"
subdir should be tagged as "tests" by default.
2022-09-28 00:13:49 -04:00
Eli Schwartz 462759dd33
mtest: implement a maxfail option
This allows early exit of the project tests once a certain number of
failures are detected. For example `meson test --maxfail=1` will abort
as soon as a single test fails.

Currently running tests are marked as failed via INTERRUPT.

Resolves #9352
2022-09-23 16:10:32 -04:00
Xavier Claessens f4f8a39060 Add release notes snippet for new mconf behaviour 2022-09-22 11:29:03 -04:00
Eli Schwartz eb69fed2f6
python module: allow specifying the pure kwarg in the installation object
Fixes #10523
2022-09-19 21:13:37 -04:00
Eli Schwartz d924586bee
docs: note the automatic creation of gitignore in build directories 2022-09-14 18:53:53 -04:00
Dylan Baker 9a645c1c5a rust: Generate a rust-project.json file when rust targets are present
When at least one Rust target is present, we now generate a
rust-project.json file, which can be consumed by rust-analyzer. This is
placed in the build directory, and the editor must be configured to look
for this (as it is not a default search path).
2022-09-12 18:51:27 -04:00
Eli Schwartz c555724b49
docs: fix broken porting advice for intl dependency in release notes
See https://github.com/theimpossibleastronaut/rmw/pull/345#discussion_r967876201

The check for `.found()` implies the dependency lookup should be
optional, but the example didn't make it optional.
2022-09-12 15:16:38 -04:00
Xavier Claessens 1acccc862a doc: Recommend tags for libraries utilities
GLib installs a few executables that are not needed by applications that
use the glib libraries, but are used either by build systems or by user
scripts. Debian splits them into libglib2.0-dev-bin and libglib2.0-bin
packages. Another example is GStreamer tools (e.g. gst-launch-1.0) that
Debian packages separately in gstreamer1.0-tools.

It is common enough that Meson documentation should recommend a tag for
consistency across projects.
2022-09-09 18:24:18 -04:00
Mark Bolhuis a289e5416b modules/wayland: Change default value of include_core_only to true
The use of wayland-<client|server>.h is discouraged, therefore
change the default value of include_core_only to true.
2022-09-07 08:43:29 -04:00
Mark Bolhuis b6235a2e42 modules/wayland: Rename core_only to include_core_only
Rename the core_only option in scan_xml to include_core_only
to match the flag used by wayland-scanner.
2022-09-07 08:43:29 -04:00
Mark Bolhuis 25f838fd33 modules/wayland: Support --include-core-only
wayland-scanner can generate header files that only include
wayland-client-core.h using a flag.

Add a core_only option to scan_xml to support this use case.
2022-09-06 18:08:39 -04:00
Eli Schwartz 4f05f877fc
docs: make note of the path restriction on subdir()
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-08-29 12:09:52 -04:00
Eli Schwartz e8d42bd9a8
docs: mention in the native-file docs, the command line argument to use
We mention --cross-file in the relevant page, but the fact that
--native-file is the command line argument to use is mentioned nowhere
other than a couple of release notes and the --help text for meson
setup.

This should be described in the docs.
2022-08-29 12:09:52 -04:00
Thomas Lange d4733984e9 Users.md: Add Audacious 2022-08-27 23:18:58 -04:00
Eli Schwartz f8ebfdf7b1
install modes should not apply sticky bit to files
This is generally a bad idea, e.g. it causes OSError on freebsd.

It also gets ignored by solaris and thus causes unittest failures.

The proper solution is to simply reject any attempt to set this, and log a
warning.

The install_emptydir function does apply the mode as well, and since it
is a directory it actually does something. This is the only place where
we don't reset the mode.

Although install_subdir also installs directories, and in theory it
could set the mode as well, that would be a new feature. Also it doesn't
provide much granularity and has mixed semantics with files. Better to
let people use install_emptydir + install_subdir.

Fixes #5902
2022-08-23 21:07:00 -04:00
Dylan Baker 991baf56e9 modules/fs: Replace configure_file(copy:) with fs.copyfile
`configure_file` is both an extremely complicated implementation, and
a strange place for copying. It's a bit of a historical artifact, since
the fs module didn't yet exist. It makes more sense to move this to the
fs module and deprecate this `configure_file` version.

This new version works at build time rather than configure time, which
has the disadvantage it can't be passed to `run_command`, but with the
advantage that changes to the input don't require a full reconfigure.
2022-08-18 16:53:36 -04:00
Eli Schwartz 3c7ab542c0
deprecate running "meson builddir" without setup subcommand
This is ambiguous, if the build directory has the same name as a
subcommand then we end up running the subcommand. It also means we have
a hard time adding *new* subcommands, because if it is a popular name of
a build directory then suddenly scripts that try to set up a build
directory end up running a subcommand instead.

The fact that we support this at all is a legacy design. Back in the
day, the "meson" program was for setting up a build directory and all
other tools were their own entry points, e.g. `mesontest` or
`mesonconf`. Then in commit fa278f351f we
migrated to the subcommand mechanism. So, for backwards compatibility,
we made those tools print a warning and then invoke `meson <tool>`. We
also made the `meson` tool default to setup.

However, we only warned for the other tools whose entry points were
eventually deleted. We never warned for setup itself, we just continued
to silently default to setup if no tool was provided.

`meson setup` has worked since 0.42, which is 5 years old this week.
It's available essentially everywhere. No one needs to use the old
backwards-compatible invocation method, but it continues to drag down
our ability to innovate. Let's finally do what we should have done a
long time ago, and sunset it.
2022-08-16 17:40:03 -04:00
Eli Schwartz 25b0988d4e
docs: fix various references to "meson builddir"
This is wrong, it should use "meson setup builddir".
2022-08-16 16:18:18 -04:00
0xMRTT d141b85462 add AdwCustomizer 2022-08-12 21:56:24 +03:00
Gerion Entrup e5df70b8d3 documentation: extend custom_target install
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-31 07:50:26 -07:00
Eli Schwartz 5851c133a0
docs: add some function linkification in code snippets
Let people easily find the documentation for concepts we are trying to
teach.
2022-07-14 00:01:39 -04:00
Philip Withnall 69131e7242 docs: Suggest using depth=1 by default for wrap-git
It saves bandwidth and disk usage on downloaded subprojects, and people
very rarely need more than the single commit they’re using.

Add `depth=1` to the `[wrap-git]` examples in the rest of the
documentation, to make it more likely that people will copy-and-paste it
into their `.wrap` files.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-07-13 08:14:41 -07:00
Michael Davidsaver 34fcb00ec0 docs: add cross-file example 2022-07-11 22:46:58 +03:00
Eli Schwartz e7d87b6f58
implement the new preserve_path kwarg for install_data too
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-07-08 01:58:23 -04:00
Amit D 569521d5ec Users.md: Add SciPy 2022-07-07 11:44:42 -07:00
Amit D b88bec0ee8 Update Users.md 2022-07-04 23:59:39 -04:00
Amit D f1c507f302 Update Users.md 2022-07-04 18:22:41 +03:00
Jussi Pakkanen 9c6dab2cfd Finalize the release. 2022-07-03 17:39:59 +03:00
smowzy 51dad83d46 Users.md: remove wxFormBuilder
according to commit 8a3d1697c8
2022-07-02 00:12:01 +03:00
Eli Schwartz e06dd48ad2
docs: update various function references to be linkified 2022-06-29 20:33:35 -04:00
Eli Schwartz 4635fd5937
docs: fix broken link to structured sources
We used the wrong spelling for both the object and the function. Link to
both, once in the description and once in the example code.
2022-06-27 19:45:43 -04:00
Eli Schwartz 6cc1f26e55
docs: fix broken links in i18n modue
We want to talk about the kwargs to the custom_target() function, but
tried to link to custom_tgt instead, which is not a function. It is an
object, but this was the wrong reference method for a type.

We want the function anyway, so use that.
2022-06-27 19:43:39 -04:00
Eli Schwartz 21493fe5c6
docs: correctly classify module methods as a method, not a function 2022-06-27 18:29:48 -04:00
Eli Schwartz 8ef3909086
docs: grammar nit 2022-06-27 18:29:48 -04:00
Eli Schwartz 0960cd3c23
docs: encourage using the "setup" subcommand where appropriate 2022-06-27 18:29:48 -04:00
Eli Schwartz 5e445fd747
docs: fix confusing repetition
The end of the paragraph indicates that the options which support --foo
will be listed in the help text. The beginning of the paragraph seems to
suggest the same thing, except it doesn't distinguish between -Dfoo and
--foo style options.

The first mention is redundant and feels like the wrong part of the
paragraph to mention it anyway.
2022-06-27 18:29:48 -04:00
Eli Schwartz 4e43970752
docs: linkify some function references 2022-06-27 18:29:48 -04:00
Eli Schwartz 0be3532456 docs: fix yaml refman example of embedding links in a code comment
With the previous commit, we made this smartly detect when parentheses
are not needed. But the example was broken, because it doesn't follow
its own documented rules to use `[[#` syntax. Add the missing hash
character.
2022-06-27 17:07:33 +02:00
Eli Schwartz ad0c70bac1 docs: make the refman linkification slightly prettier for codeblocks
If we link to

```meson
[[#function]]('posarg')
```

then the ideal linkification would operate on "function" in the
formatted text:

```
function('posarg')
```

Instead, it operated on "function()" in the formatted text:

```
function()('posarg')
```

Fix this by detecting the next character after the reference, and
skipping the usual "automatically append the () for you" stage if it
already has that opening parenthesis.
2022-06-27 17:07:33 +02:00
Eli Schwartz a20523aa5f
docs: grammar and formatting nits 2022-06-21 16:29:30 -04:00
Eli Schwartz b72a5668c2
docs: remove incorrect information about nonexisting kwarg 2022-06-21 16:29:17 -04:00
CLanguagePurist 87b4b0d4e7
Update Unit-tests.md (#10515) 2022-06-21 21:49:12 +03:00
Eli Schwartz 22dcb692ad python module: implicitly add python dep to extensions
If there isn't a preexisting dependency on python, append one. It's
almost assuredly needed, so just do the right thing out of the box.
2022-06-19 21:44:17 +03:00
Xavier Claessens 807cbcb350 external-project: Add depends kwarg
The unit test was racy but surprisingly never failed on CI. The reason
is we need to ensure ninja build somelib.so before running `make` into
the external project.
2022-06-17 18:56:13 -04:00
Eli Schwartz b13a95c301
docs: d_module_versions has an undocumented ability to accept integers
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-17 14:33:02 -04:00
Eli Schwartz e99e55d0aa
docs: fix incorrect info for declare_dependency sources
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-06-17 14:33:01 -04:00
Eli Schwartz 41860f686f docs: ensure stable order of release notes
Merging snippets happens in arbitrary order -- whatever filesystem
globbing results in. This didn't matter too much when we ran it once at
release time and checked the resulting release notes into git. However,
now that we generate a temporary version of the release notes for
development versions, the order of the results will periodically change.

Sort the files before processing them in order to guarantee that
whatever order they are in, they stay that way.

As a side effect, it's now technically possible to guarantee an ordering
by judicious use of snippets naming.
2022-06-17 06:48:45 -04:00
Xavier Claessens ebfbaef7ee doc: Add meson.override_dependency() in external-project example 2022-06-16 09:18:24 -04:00
ff 4ad869cd84 fix typo in IndepthTutorial.md 2022-06-10 12:41:00 -07:00
Paweł Marczewski 9061c3a52d wrap: Add support for applying a list of patch files
Co-authored-by: Xavier Claessens <xavier.claessens@collabora.com>
2022-06-07 06:43:39 -04:00
Marco Trevisan (Treviño) 29c26d5b26 compilers: Add support for stand-alone leak sanitizer
Leak sanitizer can be enabled without the whole AddressSanitizer, this
can be done by passing -fsanitize=leak as documented at [1].

Meson doesn't support this, so add support for it.

[1] https://clang.llvm.org/docs/LeakSanitizer.html
2022-06-06 09:40:14 -07:00
Xavier Claessens 39ba552811 Add "in development" in release notes title
It was already written in the side menu, but better have it in the page
title too.
2022-06-01 21:52:45 -04:00
Eli Schwartz eec7b2c359
docs: fix incorrect link
When referring to the custom_target docs, we want to point to the docs
on the function, not the docs on the returned method.
2022-05-31 17:49:30 -04:00
Eli Schwartz c88a1dc55c
fix bug in i18n merge_file/itstool_join revealed by previous commit
Logically, i18n.merge_file cannot ever take a MULTI_OUTPUT_KW, but it
does take a CT_OUTPUT_KW-like interface.

Actually trying to pass multiple merge_file outputs causes the
msgfmthelper script to be entirely malformed in the arguments it
accepts, and treat the broken one like a --flag, then exit with argparse
errors.

Even if we somehow assumed that somehow it was designed to actually
allow this, msgfmt doesn't support conceptually passing multiple outputs
so that would be a msgfmt error instead of an error inside the guts of
`meson --internal msgfmthelper`.

Same logic applies again for the itstool command and the itstool
internal helper.

Catch this error at configuration time by using the single-output kwarg
form.

Likewise, it's totally nonsense to accept multiple install_dir or
install_tags, and ever since commit 11f9638035
the CustomTarget itself won't even check this.
2022-05-31 17:49:29 -04:00
Karl Linden 40c69630df Fix typo in documentation for add_*_arguments 2022-05-31 17:48:45 -04:00
Florian "sp1rit"​ ad8f24f232 Implement `preserve_path` for install_headers
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-30 18:03:01 -04:00
Guilherme Janczak 704cd1a79d remove repetition and stiff language 2022-05-26 20:48:47 -04:00
Guilherme Janczak 3c66be0c1d don't tell documentation contributors to skip CI
The CI correctly handles documentation changes automatically, it's no
longer necessary to do it by hand.
2022-05-26 20:47:39 -04:00
Xavier Claessens c88c1e7dba doc: Generate dev release notes 2022-05-24 20:19:46 +03:00
andy5995 5746469e45 Compiler-properties.md:link to compiler object page 2022-05-24 20:18:42 +03:00
Tristan Partin 8d918e0147 Add cc.has_function_attribute('sentinel') 2022-05-19 15:05:53 -04:00
Tristan Partin 5d438b6aed Add cc.has_function_attribute('section') 2022-05-19 15:05:53 -04:00
Adel Kara Slimane 459970b55f Update Creating-OSX-packages.md
Qt offers a tool to automatize most of what needs to be done regarding its libraries.
2022-05-16 20:45:30 +03:00
Eli Schwartz aa874ea0d0 python module: default extensions to hidden symbol visibility
python compiled extensions should never need to expose any symbol other
than PyInit_* which is declared with default visibility via
PyMODINIT_FUNC on supported compilers.

Thus, a reasonably sane default is to mark any other symbols as hidden,
while still respecting any manually specified visibility.

Gate this on the version of python itself, as not all versions decorate
PyMODINIT_FUNC properly.
2022-05-09 10:49:04 -04:00
Eli Schwartz 04c728a126 compilers/c++: Add MSVC option to make the __cplusplus define accurate
Otherwise it always returns the value for c++98, starting with MSVC 2017
15.7 or later. Earlier versions are not affected by this mis-feature.

See: https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-160

This was originally applied as 0b97d58548
but later reverted because it made the CI red. Try it again, now.

Original-patch-by: Dylan Baker <dylan@pnwbakers.com>
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2022-05-08 14:40:54 -04:00
Xavier Claessens f9200ca8f7 devenv: Set WINEPATH when cross compiling for Windows 2022-05-06 23:04:11 +03:00
Eli Schwartz 1e4d4fce22 coverage: be clever and detect config files for gcovr/lcov
gcovr will read this file anyway, but if it exists we don't need to
assume that the project wishes to exclude subprojects/ -- they can
determine that themselves.

Fixes #3287
Closes #9761

lcov doesn't read the config file by default, but we can do the smart
thing here.

Fixes #4628
2022-05-06 22:55:37 +03:00
Dudemanguy 557680f7d6 add prefer_static built-in option
By default, meson will try to look for shared libraries first before
static ones. In the meson.build itself, one can use the static keyword
to control if a static library will be tried first but there's no simple
way for an end user performing a build to switch back and forth at will.
Let's cover this usecase by adding an option that allows a user to
specify if they want dependency lookups to try static or shared
libraries first. The writer of the meson.build can manually specify the
static keyword where appropriate which will override the value of this
option.
2022-05-03 23:03:56 -04:00
Paolo Bonzini 3a960023d3 interpreter: new function add_project_dependencies()
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-03 02:00:29 -04:00
Remi Thebault d7e56f5ec9 complete documentation of declare_dependency 2022-05-02 23:06:38 +03:00
Remi Thebault 0f15bfb846 Fix wrong name in doc
The doc about declare_dependency states
d_module_features instead of d_module_versions
2022-05-02 23:06:38 +03:00
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
Peter Lesslie d771fc7d0b Add support for multiline f-strings
+ Extend the parser to recognize the multiline f-strings, which the
documentation already implies will work.

The syntax is like:
```
x = 'hello'
y = 'world'

msg = f'''This is a multiline string.

Sending a message: '@x@ @y@'
'''
```

which produces:
```
This is a multiline string.

Sending a message: 'hello world'

```

+ Added some f-string tests cases to "62 string arithmetic" to exercise
the new behavior.
2022-05-01 12:47:37 -04:00
Maple e201b87dd5
Some documentation fix (#10335)
* update sample image

* increase size so all text will be shown
2022-05-01 13:24:38 +03:00
Jussi Pakkanen bba588d8b0
Merge pull request #10039 from eli-schwartz/wayland-protocols-subproject-files
dependencies: allow get_variable to expose files from subprojects
2022-05-01 00:01:03 +03:00
Remi Thebault 69e15377ce add release snippet 2022-04-30 10:07:38 -04:00
Fini Jastrow c16fdaeeca linkers: Add support for mold linker
[why]
Support for the relatively new mold linker is missing. If someone wants
to use mold as linker `LDFLAGS="-B/path/to/mold"` has to be added instead
of the usual `CC_LD=mold meson ...` or `CXX_LD=mold meson ...`.

[how]
Allow `mold' as linker for clang and newer GCC versions (that versions
that have support).

The error message can be a bit off, because it is generic for all GNU
like compilers, but I guess that is ok. (i.e. 'mold' is not listed as
possible linker, even if it would be possible for the given compiler.)

[note]
GCC Version 12.0.1 is not sufficient to say `mold` is supported. The
expected release with support will be 12.1.0.
On the other hand people that use the un-released 12.0.1 will probably
have built it from trunk. Allowing 12.0.1 is helping bleeding edge
developers to use mold in Meson already now.

Fixes: #9072

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-04-30 10:06:22 -04:00
Eli Schwartz c181f2c70b
Add small note that get_variable can publicize its data files
Nothing elaborate, just laying down the ground rules for expected usage
and pointing out that it now works. The idea is not to give people
ideas, but to let projects which already have this use case, use it with
confidence.
2022-04-27 23:45:02 -04:00
Ferdinand Thiessen 6f156e8ddd gnome: Use 'doc' install_tag for gnome.yelp 2022-04-27 09:29:38 -04:00
Paolo Bonzini e4d9ba5c9e improve help for -Ddebug
"Debug" is not a very helpful help message.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-04-27 08:37:31 -04:00
Simon Arlott 660bfa6e7c docs: Remove deprecated meson.source_root() from localisation page example
Meson already supplies the same value
2022-04-24 06:57:43 -04:00
Xavier Claessens 3c8343b483 Allow deprecating an option for a new one 2022-04-21 14:18:29 -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
Fredrik Salomonsson 442fd7dc73 docs: Add documentation on pkgconfig.relocatable
- Documentation for the pkgconfig.relocatable module option in
Builtin-options. Gives an explanation on what it does, usefulness and
what error that can occur when using it.

- Add pkgconfig.relocatable release snippet. Similar to the
documentation in Builtin-options. Just a bit more brief.

- Add Pkgconfig to DataTests.test_builtin_options_documented in the
docs unit tests.
2022-04-19 17:35:08 -04:00
Peter Lesslie ab5ed4db09 Add note in docs that multiline f-strings are not supported
Companion to https://github.com/mesonbuild/meson/pull/10284
2022-04-15 11:08:22 -04:00
Eli Schwartz 19de032d20
docs: make upload target depend on building the docs
Manually running hotdoc's upload command does not guarantee the docs
have actually been built.
2022-04-14 18:37:04 -04:00
alex-tee 0176419bec Update Zrythm entry in Users.md
Fixed broken link and updated outdated description.
2022-04-12 14:48:25 -04:00
Daniel Mensinger 99f510a817 docs: YAML: Add `arg_flattening: false` where required 2022-04-07 17:16:26 -04:00
Daniel Mensinger f192ecd1ef docs: refman: Add `arg_flattening` support 2022-04-07 17:16:26 -04:00
Daniel Mensinger 0808ae1b3d docs: Document argument flattening 2022-04-07 17:16:26 -04:00
Daniel Mensinger 8e13e63fca docs: Fix [[true]] --> `true` 2022-04-07 17:16:26 -04:00
John Ericson 01a7aa0a4d Document and test env vars a bit better 2022-04-03 10:58:03 -07: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
Önder Görmez aa495ff758 Fix typo 2022-03-27 08:25:30 -04:00
Eli Schwartz d82d1b0d86
docs: add missing docs for new pkgconfig feature
Added in commit 6240920c21 and documented
in release notes but not in module docs.
2022-03-27 07:08:59 -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
Dylan Baker b5375eb90f docs/rust: fix markdown title
VSCode is perfectly happy with the trailing `---`, hotdoc only likes
`...` apparently.
2022-03-22 19:09:21 -04:00
Xavier Claessens 8867fb7999 interpreter: Make compiler options per-subproject 2022-03-22 17:20:48 -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
Jussi Pakkanen fb67adf3e6 Prepare the 0.62.0 release. 2022-03-21 23:24:01 +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
Eli Schwartz 68b8fbcf6d Revert "devenv: Set PYTHONPATH where we install python modules"
This reverts commit 79c6075b56.

# Conflicts:
#	docs/markdown/snippets/devenv.md
#	mesonbuild/modules/python.py
#	test cases/unit/91 devenv/test-devenv.py

PYTHONPATH cannot be reliably determined. The standard use case for
installing python modules with Meson is mixed pure sources (at least
`__init__.py`) and compiled extension_modules or configured files.
Unfortunately that doesn't actually work because python will not load
the same package hierarchy from two different directories, one a source
directory and one a (mandatory) out of tree build directory.

(It kind of can, but you need to do what this test case accidentally
stumbled upon, which is namespace packages. Namespace packages are a
very specific use case and you are NOT SUPPOSED to use them outside that
use case, so people are not going to use them just to circumvent Meson
devenv stuff as that would have negative install-time effects.)

Adding PYTHONPATH anyway will just lead to documentation commitments
which we cannot actually uphold, and confusing issues at time of use
because some imports *will* work... and some will *not*. The end result
will be a half-created tree of modules which just doesn't work together
at all, but because it partially works, users attempting to debug it
will spend time wondering why parts of it do import.

For any case where the automatic devenv would work correctly, it will
also work correctly to use `meson.add_devenv()` a single time, which is
very easy to manually get correct and doesn't provide any significant
value to automate.

In the long run, an uninstalled python package environment will require
"editable installs" support.
2022-03-15 11:22:59 +02:00
Jussi Pakkanen 69ade4f4cf
Merge pull request #9339 from dcbaker/submit/structured_sources
Structured Sources
2022-03-13 01:01:55 +02:00
Jussi Pakkanen 04ef7ec45d Add new env2mfile command. 2022-03-09 18:02:04 -05:00
Tristan Partin 2c03b2bb7f Move dataonly pkgconfig file to datadir/pkgconfig
dataonly files are architecture independent (lib vs lib64 for example).

Fixes #9902
2022-03-09 17:50:41 -05:00
Xavier Claessens eafb8a8e10 install: Add --strip option 2022-03-09 10:38:28 -05:00
Eli Schwartz 7cc4ca2cbb
Revert "Add new env2cross command."
This reverts commit e257a870fe.

The PR adding this command had infinitely hanging CI, and now that it is
merged to master we cannot get any CI on any PR to succeed.
2022-03-08 21:34:39 -05:00
Jussi Pakkanen e257a870fe Add new env2cross command. 2022-03-08 23:40:03 +02:00
Eli Schwartz 789f440f7c
docs: add forgotten documentation for the new openssl dependency 2022-03-07 22:51:40 -05:00
Dylan Baker d35f11fc08 docs: document the rust_crate_type build_target keyword 2022-03-07 18:35:31 -05:00
Dylan Baker c08b6e29d9 Add support for rust proc-macro crates 2022-03-07 18:35:31 -05:00
Dylan Baker ff4c283b3a docs: Add a document on using Rust in Meson
This is hardly complete, but it's a start.
2022-03-07 12:33:33 -08:00
Dylan Baker 9cf7a12561 docs: Add docs for structured_sources 2022-03-07 12:33:33 -08:00
Eli Schwartz 0f2f87a003
find_program: add a version() method to match the one for dependencies
It is often useful to check the found version of a program without
checking whether you can successfully find
`find_program('foo', required: false, version: '>=XXX')`
2022-03-06 19:41:21 -05:00
Eli Schwartz 8b573d7dc6
i18n.merge_file: do not disable in the absence of gettext tools
Disabling targets because the tools used to build them aren't available
is a pretty suspicious thing to do. Users who want this are probably, in
general, advised to check themselves whether it is possible to build
those targets with find_program(..., required: false)

The i18n.gettext() invocation is a bit unusual because the product of
running it is non-critical files, specifically, translation catalogs. If
users don't have the tools needed to build them, they may not be able to
use them either, because perhaps they have NLS disabled on their
platform or it's difficult to put it in the bootstrap path.

So, for this reason, it was made non-fatal and the message catalogs are
just not created, and the resulting build is still perfectly usable
*unless* you want to use it in another language, at which point it
"works" but the text is all inscrutable to the end user, and that's a
feature of the target platform.

That's an acceptable tradeoff for translation catalogs.

It is NOT an acceptable tradeoff for merge_file, which produces desktop
files or MIME database catalogs or other files which have crucial roles
to perform, without which the software in question simply doesn't work
at all. In such cases, this just fails to install crucial files, users
report bugs to the project in question, and the project adds
`find_program('xgettext')` to guarantee the hard error due to lack of
confidence in Meson.

Fixes #6165
Fixes #8436
2022-03-06 11:09:56 -05:00
Xavier Claessens e80a9c2cba wayland module: Allow building both client and server sides
- Change `scope` kwarg to `public` boolean default to false.
- Change `side`  kwarg to `client` and `server` booleans.
- Document returned values
- Aggregate in a single unit test because have lots of small tests
  increases CI time.

Fixes: #10040.
2022-03-06 06:31:43 -05:00
Darren Ng af9af219d8 [skip ci] fix syntax typo 2022-03-04 19:59:39 -08:00
Tristan Partin 498db2764c Add modules kwarg to JNI system dep
This allows someone to link against libjvm.so and libjawt.so.
2022-03-04 13:52:21 -05:00
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
Dylan Baker 9c7ddf59fe interpreterobjects: deprecated passing a number to configuration_data.set10
This is currently allowed, and is used in at least a few projects. It
was not intended to work or documented, but it does and since it is in
use a full deprecation period must be used. A warning has also been
added for values < 0, which have surprising behavior.
2022-01-18 17:53:29 -05:00
andy5995 5c7f3b5bb8 index.md:add link to GitHub Discussions section 2022-01-17 09:21:03 -05:00
Andy Alt d9dee508ae Subprojects.md:add single quotes around subproject and variable name 2022-01-16 02:04:37 +05:30
Eli Schwartz 96d0005744 gnome.genmarshal: restore the ability to pass sources as Files objects
It used to support:
- a single string
- an array of anything

And as long as CustomTarget supported it too, everything worked fine.
So, a `files('foo')` worked but a `files('foo')[0]` did not, which is
silly... and it's not exactly terrible to use files() here, the input is
literally a list of source files.

Fixes building gnome-terminal
Fixes #9827

Test updated by Nirbheek Chauhan <nirbheek@centricular.com>
2022-01-15 23:50:14 +05:30