From b259a318223370881d5244cc38ff8a7be58e2a3e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 3 Dec 2023 13:47:42 +0200 Subject: Reimplement search_existing() functions via target_type::search This allows us to automatically get the target type-specific behavior with regards to the out_only semantics (added in the previous commit) instead of passing it explicitly from each call site. --- libbuild2/target-type.hxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libbuild2/target-type.hxx') diff --git a/libbuild2/target-type.hxx b/libbuild2/target-type.hxx index a0fc5a2..c0a5571 100644 --- a/libbuild2/target-type.hxx +++ b/libbuild2/target-type.hxx @@ -93,7 +93,14 @@ namespace build2 // bool (*print) (ostream&, const target_key&, bool name_only); - const target* (*search) (const target&, const prerequisite_key&); + // Target type-specific prerequisite to target search. + // + // If passed target is NULL, then only search for an existing target (and + // which can be performed during execute, not only match). + // + const target* (*search) (context&, + const target*, + const prerequisite_key&); // Target type flags. // -- cgit v1.1