aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/rule.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/rule.cxx')
-rw-r--r--libbuild2/rule.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/libbuild2/rule.cxx b/libbuild2/rule.cxx
index 5d456d5..0b401c2 100644
--- a/libbuild2/rule.cxx
+++ b/libbuild2/rule.cxx
@@ -219,7 +219,23 @@ namespace build2
//
inject_fsdir (a, t, true, false);
- match_prerequisites (a, t);
+ // Handle the alias match-only level.
+ //
+ match_search ms;
+ if (t.ctx.match_only && *t.ctx.match_only == match_only_level::alias)
+ {
+ ms = [] (action,
+ const target& t,
+ const prerequisite& p,
+ include_type i)
+ {
+ return prerequisite_target (
+ p.is_a<alias> () ? &search (t, p) : nullptr,
+ i);
+ };
+ }
+
+ match_prerequisites (a, t, ms);
return default_recipe;
}