diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-01-04 14:56:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-01-06 07:24:42 +0200 |
commit | b236b111e52d08245d9bc1caadd6b78f7723f42c (patch) | |
tree | 35464e35cd43c4613918e8929b2085892a7baa93 /libbuild2/build/script/parser.hxx | |
parent | 6a242a8050edd0a33ea0e770a6eca4823a98b8d1 (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/build/script/parser.hxx')
-rw-r--r-- | libbuild2/build/script/parser.hxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libbuild2/build/script/parser.hxx b/libbuild2/build/script/parser.hxx index d6f88f4..362c834 100644 --- a/libbuild2/build/script/parser.hxx +++ b/libbuild2/build/script/parser.hxx @@ -117,14 +117,14 @@ namespace build2 execute_depdb_preamble_dyndep ( action a, const scope& base, file& t, environment& e, const script& s, runner& r, - depdb& dd, bool& update, bool& deferred_failure, timestamp mt) + depdb& dd, bool& update, timestamp mt, bool& deferred_failure) { exec_depdb_preamble ( a, base, t, e, s, r, s.depdb_preamble.begin () + *s.depdb_dyndep, s.depdb_preamble.end (), - dd, &update, &deferred_failure, mt); + dd, &update, mt, &deferred_failure); } // This version doesn't actually execute the depdb-dyndep builtin (but @@ -150,13 +150,12 @@ namespace build2 execute_depdb_preamble_dyndep_byproduct ( action a, const scope& base, const file& t, environment& e, const script& s, runner& r, - depdb& dd) + depdb& dd, bool& update, timestamp mt) { - // This is getting really ugly (we also don't really need to pass + // This is getting a bit ugly (we also don't really need to pass // depdb here). One day we will find a better way... // - bool update, deferred_failure; // Dymmy. - timestamp mt; // Dummy. + bool deferred_failure; // Dymmy. dyndep_byproduct v; exec_depdb_preamble ( @@ -164,7 +163,7 @@ namespace build2 e, s, r, s.depdb_preamble.begin () + *s.depdb_dyndep, s.depdb_preamble.end (), - dd, &update, &deferred_failure, mt, &v); + dd, &update, mt, &deferred_failure, &v); return v; } @@ -206,8 +205,8 @@ namespace build2 lines_iterator begin, lines_iterator end, depdb&, bool* update = nullptr, - bool* deferred_failure = nullptr, optional<timestamp> mt = nullopt, + bool* deferred_failure = nullptr, dyndep_byproduct* = nullptr); void @@ -216,8 +215,8 @@ namespace build2 action, const scope& base, file&, depdb&, bool& update, - bool& deferred_failure, timestamp, + bool& deferred_failure, dyndep_byproduct*); // Helpers. |