summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2024-01-26 13:14:48 -0600
committerEli Schwartz <eschwartz93@gmail.com>2024-02-09 11:56:13 -0500
commitb08d531c022c427d2480e1c81a6676d9a85cd537 (patch)
tree142d4372a1d3c6413a63cecc5caf27a61dad1824
parent09c0803077b9887792b50520aa90bc30dc451f8c (diff)
downloadmeson-b08d531c022c427d2480e1c81a6676d9a85cd537.tar.gz
Document that alias_target accepts run_tgts since 0.60.0
This was implemented in dc51740e2cdee171ac6ebc7ed261e5c08730c9a9, but was not added to the documentation or marked as a new feature.
-rw-r--r--docs/yaml/functions/alias_target.yaml4
-rw-r--r--mesonbuild/interpreter/interpreter.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/yaml/functions/alias_target.yaml b/docs/yaml/functions/alias_target.yaml
index 22ffdfd98..bc14f84da 100644
--- a/docs/yaml/functions/alias_target.yaml
+++ b/docs/yaml/functions/alias_target.yaml
@@ -6,8 +6,8 @@ description: |
targets, this integrates with the selected backend. For instance, with
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
- are built. Dependencies can be any build target (e.g. return value of
- [[executable]], [[custom_target]], etc)
+ are built. Dependencies can be any build target. Since 0.60.0, this includes
+ [[@run_tgt]].
posargs:
target_name:
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index bee64aa94..deb3a9caf 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -2121,6 +2121,8 @@ class Interpreter(InterpreterBase, HoldableObject):
def func_alias_target(self, node: mparser.BaseNode, args: T.Tuple[str, T.List[build.Target]],
kwargs: 'TYPE_kwargs') -> build.AliasTarget:
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)
self.add_target(name, tg)
return tg