Document that alias_target accepts run_tgts since 0.60.0
This was implemented in dc51740e2c
,
but was not added to the documentation or marked as a new feature.
This commit is contained in:
parent
09c0803077
commit
b08d531c02
|
@ -6,8 +6,8 @@ description: |
|
||||||
targets, this integrates with the selected backend. For instance, with
|
targets, this integrates with the selected backend. For instance, with
|
||||||
you can run it as `meson compile target_name`. This is a dummy target
|
you can run it as `meson compile target_name`. This is a dummy target
|
||||||
that does not execute any command, but ensures that all dependencies
|
that does not execute any command, but ensures that all dependencies
|
||||||
are built. Dependencies can be any build target (e.g. return value of
|
are built. Dependencies can be any build target. Since 0.60.0, this includes
|
||||||
[[executable]], [[custom_target]], etc)
|
[[@run_tgt]].
|
||||||
|
|
||||||
posargs:
|
posargs:
|
||||||
target_name:
|
target_name:
|
||||||
|
|
|
@ -2121,6 +2121,8 @@ class Interpreter(InterpreterBase, HoldableObject):
|
||||||
def func_alias_target(self, node: mparser.BaseNode, args: T.Tuple[str, T.List[build.Target]],
|
def func_alias_target(self, node: mparser.BaseNode, args: T.Tuple[str, T.List[build.Target]],
|
||||||
kwargs: 'TYPE_kwargs') -> build.AliasTarget:
|
kwargs: 'TYPE_kwargs') -> build.AliasTarget:
|
||||||
name, deps = args
|
name, deps = args
|
||||||
|
if any(isinstance(d, build.RunTarget) for d in deps):
|
||||||
|
FeatureNew.single_use('alias_target that depends on run_targets', '0.60.0', self.subproject)
|
||||||
tg = build.AliasTarget(name, deps, self.subdir, self.subproject, self.environment)
|
tg = build.AliasTarget(name, deps, self.subdir, self.subproject, self.environment)
|
||||||
self.add_target(name, tg)
|
self.add_target(name, tg)
|
||||||
return tg
|
return tg
|
||||||
|
|
Loading…
Reference in New Issue