From c2001eb367b9b82e26689cad6f1f74f46c72b904 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Apr 2017 08:29:52 +0200 Subject: Pass target to prerequisite search --- build2/algorithm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'build2/algorithm') diff --git a/build2/algorithm b/build2/algorithm index 7325fac..da38f19 100644 --- a/build2/algorithm +++ b/build2/algorithm @@ -18,34 +18,35 @@ namespace build2 class prerequisite_key; // The default prerequisite search implementation. It first calls the - // target-type-specific search function. If that doesn't yeld anything, - // it creates a new target. + // prerequisite-type-specific search function. If that doesn't yeld + // anything, it creates a new target. // const target& - search (const prerequisite&); + search (const target&, const prerequisite&); // As above but specify the prerequisite to search as a key. // const target& - search (const prerequisite_key&); + search (const target&, const prerequisite_key&); // Uniform search interface for prerequisite/prerequisite_member. // inline const target& - search (const prerequisite_member& p) {return p.search ();} + search (const target& t, const prerequisite_member& p) {return p.search (t);} // As above but override the target type. Useful for searching for // target group members where we need to search for a different // target type. // const target& - search (const target_type&, const prerequisite_key&); + search (const target&, const target_type&, const prerequisite_key&); // As above but specify the prerequisite to search as individual key // components. Scope can be NULL if the directory is absolute. // const target& - search (const target_type& type, + search (const target&, + const target_type& type, const dir_path& dir, const dir_path& out, const string& name, @@ -57,7 +58,8 @@ namespace build2 // template const T& - search (const dir_path& dir, + search (const target&, + const dir_path& dir, const dir_path& out, const string& name, const string* ext = nullptr, @@ -68,7 +70,7 @@ namespace build2 // as the parser would and then searched based on this prerequisite. // const target& - search (name, const scope&); + search (const target&, name, const scope&); // As above but only search for an already existing target. Unlike the above // version, this one can be called during the execute phase. Return NULL for -- cgit v1.1