aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/dyndep.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-01-04 14:56:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-01-06 07:24:42 +0200
commitb236b111e52d08245d9bc1caadd6b78f7723f42c (patch)
tree35464e35cd43c4613918e8929b2085892a7baa93 /libbuild2/dyndep.cxx
parent6a242a8050edd0a33ea0e770a6eca4823a98b8d1 (diff)
Add depdb-dyndep --update-{include,exclude} options
These options specify prerequisite targets/patterns to include/exclude (from the static prerequisite set) for update during match as part of dynamic dependency extraction (those excluded will be updated during execute). For example: depdb dyndep ... --update-exclude libue{hello-meta} ... depdb dyndep ... --update-exclude libue{*} ... depdb dyndep ... --update-include $moc --update-include hxx{*} ... The order in which these options are specified is significant with the first target/pattern that matches determining the result. If only the --update-include options are specified, then only the explicitly included prerequisites will be updated. Otherwise, all prerequisites that are not explicitly excluded will be updated. If none of these options is specified, then all the static prerequisites are updated during match. Note also that these options do not apply to ad hoc prerequisites which are always updated during match.
Diffstat (limited to 'libbuild2/dyndep.cxx')
-rw-r--r--libbuild2/dyndep.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/libbuild2/dyndep.cxx b/libbuild2/dyndep.cxx
index ed41e0a..92e8903 100644
--- a/libbuild2/dyndep.cxx
+++ b/libbuild2/dyndep.cxx
@@ -81,7 +81,8 @@ namespace build2
const file& pt,
timestamp mt,
bool f,
- bool ah)
+ bool adhoc,
+ uintptr_t data)
{
// Even if failing we still use try_match() in order to issue consistent
// (with other places) diagnostics (rather than the generic "not rule to
@@ -104,7 +105,7 @@ namespace build2
// Add to our prerequisite target list.
//
- t.prerequisite_targets[a].push_back (prerequisite_target (&pt, ah));
+ t.prerequisite_targets[a].emplace_back (&pt, adhoc, data);
return r;
}
@@ -114,7 +115,9 @@ namespace build2
action a, target& t,
const file& pt,
timestamp mt,
- bool f)
+ bool f,
+ bool adhoc,
+ uintptr_t data)
{
if (!try_match (a, pt).first)
{
@@ -140,7 +143,7 @@ namespace build2
// Add to our prerequisite target list.
//
- t.prerequisite_targets[a].push_back (&pt);
+ t.prerequisite_targets[a].emplace_back (&pt, adhoc, data);
return r;
}