From 68a27c5bca208337f5749fe1959ac21c062b77fb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 30 Nov 2023 12:17:31 +0200 Subject: Search in src for existing prerequisites with unspecified out --- libbuild2/algorithm.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'libbuild2/algorithm.cxx') diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx index 1bb46d8..71bf134 100644 --- a/libbuild2/algorithm.cxx +++ b/libbuild2/algorithm.cxx @@ -96,7 +96,7 @@ namespace build2 { return pk.proj ? import_existing (ctx, pk) - : search_existing_target (ctx, pk); + : search_existing_target (ctx, pk, false /*out_only*/); // @@ TODO } const target& @@ -104,7 +104,7 @@ namespace build2 { assert (ctx.phase == run_phase::load || ctx.phase == run_phase::match); - if (const target* pt = search_existing_target (ctx, pk)) + if (const target* pt = search_existing_target (ctx, pk, true /*out_only*/)) return *pt; return create_new_target (ctx, pk); @@ -115,7 +115,7 @@ namespace build2 { assert (ctx.phase == run_phase::load || ctx.phase == run_phase::match); - if (const target* pt = search_existing_target (ctx, pk)) + if (const target* pt = search_existing_target (ctx, pk, true /*out_only*/)) return {const_cast (*pt), ulock ()}; return create_new_target_locked (ctx, pk); @@ -176,16 +176,12 @@ namespace build2 } bool q (cn.qualified ()); - - // @@ OUT: for now we assume the prerequisite's out is undetermined. - // Would need to pass a pair of names. - // prerequisite_key pk { n.proj, {tt, &n.dir, q ? &empty_dir_path : &out, &n.value, ext}, &s}; return q ? import_existing (s.ctx, pk) - : search_existing_target (s.ctx, pk); + : search_existing_target (s.ctx, pk, false /*out_only*/); // @@ TODO } const target* -- cgit v1.1