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, 15 insertions, 3 deletions
diff --git a/libbuild2/rule.cxx b/libbuild2/rule.cxx
index fb769fd..f257b62 100644
--- a/libbuild2/rule.cxx
+++ b/libbuild2/rule.cxx
@@ -472,12 +472,24 @@ namespace build2
recipe adhoc_script_rule::
apply (action a, target& t) const
{
+ // If this is an outer operation (e.g., update-for-test), then delegate to
+ // the inner.
+ //
+ if (a.outer ())
+ {
+ match_inner (a, t);
+ return execute_inner;
+ }
+
// Derive file names for the target and its ad hoc group members, if any.
//
- for (target* m (&t); m != nullptr; m = m->adhoc_member)
+ if (a == perform_update_id || a == perform_clean_id)
{
- if (auto* p = m->is_a<path_target> ())
- p->derive_path ();
+ for (target* m (&t); m != nullptr; m = m->adhoc_member)
+ {
+ if (auto* p = m->is_a<path_target> ())
+ p->derive_path ();
+ }
}
// Inject dependency on the output directory.