From de2daaa41ec6064181e6b9e73a34c32cd0008242 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 30 May 2023 05:51:23 +0200 Subject: Store dynamic group member types in depdb, use in clean --- libbuild2/build/script/parser.hxx | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'libbuild2/build/script/parser.hxx') diff --git a/libbuild2/build/script/parser.hxx b/libbuild2/build/script/parser.hxx index f975194..ce550fc 100644 --- a/libbuild2/build/script/parser.hxx +++ b/libbuild2/build/script/parser.hxx @@ -121,12 +121,20 @@ namespace build2 dd); } + struct dynamic_target + { + string type; // Target type name (absent if static member). + build2::path path; + }; + + using dynamic_targets = vector; + void execute_depdb_preamble_dyndep ( action a, const scope& base, target& t, environment& e, const script& s, runner& r, depdb& dd, - paths& dyn_targets, + dynamic_targets& dyn_targets, bool& update, timestamp mt, bool& deferred_failure) { exec_depdb_preamble ( @@ -162,11 +170,13 @@ namespace build2 environment& e, const script& s, runner& r, depdb& dd, bool& update, timestamp mt) { + // Dummies. + // // This is getting a bit ugly (we also don't really need to pass // depdb here). One day we will find a better way... // - paths dyn_targets; - bool deferred_failure; // Dymmy. + dynamic_targets dyn_targets; + bool deferred_failure; dyndep_byproduct v; exec_depdb_preamble ( @@ -228,7 +238,7 @@ namespace build2 environment&, const script&, runner&, lines_iterator begin, lines_iterator end, depdb&, - paths* dyn_targets = nullptr, + dynamic_targets* dyn_targets = nullptr, bool* update = nullptr, optional mt = nullopt, bool* deferred_failure = nullptr, @@ -241,7 +251,7 @@ namespace build2 size_t line_index, const location&, action, const scope& base, target&, depdb&, - paths& dyn_targets, + dynamic_targets& dyn_targets, bool& update, timestamp, bool& deferred_failure, -- cgit v1.1