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/functions-name.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libbuild2/functions-name.cxx') diff --git a/libbuild2/functions-name.cxx b/libbuild2/functions-name.cxx index 7dddc3a..c11b4b5 100644 --- a/libbuild2/functions-name.cxx +++ b/libbuild2/functions-name.cxx @@ -45,6 +45,9 @@ namespace build2 const target& to_target (const scope& s, name&& n, name&& o) { + // Note: help the user out and search in both out and src like a + // prerequisite. + // if (const target* r = search_existing (n, s, o.dir)) return *r; -- cgit v1.1