diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-03-08 05:17:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-03-08 05:17:19 +0200 |
commit | 6968ba7c1190016cda222337430bb1328757a3e5 (patch) | |
tree | 9ca6538a358ff37db679e074695b434499056ef6 | |
parent | c6a4d07f79c8167c86f4d64669c689852efcbd4c (diff) |
Add update=execute special value for cases where it's not default
-rw-r--r-- | libbuild2/adhoc-rule-buildscript.cxx | 2 | ||||
-rw-r--r-- | libbuild2/cc/link-rule.cxx | 2 | ||||
-rw-r--r-- | 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; |