Commit Graph

1579 Commits

Author SHA1 Message Date
andy5995 07e6e0ca8c markdown/Dependencies:remove tabs
Remove tabs introduced by https://github.com/mesonbuild/meson/pull/8866
2021-06-10 21:15:41 -04:00
Andy Alt 53e4ca2456 add example for defining curses preprocessor symbols 2021-06-11 01:03:34 +03:00
Xavier Claessens 8255100485
doc: Add direct link to matrix channel (#8859) [skip ci] 2021-06-09 10:15:04 -07:00
Dylan Baker a7357887c7 docs: fix issues with the cython docs 2021-06-08 20:21:48 -07:00
Eli Schwartz ed19eb2443
document the enhancement to the Fs module permitting File arguments
Add a release notes snippet too!
2021-06-08 16:52:48 -04:00
Xavier Claessens f2b678ef68
doc: Fix link to Commands.md 2021-06-08 11:02:56 -04:00
Jussi Pakkanen a4a61b6bf8
Merge pull request #8512 from bonzini/feature-methods
Utility methods for feature objects
2021-06-08 12:37:25 +03:00
Paolo Bonzini a87e32d181 interpreter: add feature.disable_auto_if()
Add a method to downgrade an option to disabled if it is not used.
This is useful to avoid unnecessary search for dependencies;
for example

    dep = dependency('dep', required: get_option('feature').disable_auto_if(not foo))

can be used instead of the more verbose and complex

    if get_option('feature').auto() and not foo then
      dep = dependency('', required: false)
    else
      dep = dependency('dep', required: get_option('feature'))
    endif

or to avoid unnecessary dependency searches:

  dep1 = dependency('dep1', required: get_option('foo'))
  # dep2 is only used together with dep1
  dep2 = dependency('dep2', required: get_option('foo').disable_auto_if(not dep1.found()))
 ```

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-06-08 10:18:12 +02:00
Paolo Bonzini 2f2d99e1d8 interpreter: add feature.require()
Add a method to perform a logical AND on a feature object.  The method
also takes care of raising an error if 'enabled' is ANDed with false.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-06-08 10:18:12 +02:00
Dylan Baker 0cb05004ca docs: Add cython docs 2021-06-07 09:25:32 -07:00
Xavier Claessens 769fd50373 docs: Generate a table of all wrapdb releases
wrapdb CI will trigger Meson's CI to regenerate the list when
releases.json is updated.
2021-06-05 17:01:34 -04:00
Paolo Bonzini 08a8043f19 interpreter: add feature.allowed()
This method simplifies the conversion of Feature objects to booleans.
Often, one has to use the "not" operator in order to treat "auto"
and "enabled" the same way.

"allowed()" also works well in conjunction with the require method that
is introduced in the next patch.  For example,

  if get_option('foo').require(host_machine.system() == 'windows').allowed() then
    src += ['foo.c']
    config.set10('HAVE_FOO', 1)
  endif

can be used instead of

  if host_machine.system() != 'windows'
    if get_option('foo').enabled()
      error('...')
    endif
  endif
  if not get_option('foo').disabled() then
    src += ['foo.c']
    config.set10('HAVE_FOO', 1)
  endif

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-05-31 16:01:57 +02:00
Jussi Pakkanen b9b73b65a7 Update chat info. [skip ci] 2021-05-26 12:39:34 +03:00
Dylan Baker 17eb224aa7 interpreter: Automatically add 'c' to languages when 'vala' is used
This is so dumb, we can just insert C for you without you having to know
that you're using C under the hood. This is nicer because:
1) Meson doesn't make the user add a language they're not explicitly
   using
2) If there was ever an implementaiton of Vala that didn't use C as
   it's assembly language, this wouldn't make any sense.
2021-05-19 23:28:17 +03:00
Tim McNamara a6e9b54b1d doc: Fix array syntax [skip ci]
Adds a square bracket to create a valid array.
2021-05-18 19:12:17 -07:00
Xavier Claessens 69a5c950a3 pkgconfig: Do not escape custom variables
We need to escape space in variables that gets into cflags or libs
because otherwise we cannot split compiler args when paths contains
spaces. But custom variables are unlikely to be path that gets used in
cflags/libs, and escaping them cause regression in GStreamer that use
space as separator in a list variable.
2021-05-18 18:03:37 -04:00
Randy Yates d7cb58e57d add cpu family csky 2021-05-18 23:17:12 +03:00
Jussi Pakkanen 0b2a7300c0 Set up VS environment automatically when run. 2021-05-13 11:03:10 +03:00
Mehmet Ali Baykara 204abd0e85
little punctuation and add a phrase [skip ci]
Add the `second` to improve readability.
2021-05-13 10:56:50 +03:00
Xavier Claessens 44acefd836 doc: Add example how to use devenv
Fixes: #8758
2021-05-12 10:44:13 -04:00
Jussi Pakkanen c54dd63547 Make objective C use C standard version. Closes #5495. 2021-05-11 22:47:17 +03:00
Jussi Pakkanen 1ca8fa31ea Document how to run the wrap valídator. [skip ci] 2021-05-02 14:22:27 +03:00
Jussi Pakkanen 753954be86 Release 0.58.0. 2021-05-02 12:42:42 +03:00
Alexander Lyashuk cdc6c866ca
doc: update syntax description of immutability
"Stored by value" is more correct way to explain that example.

Mutable vs immutable means that you cannot mutate the value (e.g. list vs tuple in Python), and the example shows that `var2` is actually mutable.

Copying/storing a reference vs value is what what matters in the assignment, in Python `a=b` means `a` and `b` are references to the same list, while in meson `a=b` copies the value of `b` into `a`.
2021-04-28 00:39:56 -04:00
Jussi Pakkanen 959aac5a02 Add snippet about Xcode. [skip ci] 2021-04-26 23:39:15 +01:00
Xavier Claessens 3af39a463b Interpreter: Fallback when required is false but forcefallback is true 2021-04-26 17:04:57 +01:00
Tristan Partin b6d277c140 Add 'subprojects purge' command
This will help facilitate cache busting in certain situations, and
replaces hand-rolled solutions of writing a length command to remove
various files/folders within the subprojects directory.
2021-04-26 16:42:29 +03:00
Xavier Claessens 3c64ecaf86 pkgconfig: Add support for CustomTarget objects in generator
Fixes: #8618.
2021-04-19 17:57:34 +03:00
Peter Hutterer f6cd54cc40 docs: add the 'since' tag to string.replace 2021-04-15 08:21:53 -04:00
Simon Ser c1a8f00d78 docs: document default version for declare_dependency()
By default, the project version is picked.
2021-04-15 08:19:57 -04:00
Mateus Coutinho Marim a9d075aaf9
Adding translation to ptbr for getting meson. [skip ci] 2021-04-13 22:33:27 +03:00
Mateus Coutinho Marim ffdb0dfe6b
Update Users.md [skip ci] 2021-04-12 23:03:37 +03:00
Tristan Partin 4c13aa30a1 dependency: Add JDK system dependency
The JDK system dependency is important for detecting JDK include paths
that may be useful when developing a JNI interface.
2021-04-12 10:43:11 -07:00
Adam Jackson f67b8cb8f2
docs: Fix the description of static_library's additional arguments [skip ci] 2021-04-09 22:27:44 +03:00
Xavier Claessens 5440ce003b Add global_source/build_root() 2021-04-09 09:29:12 -07:00
Simon Ser 974e49fe0e docs: document bool to_int and to_string methods
This documents the bool methods to_int and to_string implemented in
[1].

[1]: a9e9b7c750/mesonbuild/interpreterbase.py (L1109)
2021-04-06 08:15:03 -04:00
Jussi Pakkanen 247d425a40 Add Chinese page to sitemap. [skip ci] 2021-04-06 00:11:39 +03:00
Chippy e67268d520
Add Chinese translation of the getting Meson page [skip ci]
* add zh

* I am learning Meson and there is not Meson Chinese manual.so I want to write a Chinese manual.
This is Getting-meson_zh.
2021-04-06 00:09:20 +03:00
Guilherme Janczak d1628b8bed docs: change duplicate "**.h" path to "**.c" [skip ci] 2021-03-30 10:58:09 -04:00
Jussi Pakkanen e80ff985fb Do not add custom target dir automatically when implicit false. 2021-03-29 18:57:34 +03:00
Xavier Claessens 1ad469342b msubprojects: wrap-file should be re-extracted with --reset
When using --reset we should guarantee that next reconfigure will pick
the latest code. For wrap-file we have no way to know if the revision
changed, so we have to delete the source tree and extract again.

It is unlikely that user has local changes in non-git subprojects, and
--reset is known to be dangerous.
2021-03-28 23:24:01 +03:00
Patryk Obara 1db49240c6
docs: Provide working instructions for scan-build [skip ci]
Replace `meson compile scan-build` with `ninja -C dir scan-build`,
because scan-build target does not work with `meson compile`.

Note about SCANBUILD env variable was not precise enough to describe how
to pass arguments to scan-build - provide an example to make it clear.

Fixes: #7644.
2021-03-28 21:16:08 +03:00
Jussi Pakkanen 268a78f0f4 Added some wrap review docs. [skip ci] 2021-03-27 15:12:28 +02:00
Diego Elio Pettenò 56c03e1517 docs: correct log upload paths.
SInce the build directory is `builddir/` it should be
`builddir/meson-logs/testlog.txt` to be uploaded.
2021-03-25 13:50:12 -04:00
Jussi Pakkanen 54767ab482
Merge pull request #8568 from dcbaker/submit/qt-dependency-factory
QT: use a proper dependency factory
2021-03-24 22:52:15 +02:00
Dylan Baker c211fea513 Refactor Qt Dependency into proper split classes with factories
Currently the Qt Dependencies still use the old "combined" method for
dependencies with multiple ways to be found. This is problematic as it
means that `get_variable()` and friends don't work, as the dependency
can't implement any of those methods. The correct solution is to make
use of multiple Dependency instances, and a factory to tie them
together. This does that.

To handle QMake, I've leveraged the existing config-tool mechanism,
which allows us to save a good deal of code, and use well tested code
instead of rolling more of our own code.

The one thing this doesn't do, but we probably should, is expose the
macOS ExtraFrameworks directly, instead of forcing them to be found
through QMake. That is a problem for another series, and someone who
cares more about macOS than I do.
2021-03-23 15:28:08 -07:00
Xavier Claessens a9e9b7c750
devenv: Set GI_TYPELIB_PATH and LD_LIBRARY_PATH (#8548) 2021-03-23 23:35:05 +02:00
Xavier Claessens 1be13710ad
environment(): Allow stacking append() and prepend() (#8547)
* environment(): Allow stacking append() and prepend()

* Update docs/markdown/Reference-manual.md

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
2021-03-23 17:48:17 +02:00
Jussi Pakkanen 9ab4dadef9 Remove -pipe from default list of args. Closes #8508. 2021-03-23 17:26:08 +02:00
HRXN 9dc7abe697 Docs: Fix small typo 2021-03-21 12:26:54 -04:00