From 6968ba7c1190016cda222337430bb1328757a3e5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 8 Mar 2022 05:17:19 +0200 Subject: Add update=execute special value for cases where it's not default --- libbuild2/adhoc-rule-buildscript.cxx | 2 +- libbuild2/cc/link-rule.cxx | 2 +- libbuild2/context.hxx | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libbuild2/adhoc-rule-buildscript.cxx b/libbuild2/adhoc-rule-buildscript.cxx index c4f8833..fa60556 100644 --- a/libbuild2/adhoc-rule-buildscript.cxx +++ b/libbuild2/adhoc-rule-buildscript.cxx @@ -368,7 +368,7 @@ namespace build2 if (a == perform_update_id) mask = 4; } - else if (v != "false" && v != "true") + else if (v != "false" && v != "true" && v != "execute") { fail << "unrecognized update variable value '" << v << "' specified for prerequisite " << p.prerequisite; diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index d90cd75..48e5ad8 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -959,7 +959,7 @@ namespace build2 update_match = um = true; } } - else if (v != "false" && v != "true") + else if (v != "false" && v != "true" && v != "execute") { fail << "unrecognized update variable value '" << v << "' specified for prerequisite " << p.prerequisite; diff --git a/libbuild2/context.hxx b/libbuild2/context.hxx index 1483eb3..ef628c9 100644 --- a/libbuild2/context.hxx +++ b/libbuild2/context.hxx @@ -441,8 +441,10 @@ namespace build2 // // Valid values are `true` and `false`. Additionally, some rules (and // potentially only for certain types of prerequisites) may support the - // `unmatch` (match but do not update, if possible) and `match` (update - // during match) values. Note that if unmatch is impossible, then the + // `unmatch` (match but do not update, if possible), `match` (update + // during match), and `execute` (update during execute, as is normally) + // values (the `execute` value may be useful if the rule has the `match` + // semantics by default). Note that if unmatch is impossible, then the // prerequisite is treated as ad hoc. // const variable* var_update; -- cgit v1.1