From d0385d4be5f6a483de2d6b1a506d576d08ed547a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Feb 2024 09:42:57 +0200 Subject: Add search_prerequisite*() variants of match_prerequisite*() versions --- libbuild2/algorithm.hxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libbuild2/algorithm.hxx') diff --git a/libbuild2/algorithm.hxx b/libbuild2/algorithm.hxx index 1c5b717..a4feaea 100644 --- a/libbuild2/algorithm.hxx +++ b/libbuild2/algorithm.hxx @@ -563,6 +563,19 @@ namespace build2 void match_prerequisites (action, target&, const match_search& = nullptr); + // As above but only do search. The match part can be performed later, for + // example, with the match_members() function below. The typical call + // sequence would be: + // + // inject_fsdir (a, t, false /* match */); + // search_prerequisite_members (a, t); // Potentially with filter. + // pattern->apply_prerequisites (a, t, bs, me); // If ad hoc pattern. + // // Optional. + // match_members (a, t, t.prerequisite_targets[a]); + // + void + search_prerequisites (action, target&, const match_search& = nullptr); + // As above but go into group members. // // Note that if we are cleaning, this function doesn't go into group @@ -578,14 +591,24 @@ namespace build2 match_prerequisite_members (action, target&, const match_search_member& = nullptr); + void + search_prerequisite_members (action, target&, + const match_search_member& = nullptr); + // As above but omit prerequisites that are not in the specified scope. // void match_prerequisites (action, target&, const scope&); void + search_prerequisites (action, target&, const scope&); + + void match_prerequisite_members (action, target&, const scope&); + void + search_prerequisite_members (action, target&, const scope&); + // Match (already searched) members of a group or similar prerequisite-like // dependencies. Similar in semantics to match_prerequisites(). Any marked // target pointers are skipped. -- cgit v1.1