Commit Graph

113 Commits

Author SHA1 Message Date
0551a8847d zsh: fix help / descriptions
* --load-average
* --gdb-path
* description for install

Found by https://www.check-spelling.dev/

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-11 19:21:05 -04:00
01016fc554 syntax-highlighting: vim: fix mesonSpaceError
Fixes regression from 388fa6e776

Found by https://www.check-spelling.dev/

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-11 19:21:05 -04:00
4a014d1724 Add support for meson.options as a replacement for meson_options.txt
We will still try to load `meson_options.txt` if `meson.options` doesn't
exist. Because there are some advantages to using `meson.options` even
with older versions of meson (such as better text editor handling)
we will not warn about the existence of a `meson.options` file if a
`meson_options.txt` file or symlink also exists.

The name `meson.options` was picked instead of alternative proposals,
such as `meson_options.build` for a couple of reasons:

  1. meson.options is shorter
  2. While the syntax is the same, only the `option()` function may be
     called in meson.options, while, it may not be called in meson.build
  3. While the two files share a syntax and elementary types (strings,
     arrays, etc), they have different purposes: `meson.build` declares
     build targets, `meson.options` declares options. This is similar to
     the difference between C's `.c` and `.h` extensions.

As an implementation detail `Interpreter.option_file` has been removed,
as it is used exactly once, in the `project()` call to read the options,
and we can just calculate it there and not store it.

Fixes: #11176
2023-03-28 15:01:10 +03:00
99dfc988eb Use meson setup [options] in meson RPM macro
Fixes the following warning when building a rpm pkg using %meson macro:
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
2022-12-05 08:09:12 -05:00
020e16a2b5 completions: bash: add simple init competion
Populate the _meson-init() completion function.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2022-09-18 15:22:48 -04:00
3f86f19f95 completions: bash: define sub-commands as an array
Define subcommands as an array so that they can be reused for the
top-level sub-command completion.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2022-09-18 15:22:48 -04:00
24e97e1945 completions: bash: update meson sub-command list
Add all meson sub-commands to the autocompletion script.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2022-09-18 15:22:48 -04:00
f08c788f61 completions: bash: add missing functions
Add empty functions for all commands defined in the autocompletion script.
When these functions are not defined, bash raises the following error:

       $ meson init <TAB>-bash: _meson-init: command not found

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2022-09-18 15:22:48 -04:00
ebe14848e0 completions: bash: order function definitions like in help
Move _meson-introspect() to follow the command list defined at the top
of the script which follows the help message order.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2022-09-18 15:22:48 -04:00
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
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
cbc62e892a interpreter: add an implementation for structured_sources 2022-03-07 12:33:33 -08:00
b1e6cc5553 implement 'dist --allow-dirty' flag
closes #9824
2022-02-10 21:23:20 -05:00
db680a78d1 Drop emacs meson-mode
The one on MELPA is way more advanced: https://melpa.org/#/meson-mode
https://github.com/wentasah/meson-mode

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-02-04 20:59:10 +02:00
4f882ff8ec add install_symlink function
Allows installing symlinks directly from meson, which can
become useful in multiple scenarios. Current main use is to
help moving forward #9557
2021-12-01 13:59:54 -05:00
ace184fa45 syntax-highlighting: vim: whitespace fixes 2021-10-12 11:14:48 -04:00
4d363e463d syntax-highlighting: vim: improve the ftplugin
Add 'formatoptions' to improve comment formatting.

Set b:match_words.  See :help matchit

Set b:browsefilter. See :help browsefilter

Add 'expandtab' from the style guide and a meson_recommended_style
config variable to allow users to disable style-related settings.  This
is a defacto standard feature for ftplugins.
2021-10-12 11:14:48 -04:00
7cddf9a6db syntax-highlighting: vim: set b:undo_ftplugin
See :help undo_ftplugin for details.
2021-10-12 11:14:48 -04:00
462003f996 syntax-highlighting: vim: use Boolean highlight group for booleans 2021-10-12 11:14:48 -04:00
a0dc60f841 syntax-highlighting: vim: match octal and hexadecimal numbers 2021-10-12 11:14:48 -04:00
a5020857f3 Fix typos discovered by codespell 2021-10-10 16:12:25 -04:00
108bd996ee add install_emptydir function
This replaces the absolute hack of using

```
install_subdir('nonexisting', install_dir: 'share')
```

which requires you to make sure you don't accidentally or deliberately
have a completely different directory with the same name in your source
tree that is full of files you don't want installed. It also avoids
splitting the name in two and listing them in the wrong order.

You can also set the install mode of each directory component by listing
them one at a time in order, and in fact create nested structures at
all.

Fixes #1604
Properly fixes #2904
2021-10-08 14:35:00 -04:00
6512478d2f syntax-highlighting: vim: set b:undo_indent
The b:undo_indent variable gets executed to undo the effects of the
options set earlier in the file.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2021-09-30 00:26:25 +03:00
44e123dd90 test runner: add the ability to configure test.json for python paths
Adds new installed file types with @VAR@ substitution.
2021-08-18 17:58:30 -04:00
1dc13e9951 Add unset_variable()
This should be useful for helping to control variable scope within
Meson. CMake has something similar for controlling scope.
2021-08-16 14:05:13 -04:00
59d4f771d2 editorconfig: add setting to trim trailing whitespace
and clean up all outstanding issues

Skip 'test cases/common/141 special characters/meson.build' since it
intentionally uses trailing newlines.
2021-08-15 09:36:18 -04:00
c78e6cac80 Allow skip_* test.json keys at top-level or in matrix: 2021-07-07 20:08:12 +02:00
a2e44296c9 Add skip_on_os to test.json 2021-07-07 20:08:12 +02:00
7126fbaf81 Add skip_on_jobname to test.json
Plan to replace the hard-coded list of 'may be skipped' framework tests in
skippable() with annotations in test.json which record 'will be skipped
in these specific CI jobs'.

If the value of the MESON_CI_JOBNAME env var (an arbitrary string
expected to be unique for each CI configuration) contains any of the
strings in the `skip_on_jobname` key in test.json, the test is expected
to output MESON_SKIP_TEST.

Unexpected skips or runs are treated as an error.

Future work: Maybe we should add additional count categories 'unexpected
skip' and 'unexpected not skipped', rather than counting those as 'skipped'
and 'failed', respectively.
2021-07-07 20:08:12 +02:00
5da3557331 Fix test.json schema for 'matrix'
I'm not sure what the current schema is describing, but it's not doing
anything useful to validate 'matrix' entries, as I discover when I come
to add something to that.

'matrix' is a dict with possible keys 'options' and 'exclude'.
'options' is a dict with arbitrary keys, whose's values are arrays

Once we describe those dicts correctly, also fix that 'val' keys may be
string, boolean or null, and the corresponding 'exclude' keys may be
string or boolean.

v2:
Also allow 'val' and 'exclude' to be an array of strings.
2021-06-24 17:07:45 +01:00
81d2d559f1 Enforce all dicts with a fixed set of keys in test.json schema
Improve test.json schema to disallow arbitrary keys in all dicts which
have a defined set of keys (the 'installed', matrix 'options' and
'stdout' dicts).

Add 'count' and 'comment' keys to 'stdout' dict.
2021-06-23 13:09:17 +01:00
765aff5a42 coverage: Enable coverage reports 2021-06-22 21:05:11 +03:00
d433abf89c syntax-highlighting: vim: add myself as a maintainer
Add myself as a maintainer of these files since I'll be keeping them
in sync with the Vim repository.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2021-05-06 15:10:08 +03:00
0fbcebaca1 syntax-highlighting: vim: fix setting cpo
Since 'cpo' is global, use `set` instead of `setlocal`.

See: b66f0372cc11

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2021-05-06 15:10:08 +03:00
a45f939092 Add range() function
Fixes: #5026.
2021-03-16 20:50:16 -04:00
39ede12aa5 Fix misspells
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-13 12:53:10 -05:00
388fa6e776 vim: Drop backwards compatibility with Vim 5. 2020-11-03 21:06:22 +02:00
1b63dcc531 zsh: Add completions for meson compile 2020-09-23 12:34:24 -07:00
9f893384db zsh: add completions for subprojects 2020-09-23 12:24:19 -07:00
3afaa879ec zsh: add wrap completions
This is still missing completions for promote, but I can't figure out
how to find the wraps in subprojects that are not in the parent project
when those projects haven't been fetched yet.
2020-09-23 10:19:56 -07:00
f0db3d3750 zsh: add missing arguments to meson test completions
This also reorders the options internally to match the output of meson
test --help, which makes it easier to diff
2020-09-23 09:19:35 -07:00
c6f7588afa zsh: Add completions for meson init 2020-09-23 09:16:27 -07:00
a137cd0bfb zsh: Add completions for meson install 2020-09-23 09:02:32 -07:00
80af160036 zsh: add meson dist completions 2020-09-22 16:58:08 -07:00
ecefe45f8e zsh: Add ability to complete depedency paths
using , separated syntax
2020-09-22 16:58:08 -07:00
670bc63fda zsh: add missing options for meson introspect 2020-09-22 16:08:45 -07:00
f2572ea077 zsh: share common options between meson configure and meson setup 2020-09-22 16:07:09 -07:00
84d5233b5f zsh: Add missing options for meson setup 2020-09-22 16:01:50 -07:00
250c4463b4 zsh: remove binaries that are not longer installed 2020-09-22 16:01:34 -07:00
17439fa3e8 test: Add 'dir' support for installed files in test.json
This is useful for automatically generated docs (doxygen, hotdoc)
with a lot of generated files that may differ with different
versions of the generator.
2020-08-27 00:08:57 +00:00