Commit Graph

1366 Commits

Author SHA1 Message Date
Daniel Mensinger 08f29c1812 docs: Add initial docs for the Meson CI [skip ci] 2020-06-24 22:43:38 +03:00
Nirbheek Chauhan 83df219747 docs: Document string path building with examples
Also document that line continuation didn't work before 0.50.

90c9b868b2 fixed it.
2020-06-24 16:56:54 +00:00
Igor Raits d6c6b933c4 mcompile: Add --verbose mode
Closes: https://github.com/mesonbuild/meson/issues/7352
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-06-21 23:49:39 +03:00
Xavier Claessens e353b2e8d4 wrap: Add patch_directory support
Copy a tree instead of extracting an archive.

Closes: #7216
2020-06-21 23:39:12 +03:00
Tim-Philipp Müller 246e5437aa compiler: add 'force_align_arg_pointer' function attribute 2020-06-21 23:34:11 +03:00
Jussi Pakkanen da018da753
Merge pull request #7359 from dcbaker/submit/2020-06/sh4
Add SuperH SH-4 support
2020-06-21 23:11:22 +03:00
Michael Brockus 9168032403
Update Style-guide.md [skip ci] 2020-06-21 23:06:48 +03:00
Michael Brockus 3f1108c923
Update Creating-releases.md [skip ci] 2020-06-21 22:35:33 +03:00
Dylan Baker b384f82b9a envconfig: Add support SuperH SH-4
Fixes: #7358
2020-06-19 10:56:09 -07:00
Dylan Baker 348b0ef671 docs: Alphabetically sort the cpu_family reference table
It's close, but not quite. This should make it easier to read
2020-06-19 10:54:18 -07:00
Cyril Richard 189d3b0513
Update Users.md [skip ci]
Update Users.md with the add of Siril (www.siril.org) that is migrating from autotools to meson.
2020-06-19 17:32:18 +03:00
Jussi Pakkanen 1309b06183
Merge pull request #7196 from cconverse711/llvm-cov
coverage: llvm-cov support
2020-06-18 18:57:25 +03:00
TheQwertiest 96609da8d2 docs: replaced `ninja` with appropriate `meson` commands [skip ci] 2020-06-18 17:47:10 +03:00
Cary Converse a198e5d191 coverage: llvm-cov support 2020-06-17 23:02:50 -04:00
Michael f7b7514014 update Project-templates.md 2020-06-17 17:35:15 +03:00
Xavier Claessens 972cac13f4 doc: Fix missing --force-fallback-for documentation 2020-06-16 15:15:00 -04:00
Mathieu Duponchelle 20709af4d2 interpreter: add support for --force-fallback-for
This new command line option allows specifying dependencies for
which to force fallback.

See the documentation for more information

Fixes: #7218
2020-06-16 13:45:40 -04:00
Xavier Claessens 0b4cf5a844 gnome: Add fatal_warnings kwarg to generate_gir()
Fixes: #7130
2020-06-16 08:21:35 -04:00
laolux 0a583ac06a
Documentation, FAQ.md, generated_headers [skip ci] 2020-06-15 23:31:55 +03:00
TheQwertiest 399303b534
Added docs for all meson commands + corresponding unit test (#7217) 2020-06-15 11:20:20 +05:30
Jon Turney 3babaaaeec Tweak gnome.gtkdoc() documentation for clarity and grammar 2020-06-13 18:48:35 +00:00
John Ericson 58c2aeb5e4 [skip ci] docs: Bring up to date on options per machine
I tried to fix the docs when the stuff was added, but it turns out I
missed things, as noted in
https://github.com/mesonbuild/meson/issues/7284#issuecomment-641641177
2020-06-12 10:35:11 -07:00
坂本 貴史 5f8d89b707
docs: remove duplicated entry for gnome.generate_gir() documentation [skip ci]
The documentation of gnome.generate_gir() has duplicated entry for
dependencies parameter. As a fix, this patch removes the entry added
recently.

Fixes: 893d101fff ("gnome: Add header kwarg to generate_gir()")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2020-06-12 00:33:47 +03:00
Phillip Johnston 7fd22c9696
Correct argument typo in partial_dependnecy (#7300) [skip ci]
Should be "sources" not "source"

```
../meson.build:162: WARNING: Passed invalid keyword argument "source".
WARNING: This will become a hard error in the future.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/mesonmain.py", line 131, in run
    return options.run_func(options)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/msetup.py", line 245, in run
    app.generate()
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/msetup.py", line 159, in generate
    self._generate(env)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/msetup.py", line 192, in _generate
    intr.run()
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreter.py", line 4359, in run
    super().run()
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 465, in run
    self.evaluate_codeblock(self.ast, start=1)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 490, in evaluate_codeblock
    raise e
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 483, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 498, in evaluate_statement
    self.assignment(cur)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 1151, in assignment
    value = self.evaluate_statement(node.value)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 500, in evaluate_statement
    return self.method_call(cur)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 895, in method_call
    return obj.method_call(method_name, args, self.kwargs_string_keys(kwargs))
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 39, in method_call
    return method(args, kwargs)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 285, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 151, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 213, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreter.py", line 484, in partial_dependency_method
    pdep = self.held_object.get_partial_dependency(**kwargs)
TypeError: get_partial_dependency() got an unexpected keyword argument 'source'
FAILED: build.ninja
```
2020-06-11 10:06:57 -07:00
Kyrylo Polezhaiev 44aa64b6a0
docs/users: Add Le Machine Learning library [skip ci] 2020-06-08 22:00:27 +03:00
Jussi Pakkanen 801dc03070
Merge pull request #7245 from dankegel/response-files-when-needed-tidied
Make ninja backend only use response files when needed, on linux too
2020-06-08 00:33:46 +03:00
Dan Kegel 536c64b241 docs: add snippet about response file change 2020-06-05 14:15:32 -07:00
Daniel Mensinger ede2cd556c
cmake: added docs 2020-06-05 11:45:10 +02:00
Richard Brown 2e30afb23b Add libeconf to users.md
libeconf is now using meson as its primary/default build system, so we'd like to see ourselves on the meson users list .
2020-06-04 20:34:27 +02:00
Jussi Pakkanen f818d961e4 Add android to os list informally. Closes #6233. [skip ci] 2020-06-04 00:42:09 +03:00
Lisa White 5e3f9b4b06 [skip ci] mesonwrap docs: fix a broken link 2020-06-03 13:32:22 +01:00
Ebrahim Byagowi 647f19b5aa
docs/unit-tests: Show a test can have multiple suites [skip ci] 2020-06-02 20:39:18 +03:00
Lisa White fcbff1de7c [skip ci] mesonwrap docs
- Add ambiguous naming documentation.
- Update branch request documentation.
- Add mesonwrap token documentation.
- Update review guidelines.
2020-06-02 18:24:52 +01:00
Lisa White 6ecb716f9c [skip ci] mesonwrap docs: limit line length and remove trailing spaces 2020-06-02 18:24:52 +01:00
Jussi Pakkanen c61f75adbf
Merge pull request #6818 from mensinda/localPatch
Wrap: add local files support via *_filename
2020-05-27 23:42:30 +03:00
Soapux 228fd24ca4
docs: Fix typo in Release notes [skip ci] 2020-05-27 19:51:39 +03:00
Daniel Mensinger c9cd235af4 opts: added docs 2020-05-26 13:48:26 -04:00
p01arst0rm 91db25ac85 fixed typo 2020-05-24 13:18:10 +02:00
Daniel Mensinger 550a450324
ast: Add docs for --ast 2020-05-23 18:20:12 +02:00
Dylan Baker 29ef4478df compilers/d: Add b_ndebug support
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.

Fixes #7082
2020-05-20 14:20:26 -07:00
Dylan Baker af787874a8 pass exe_wrapper to test scripts through the environment
This adds a new MESON_EXE_WRAPPER environment variable containing the
string form of the exe_wrapper, if there is an exe_wrapper defined.

Fixes #4427
2020-05-18 13:53:58 -07:00
Jussi Pakkanen 751ea3df72
Merge pull request #7103 from dankegel/bug4027-rpath-remember
Let .pc files and LDFLAGS provide rpaths.
2020-05-18 23:17:34 +03:00
Dan Kegel ac8319add1 docs: add snippet documenting rpath behavior change 2020-05-16 20:51:37 +00:00
Dylan Baker 66f3ba9fd0 Docs: Make the suggested use for the not-found dependency better [skip ci] 2020-05-14 13:32:46 -07:00
Dylan Baker a63e36f7b1 interpreter: Rename has_exe_wrapper -> can_run_host_binaries
The implementation of this function has changed enough that the name
doesn't really reflect what it actually does. It basically returns true
unless you're cross compiling, need and exe_wrapper, and don't have one.

The original function remains but is marked as deprecated.

This makes one small change the meson source language, which is that it
defines that can_run_host_binaries will return true in build == host
compilation, which was the behavior that already existed. Previously
this was undefined in build == host compilation.
2020-05-14 11:04:51 -07:00
Dylan Baker 7ad8b5f221 docs: Add a Howto about the null dependency [skip ci] 2020-05-14 01:59:34 +03:00
Dylan Baker 85708facae
Merge pull request #6620 from jon-turney/test-output-check
Add a mechanism for validating meson output in tests
2020-05-13 11:32:28 -07:00
Xavier Claessens 245d659522 ConfigToolDependency: Don't fallback to system tool when cross compiling
The system tool is always the wrong thing to use and cause hard to debug
issues when trying to link system libraries with cross built binaries.

The ExternalDependency base class already had a method to deal with
this, used by PkgConfigDependency and QtBaseDependency, so it should
make things more consistent.
2020-05-11 18:02:37 -04:00
Jussi Pakkanen 630a003746 Add AVR to cpu families. Closes #7085. 2020-05-11 14:56:56 -07:00
Paolo Bonzini 7e15295018 rename unstable-kconfig to unstable-keyval
Discussions in #6524 have shown that there are various possible uses of the
kconfig module and even disagreements in the exact file format between
Python-based kconfiglib and the tools in Linux.  Instead of trying to
reconcile them, just rename the module to something less suggestive and
leave any policy to meson.build files.

In the future it may be possible to add some kind of parsing through
keyword arguments such as bool_true, quoted_strings, etc. and possibly
creation of key-value lists too.  For now, configuration_data objects
provide an easy way to access quoted strings.  Note that Kconfig stores
false as "absent" so it was already necessary to write "x.has_key('abc')"
rather than the more compact "x['abc']".  Therefore, having to use
configuration_data does not make things much more verbose.
2020-05-08 20:56:14 +03:00
Wenjian He a535ef6719 docs/Precompiled-headers: minor spell check. [skip ci]
a give target -> a given target
Proposed by #7081 .
2020-05-07 09:39:41 -07:00
Jussi Pakkanen 4ea7c6ee12
Merge pull request #7064 from dcbaker/gtest-protocol
Add support for Gtest as a test protocol
2020-05-06 23:57:44 +03:00
Dylan Baker dbe00dfe95 docs/unit-tests: Add information about output files 2020-05-04 11:33:19 -07:00
Dylan Baker bbbfccf0af docs: Reformat unit-tests to be ~80 characters per line 2020-05-04 11:33:19 -07:00
Dylan Baker 083c5f6357 Add native support for gtest tests
Gtest can output junit results with a command line switch. We can parse
this to get more detailed results than the returncode, and put those in
our own Junit output. We basically just throw away the top level
'testsuites' object, then fixup the names of the tests, and shove that
into our junit.
2020-05-04 11:33:19 -07:00
Jussi Pakkanen 9a6e79dc68
Merge pull request #7060 from dcbaker/install-script-targets
Allow meson.add_*_script to take additional types
2020-05-03 23:20:59 +03:00
Jussi Pakkanen f8a04f0f76
Merge pull request #6838 from dcbaker/link-language-in-libraries
Link language in libraries
2020-05-02 01:57:09 +03:00
Princeton Ferro 30c4a7744f docs/Users: add Vala Language Server
See https://github.com/benwaffle/vala-language-server
2020-05-01 21:37:14 +02:00
Flow-It a124624c0e
Document formal Meson grammar [skip ci]
* WIP: Document formal Meson grammar

* Various little fixes [skip ci]

1) Add missing logical_not_expr
2) 'in' and 'not in' are valid relational operators at least for dicts
3) dictionary keys can be expressions, but kwarg names cannot
4) typo logical_end_expression -> logical_and_expression
5) Make jump statements only allowed inside an iteration statement

* Rework EBNF style [skip ci]

As there is no good order for the productions, just go alphabetically.
The EBNF style was changed to match the one the Python lark project
uses, that is colons for productions and terminals enclosed in double
quotes.

* Add missing production for unary operators [skip ci]

* Add production for multiline strings [skip ci]

* Properly define terminal symbols [skip ci]

Depending on the EBNF flavor, regex can be used to describe the terminal
symbols. Lark allows this, and as it was mentioned as a possible user of
this grammar, let's follow its flavor here. Most regexes used are easily
human-readable, and we can always add comments to more complicated ones.

* Small changes to which expressions can be used where [skip ci]

Let the grammar be very general. The type system then has to check, that
the used expression really evaluates to the correct type. Even if we
know today that assignment expressions always evaluate to None (and can
therefore only be used as a toplevel expression in an expression
statement), this needn't be the case forever. So this way, the grammar
stays stable even if such changes were made.

* Rework function argument list production [skip ci]

* Be more verbose for production names [skip ci]

Rename expr -> expression, stmt -> statement, op -> operator, program ->
build_definition. Also adjust some list productions.

* Add paragraph about syntax stability promises [skip ci]
2020-05-01 22:02:17 +03:00
Jon Turney 1dee6c618d
Update test.json schema to add stdout
Update the test.json schema, adding the 'stdout' property.

Also amend the test.json schema so the presence of an unexpected
property on the root object causes a validation error.

v2:
Also add 'tools' property to json schema.
Amend the documentation not to use the word 'list' to describe a dict.
2020-04-30 20:49:43 +01:00
Jon Turney f867bfbce0
Add a mechanism for validating meson output in tests
Expected stdout lines must match lines from the actual stdout, in the
same order. Lines with match type 're' are regex matched.

v2:
Ignore comment lines in expected_stdout

v3:
Automatically adjust path separators for location in expected output

v4:
Put expected stdout in test.json, rather than a separate file
2020-04-30 20:41:29 +01:00
Dylan Baker 1bfeaadd6d Docs: Update link_language docs to explain when it should be used 2020-04-30 11:52:45 -07:00
Dylan Baker 81f35f1549 docs: Update documentation for add_*_script 2020-04-30 10:01:14 -07:00
Jussi Pakkanen 6e794c380b
Merge pull request #6911 from mensinda/ciBionic
ci: Add Ubuntu Bionic image
2020-04-29 18:23:23 +03:00
Brendan Simon 1cf7f40e85
Meson Cmake Wrapper unmaintained [skip ci]
The Meson CMake Wrapper project is currently unmaintained.
2020-04-28 21:29:03 -07:00
Daniel Mensinger 4a1f197743
tests: Add support for specifying tool requirements
Adds the `tools` section to `tests.json` to specify requirements
for the tools in the environment. All tests that fail at least
one tool requirements check are skipped.
2020-04-28 17:54:02 +02:00
Daniel Mensinger 4640f13faa
docs: Fix Contributing.md 2020-04-28 17:54:02 +02:00
Xavier Claessens 39a69d1fb0 find_program: Fixes when the program has been overridden by executable
- ExternalProgramHolder has path() method while CustomTargetHolder and
  BuildTargetHolder have full_path().
- The returned ExternalProgramHolder's path() method was broken, because
  build.Executable object has no get_path() method, it needs the
  backend.
- find_program('overridden_prog', version : '>=1.0') was broken because
  it needs to execute the exe that is not yet built. Now assume the
  program has the (sub)project version.
- If the version check fails, interpreter uses
  ExternalProgramHolder.get_name() for the error message but
  build.Executable does not implement get_name() method.
2020-04-28 01:39:56 +03:00
Daniel Mensinger 5e5895814f
wrap: Updated docs 2020-04-25 16:03:16 +02:00
Dylan Baker 7b7f93a09f mtest: Generate a JUnit xml result file
JUnit is pretty ubiquitous, lots of services and results viewers
understand it, in particular gitlab and jenkins know how to consume
JUnit xml. This means projects using CI services can have their test
results consumed automatically.

Fixes: #6972
2020-04-23 13:26:01 -07:00
Jussi Pakkanen 84f28fc3f1
Merge pull request #6816 from dcbaker/framework-matrix
project test junit schema + a few more uses
2020-04-21 00:37:34 +03:00
Dylan Baker 182f40d25a docs/cross-compilation: Note appropriate values for cpu_family [skip ci]
Also note that meson doesn't use `el` on the end of the cpu_family to
mark endianness, that the endian field needs to be set appropriately.
2020-04-21 00:05:12 +03:00
Michael b61e037e93 add introspect --buildsystem-files info [skip ci] 2020-04-20 19:30:05 +03:00
Dylan Baker e0c9259e79 Add a json schema for the test.json used in tests
This does a couple of nice things, one is that editors like vscode can
be configured to use this schema to provide auto completion and error
highlighting if invalid values are added or required values are missing.
It also allows us test that the format of the test matrix work in a unit
test, which I've added. It does require that the python jsonschema
package is installed.
2020-04-17 10:49:09 -07:00
Dylan Baker d4b537c895 docs/users: Update freedesktop users to point at gitlab [skip ci]
Rather than the legacy cgit
2020-04-17 18:15:13 +03:00
Dylan Baker 36f70c6845 docs: The X Test Suite uses meson [skip ci] 2020-04-17 18:15:13 +03:00
Jonas Møller 1d7d9c88e8
Corrected prefix path [skip ci]
Using meson version `0.53.2` prefix defaulted to `/usr/local`, not `/usr/local/` (not the trailing slash)
2020-04-14 23:22:08 +03:00
Xavier Claessens a6239d5100 wrap: Add fallback urls
It can happen that a server is temporaly down, tarballs often have
many mirrors available so we should be able to add at least one fallback
mirror in wrap files.
2020-04-13 13:29:33 +03:00
Jussi Pakkanen 6ebf674798 Remove alignment syntax not supported by hotdoc. Closes: #6954. [skip ci] 2020-04-13 00:28:50 +03:00
Jussi Pakkanen f695359e1d
Merge pull request #6958 from jon-turney/fix-name-prefix-explicit-default
Fix library(name_prefix: [])
2020-04-12 19:40:08 +03:00
Peter Hutterer 77dad3153d
docs: fix the docs for install_subdir's strip_directory [skip ci]
When set to **true** only the last component is used. And throw in two minor
grammatical fixes while we're there.
2020-04-11 22:49:52 +03:00
Jon Turney ba7b50a104
Refine documentation of default name_prefix
Refine documentation of the default name_prefix, so people don't get the
impression they can write logic which uses 'lib' as the default, when
they should be defaulting to '[]', to let us take care of the
complexities.
2020-04-11 19:58:11 +01:00
Vanadiae eb806b7286 References-tables.md: repair broken table
At https://mesonbuild.com/Reference-tables.html#compiler-and-linker-selection-variables, the table is broken and it seems that the only difference with other well-working tables on this page is the semi-column ":" that are present under Language.
2020-04-11 19:23:00 +02:00
Nirbheek Chauhan a7d08b9b9c docs: Update Using-with-Visual Studio
Very out of date instructions. We install `meson.exe` now and you
don't need to have `py` in PATH or use `/path/to/meson.py`.
2020-04-08 23:44:31 +03:00
Vedran Miletić e034ebd153 docs: Mention library command as well [skip ci] 2020-04-07 17:24:13 +03:00
Gerion Entrup 2cefe8fd41
docs: add LLVM tool section to dependencies [skip ci] 2020-04-04 13:36:03 +03:00
Vedran Miletić 4d06f93021 docs: Described library command in Build targets section [skip ci] 2020-04-01 20:38:20 +03:00
Michael Kuhn 7828f2c9c2 docs: Fix typo in pkgconfig description 2020-03-31 11:15:23 -04:00
Xavier Claessens 8603c3b445 dist: Add --no-tests option
It is not always needed to test generated tarballs, for example when
they are generated by CI that already does its own testing.
2020-03-29 21:12:34 +03:00
Jussi Pakkanen 15b0bd6e93 Update everything for new release. 2020-03-29 20:37:15 +03:00
Marc Herbert b2dc277c1e docs: why 'ninja test' depends on build_by_default targets [skip ci]
Fixes #1949
2020-03-28 01:01:01 +02:00
Dylan Baker 7fd42a5be4 docs: Add a new page with common cross/native file options [skip ci]
Rather than having two separate sections with duplicated information
lets just have one for the common settings, and only document sections
specific to each file in separately
2020-03-28 00:59:46 +02:00
Xavier Claessens 4d7ccd1399 Make werror per subproject option 2020-03-24 22:48:55 +02:00
Jussi Pakkanen 7924e5f9c2 Revert "Naturally use env vars a bit more to match Autoconf"
This reverts commit 097dfc085e.
2020-03-23 18:07:24 +02:00
John Ericson 097dfc085e Naturally use env vars a bit more to match Autoconf
PR #6363 made it so our interpretation of env vars no longer clashed
with Autoconf's: if both Meson and Autoconf would read and env var, both
would do the same things with the value they read.

However, there were still cases that autoconf would read an env var when
meson wouldn't:

 - Autoconf would use `CC` in cross builds too

 - Autoconf would use `CC_FOR_BUILD` in native builds too.

There's no reason Meson can't also do this--if native cross files
overwrite rather than replace env vars, cross files can also overwrite
rather than replace env vars.

Because variables like `CC` are so ubiquitous, and because ignoring them
in cross builds just makes those builds liable to break (and things more
complicated in general), we bring Meson's behavior in line with
Autoconf's.
2020-03-23 17:51:36 +02:00
John Ericson 3a4388e51d Fix legacy env var support with cross
Fix #3969
2020-03-23 17:51:36 +02:00
Jussi Pakkanen 9e5c881b06 Add property to disable compiler sanity checks during cross compilation. 2020-03-22 23:07:53 +02:00
Michael Brockus 0b42e817dd adding Meson-UI to IDE-integration.md [skip ci] 2020-03-21 20:09:08 +02:00
alanNz 7460292810 -Add xc16 and c2000 C,Cpp toolchain support 2020-03-21 00:47:24 +02:00
Dylan Baker 4120cdd01a docs: update MPI documentation with methods 2020-03-19 14:46:07 -07:00