Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions docs/markdown/Gnome-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,22 @@ typelib_target]`
Generates a marshal file using the `glib-genmarshal` tool. The first
argument is the basename of the output files.

* `extra_args`: (*Added 0.42.0*) additional command line arguments to
pass
* `depends` [](BuildTarget | CustomTarget | CustomTargetIndex):
passed directly to CustomTarget (*since 0.61.0*)
* `depend_files` [](str | File): Passed directly to CustomTarget (*since 0.61.0*)
* `extra_args`: (*Added 0.42.0*) additional command line arguments to pass
* `install_dir`: directory to install header to
* `install_header`: if true, install the generated header
* `install_dir`: directory to install header to
* `nostdinc`: if true, don't include the standard marshallers from
glib
* `internal`: if true, mark generated sources as internal to
`glib-genmarshal` (*Requires GLib 2.54*)
* `install_header`: if true, install the generated header
* `internal`: if true, mark generated sources as internal to `glib-genmarshal`
(*Requires GLib 2.54*)
* `nostdinc`: if true, don't include the standard marshallers from glib
* `prefix`: the prefix to use for symbols
* `skip_source`: if true, skip source location comments
* `stdinc`: if true, include the standard marshallers from glib
* `sources` []str *required*: List of string sources to consume
* `sources`: the list of sources to use as inputs
* `stdinc`: if true, include the standard marshallers from glib
* `valist_marshallers`: if true, generate va_list marshallers

*Added 0.35.0*
Expand All @@ -158,6 +162,7 @@ template with only minor tweaks, in which case the
Note that if you `#include` the generated header in any of the sources
for a build target, you must add the generated header to the build
target's list of sources to codify the dependency. This is true for

all generated sources, not just `mkenums`.

* `c_template`: template to use for generating the source
Expand Down
11 changes: 5 additions & 6 deletions mesonbuild/interpreter/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
NullSubprojectInterpreter,
)
from .type_checking import (
COMMAND_KW,
COMMAND_KW, CT_BUILD_ALWAYS, CT_BUILD_ALWAYS_STALE,
CT_BUILD_BY_DEFAULT,
CT_INPUT_KW,
CT_INSTALL_DIR_KW,
Expand Down Expand Up @@ -209,11 +209,10 @@ def dump_value(self, arr, list_sep, indent):
default='exitcode',
validator=in_set_validator({'exitcode', 'tap', 'gtest', 'rust'}),
since_values={'gtest': '0.55.0', 'rust': '0.57.0'}),
KwargInfo('depends', ContainerTypeInfo(list, (build.CustomTarget, build.BuildTarget)),
listify=True, default=[], since='0.46.0'),
KwargInfo('priority', int, default=0, since='0.52.0'),
# TODO: env needs reworks of the way the environment variable holder itself works probably
ENV_KW,
DEPENDS_KW.evolve(since='0.46.0'),
KwargInfo('suite', ContainerTypeInfo(list, str), listify=True, default=['']), # yes, a list of empty string
]

Expand Down Expand Up @@ -1706,6 +1705,8 @@ def func_subdir_done(self, node, args, kwargs):
@typed_kwargs(
'custom_target',
COMMAND_KW,
CT_BUILD_ALWAYS.evolve(deprecated='0.47.0'),
CT_BUILD_ALWAYS_STALE.evolve(since='0.47.0'),
CT_BUILD_BY_DEFAULT,
CT_INPUT_KW,
CT_INSTALL_DIR_KW,
Expand All @@ -1718,8 +1719,6 @@ def func_subdir_done(self, node, args, kwargs):
INSTALL_KW,
INSTALL_MODE_KW.evolve(since='0.47.0'),
OVERRIDE_OPTIONS_KW,
KwargInfo('build_always', (bool, type(None)), deprecated='0.47.0'),
KwargInfo('build_always_stale', (bool, type(None)), since='0.47.0'),
KwargInfo('feed', bool, default=False, since='0.59.0'),
KwargInfo('capture', bool, default=False),
KwargInfo('console', bool, default=False, since='0.48.0'),
Expand Down Expand Up @@ -1822,8 +1821,8 @@ def func_alias_target(self, node: mparser.BaseNode, args: T.Tuple[str, T.List[bu
KwargInfo('arguments', ContainerTypeInfo(list, str, allow_empty=False), required=True, listify=True),
KwargInfo('output', ContainerTypeInfo(list, str, allow_empty=False), required=True, listify=True),
DEPFILE_KW,
DEPENDS_KW,
KwargInfo('capture', bool, default=False, since='0.43.0'),
KwargInfo('depends', ContainerTypeInfo(list, (build.BuildTarget, build.CustomTarget)), default=[], listify=True),
)
def func_generator(self, node: mparser.FunctionNode,
args: T.Tuple[T.Union[build.Executable, ExternalProgram]],
Expand Down
6 changes: 6 additions & 0 deletions mesonbuild/interpreter/type_checking.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def _env_convertor(value: T.Union[EnvironmentVariables, T.List[str], T.List[T.Li
validator=lambda x: 'Depfile must be a plain filename with a subdirectory' if has_path_sep(x) else None
)

# TODO: CustomTargetIndex should be supported here as well
DEPENDS_KW: KwargInfo[T.List[T.Union[BuildTarget, CustomTarget]]] = KwargInfo(
'depends',
ContainerTypeInfo(list, (BuildTarget, CustomTarget)),
Expand Down Expand Up @@ -281,6 +282,11 @@ def _output_validator(outputs: T.List[str]) -> T.Optional[str]:

CT_BUILD_BY_DEFAULT: KwargInfo[T.Optional[bool]] = KwargInfo('build_by_default', (bool, type(None)), since='0.40.0')

CT_BUILD_ALWAYS: KwargInfo[T.Optional[bool]] = KwargInfo('build_always', (bool, NoneType))

CT_BUILD_ALWAYS_STALE: KwargInfo[T.Optional[bool]] = KwargInfo(
'build_always_stale', (bool, NoneType))

INCLUDE_DIRECTORIES: KwargInfo[T.List[T.Union[str, IncludeDirs]]] = KwargInfo(
'include_dirs',
ContainerTypeInfo(list, (str, IncludeDirs)),
Expand Down
Loading