aboutsummaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)AuthorFilesLines
2023-07-28docs: clarify what str.split doesEli Schwartz2-4/+8
The wording was a bit confusing and misled at least one person into thinking it behaved like `str.replace('c', '')` operating on the entire line. Tweak the wording to be more precise and avoid this confusion.
2023-07-26Fix install_data() default install pathDaniele Nicolodi1-0/+2
This fixes two issues in constructing the default installation path when install_dir is not specified: - inside a subproject, install_data() would construct the destination path using the parent project name instead than the current project name, - when specifying preserve_path, install_data() would construct the destination path omitting the project name. Fixes #11910.
2023-07-20docs: fix typo in previous commitEli Schwartz1-1/+1
2023-07-20interpreter: deprecate 'jar' value of build_target(target_type)Dylan Baker2-2/+13
Jar has a very low set of overlap with other target types, including that jar sources *must* be .java, and no other target allows .java sources. As such, the difficulty in crafting a useful `build_target` invocation that allows both `jar` and anything else is high, and the usefulness is dubious. Just use `jar()` directly instead. This depends on the changes to make all of the jar() specific keyword arguments be handled by typed_kwargs so that the deprecation messages are correct and consistent.
2023-07-18docs: improve formatting of the Rust modulePeter Hutterer1-17/+20
This brings the formatting more in line with other modules, in particular the headers do not include the full function signature for readability, keyword arguments are listed one-by-one, etc.
2023-07-18docs: fix typos and keyword markdown for the Rust module pagePeter Hutterer1-11/+11
Two typos and mark the keyword arguments with backticks so they render nicely.
2023-07-17Whoopsie, forgot to create the release notes.Jussi Pakkanen21-160/+188
2023-07-13Add import instructions for filesystem moduleMiroPalmu1-0/+8
2023-07-06Fix typo in Disabler.mdmeator1-1/+1
2023-07-04environment: separate illumos and Solaris kernels in MachinesDylan Baker1-1/+2
While both kernels are derived from the OpenSolaris project of Sun, they have diverged and code that works with one may not work with the other. As such, we should provide different values for them. This was requested by both Oracle and the illumos upstreams. Fixes: #11922
2023-06-28Experimental 'genvslite' WIP. (#11049)GertyP2-0/+32
* Capture all compile args from the first round of ninja backend generation for all languages used in building the targets so that these args, defines, and include paths can be applied to the .vcxproj's intellisense fields for all buildtypes/configurations. Solution generation is now set up for mutiple build configurations (buildtypes) when using '--genvslite'. All generated vcxprojs invoke the same high-level meson compile to build all targets; there's no selective target building (could add this later). Related to this, we skip pointlessly generating vcxprojs for targets that aren't buildable (BuildTarget-derived), which aren't of interest to the user anyway. When using --genvslite, no longer inject '<ProjectReference ...>' dependencies on which a generated .vcxproj depends because that imposes a forced visual studio build dependency, which we don't want, since we're essentially bypassing VS's build in favour of running 'meson compile ...'. When populating the vcxproj's shared intellisense defines, include paths, and compiler options fields, we choose the most frequent src file language, since this means more project src files can simply reference the project shared fields and fewer files of non-primary language types need to populate their full set of intellisense fields. This makes for smaller .vcxproj files. Paths for generated source/header/etc files, left alone, would be added to solution projects relative to the '..._vs' build directory, where they're never generated; they're generated under the respective '..._[debug/opt/release]' ninja build directories that correspond to the solution build configuration. Although VS doesn't allow conditional src/header listings in vcxprojs (at least not in a simple way that I'm aware of), we can ensure these generated sources get adjusted to at least reference locations under one of the concrete build directories (I've chosen '..._debug') under which they will be generated. Testing with --genvslite has revealed that, in some cases, the presence of 'c:\windows\system32;c:\windows' on the 'Path' environment variable (via the make-style project's ExecutablePath element) is critical to getting the 'meson compile ...' build to succeed. Not sure whether this is some 'find and guess' implicit defaults behaviour within meson or within the MSVC compiler that some projects may rely on. Feels weird but not sure of a better solution than forcibly adding these to the Path environment variable (the Executable Path property of the project). Added a new windows-only test to windowstests.py ('test_genvslite') to exercise the --genvslite option along with checking that the 'msbuild' command invokes the 'meson compile ...' of the build-type-appropriate-suffixed temporary build dir and checks expected program output. Check and report error if user specifies a non-ninja backend with a 'genvslite' setup, since that conflicts with the stated behaviour of genvslite. Also added this test case to 'WindowsTests.test_genvslite' I had problems tracking down some problematic environment variable behaviour, which appears to need a work-around. See further notes on VSINSTALLDIR, in windowstests.py, test_genvslite. 'meson setup --help' clearly states that positional arguments are ... [builddir] [sourcedir]. However, BasePlatformTests.init(...) was passing these in the order [sourcedir] [builddir]. This was producing failures, saying, "ERROR: Neither directory contains a build file meson.build." but when using the correct ordering, setup now succeeds. Changed regen, run_tests, and run_install utility projects to be simpler makefile projects instead, with commands to invoke the appropriate '...meson.py --internal regencheck ...' (or install/test) on the '[builddir]_[buildtype]' as appropriate for the curent VS configuration. Also, since the 'regen.vcxproj' utility didn't work correctly with '--genvslite' setup build dirs, and getting it to fully work would require more non-trivial intrusion into new parts of meson (i.e. '--internal regencheck', '--internal regenerate', and perhaps also 'setup --reconfigure'), for now, the REGEN project is replaced with a simpler, lighter-weight RECONFIGURE utility proj, which is unlinked from any solution build dependencies and which simply runs 'meson setup --reconfigure [builddir]_[buildtype] [srcdir]' on each of the ninja-backend build dirs for each buildtype. Yes, although this will enable the building/compiling to be correctly configured, it can leave the solution/vcxprojs stale and out-of-date, it's simple for the user to 'meson setup --genvslite ...' to fully regenerate an updated, correct solution again. However, I've noted this down as a 'fixme' to consider implementing the full regen behaviour for the genvslite case. * Review feedback changes - - Avoid use of 'captured_compile_args_per_buildtype_and_target' as an 'out' param. - Factored a little msetup.py, 'run(...)' macro/looping setup steps, for genvslite, out into a 'run_genvslite_setup' func. * Review feedback: Fixed missing spaces between multi-line strings. * 'backend_name' assignment gets immediately overwritten in 'genvslite' case so moved it into else/non-genvslite block. * Had to bump up 'test cases/unit/113 genvslites/...' up to 114; it collided with a newly added test dir again. * Changed validation of 'capture' and 'captured_compile_args_...' to use MesonBugException instead of MesonException. * Changed some function param and closing brace indentation.
2023-06-27modules/rust: Add a keyword argument to pass extra args to the rust compilerDylan Baker2-1/+6
This may be necessary to, for example, stop rustc complaining about unused functions
2023-06-27modules/rust: Add a machine file property for extra clang args with bindgenDylan Baker3-1/+18
It's currently impossible to inject extra clang arguments when using bindgen, which is problematic when cross compiling since you may need critical arguments like `--target=...`. Because such arguments must be passed after the `--` it's impossible to inject them currently without going to something like a wrapper script. Fixes: #11805
2023-06-27modules/rust: Add a `link_with` kwarg to the test methodDylan Baker2-1/+8
This was requested by Mesa, where a bunch of `declare_dependency` objects are being created as a workaround for the lack of this keyword
2023-06-27Added a little more useful info to 'link_whole' documentation, describing ↵Dan Hawson1-2/+4
the use of /LINKWHOLE with MSVC and the behaviour of re-exporting symbols of individual objects in a static library.
2023-06-25Add CppNorth talk.Jussi Pakkanen1-1/+5
2023-06-21rust: fix -C prefer-dynamic behaviorAlyssa Ross1-0/+8
I noticed when building a project that uses a proc macro that Meson passed -C prefer-dynamic for the executable, and not the proc macro, while cargo passed -C prefer-dynamic for the proc macro, but not for the executable. Meson's behavior broke setting -C panic=abort on the executable. As far as we can tell, because we explicitly pass each library path to rustc, the only thing -C prefer-dynamic affects in Meson is how the standard libraries are linked. Generally, one does not want the standard libraries to be dynamically linked, because if the Rust compiler is ever updated, anything linked against the old standard libraries will likely break, due to the lack of a stable Rust ABI. Therefore, I've reorganised Meson's behavior around the principle that the standard libraries should only be dynamically linked when Rust dynamic linking has already been opted into in some other way. The details of how this manifests are now explained in the documentation.
2023-06-21Clarify `environment` docs.Paolo Borelli1-3/+2
The object is not used only for tests, but also for `custom_target` etc.
2023-06-20doc: Dictionaries are ordered since Meson 0.62.0Xavier Claessens1-1/+2
This is a side effect of requiring Python >= 3.7 which itself guarantees dictionary order. This is now a Meson language guarantee as well which is required for passing default_options as dict and is generally expected by users.
2023-06-20interpreter: Accept more types in default_options dict valuesXavier Claessens4-4/+4
2023-06-20interpreter: allow default_options and override_options as a dictDylan Baker5-8/+19
2023-06-20add str.splitlines methodMartin Dørum2-0/+25
The new splitlines method on str is intended to replace usage of fs.read('whatever').strip().split('\n'). The problem with the .strip().split() approach is that it doesn't have a way to represent empty lists (an empty string becomes a list with one empty string, not an empty list), and it doesn't handle Windows-style line endings.
2023-06-19Add kernel and subsystem properties to machine objects.Jussi Pakkanen3-4/+57
2023-06-08Fix name of boost_includedir propertySébastien Villemot1-1/+1
2023-06-06Override find_program('meson')Tristan Partin2-0/+41
This override transparently upgrades anyone using it to this better functionality. Fixes #8511
2023-06-02docs: List vc++20 for cpp_stdNathan Kidd1-1/+1
vc++20 support was added in 012ec7d5b3379b035f1dd1369d74cafd26ff6ab0
2023-05-31mlog: use a hidden class for stateDylan Baker1-1/+1
This is a pretty common pattern in python (the standard library uses it a ton): A class is created, with a single private instance in the module, and then it's methods are exposed as public API. This removes the need for the global statement, and is generally a little easier to reason about thanks to encapsulation.
2023-05-26add refivar to users.mdNicholas Vinson1-0/+1
2023-05-26Update Users.mdNicholas Vinson1-2/+2
fix package ordering to so Q* and r* packages are in alphabetical order.
2023-05-25mtest: wildcard selectionCharles Brunet3-0/+36
Allow the use of wildcards (e.g. *) to match test names in `meson test`. Raise an error is given test name does not match any test. Optimize the search by looping through the list of tests only once.
2023-05-24repair install_mode support for uid/gid effectively everywhereEli Schwartz7-0/+21
We silently dropped all integer values to install_mode since the original implementation of doing this in KwargInfo, in commit 596c8d4af50d0e5a25ee0ee1e177e46b6c7ad22e. This happened because install_mode is supposed to convert False (exactly) to None, and otherwise pass all arguments in place. But a generator is homogeneous and attempting to do this correctly produced a mypy error that FileMode arguments were allowed to be ints -- well of course they are -- so that resulted in the convertor... treating ints like False instead, to make mypy happy. Fixes #11538
2023-05-23docs: gnome: mention that compile_resources adds dependencies by defaultPablo Correa Gómez1-0/+2
It is not very clear from the documentation that the dependencies in the resource file are added as default dependencies to the target.
2023-05-23docs: Fix some typos in feature option examplesNirbheek Chauhan1-2/+2
2023-05-21Allow generator.process(generator.process(...))Volker Weißmann1-0/+8
Fixes #1141
2023-05-09docs: mention additional python modules needed for buildingEli Schwartz2-0/+14
Also check that they are available in meson.build. Closes #11772
2023-05-09docs: make the man page installableEli Schwartz1-0/+2
Users now have the *option* to run the documentation build and use `meson install` to install man pages.
2023-05-09docs: add option to skip building HTML docsEli Schwartz2-33/+40
Reorder meson targets to handle those all at the end, and exit early if HTML documentation is disabled. This makes it possible to build just the manpage, without hotdoc installed.
2023-05-09docs: add meson option to use the unsafe loaderEli Schwartz2-1/+4
2023-05-09Enable fatal warnings in HotDoc when building website.Jussi Pakkanen1-0/+1
2023-05-08docs/prebuilt: fix sanity check logic in the exampleJoel Rosdahl1-1/+1
2023-05-06Initial support for Metrowerks AssemblerNomura1-0/+2
2023-05-03doc: Add link to argument detailsXavier Claessens2-3/+10
2023-05-03Visual studio: Generate vcxproj.filters files to adds filters to imitated ↵Renan Lavarec1-0/+4
directories to navigate more easily in the source files.
2023-05-02python module: add an automatic byte-compilation stepEli Schwartz2-0/+15
For all source `*.py` files installed via either py.install_sources() or an `install_dir: py.get_install_dir()`, produce `*.pyc` files at install time. Controllable via a module option.
2023-05-02Find python3.xx on windowsCharles Brunet2-1/+10
2023-04-26Add env kwarg to gnome.generate_gir().Volker Weißmann2-0/+6
Fixes #384
2023-04-24dependencies: allow to fallback on CMake to find the SDL2 libraryMatthieu Bouron1-3/+3
On Windows, the SDL2 library is generally provided with only CMake config files. This commit allows meson to fallback on CMake as a last resort to find the SDL2 library.
2023-04-24Initial support for Metrowerks C/C++ compilerNomura2-0/+9
2023-04-21rust: Add new `rust_dependency_map` target configurationSebastian Dröge2-0/+28
This allows changing the crate name with which a library ends up being available inside the Rust code, similar to cargo's dependency renaming feature or `extern crate foo as bar` inside Rust code.
2023-04-21docs: update the Rust bindgen docs to talk about assertionsDylan Baker1-0/+9
Since we now guarantee that Rust and C/C++ will have assertions both on or both off, we can give guidance about using `cfg(debug_assertions)` to wrap code using `#ifdef NDEBUG`.