From b236b111e52d08245d9bc1caadd6b78f7723f42c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 4 Jan 2022 14:56:56 +0200 Subject: 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. --- libbuild2/build/script/parser.hxx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'libbuild2/build/script/parser.hxx') 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 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. -- cgit v1.1