diff options
Diffstat (limited to 'build2/target.hxx')
-rw-r--r-- | build2/target.hxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/build2/target.hxx b/build2/target.hxx index 418a8ea..906d92d 100644 --- a/build2/target.hxx +++ b/build2/target.hxx @@ -29,8 +29,10 @@ namespace build2 extern size_t current_on; // From <build/context>. - const target& - search (const target&, const prerequisite&); // From <build2/algorithm.hxx>. + // From <build2/algorithm.hxx>. + // + const target& search (const target&, const prerequisite&); + const target* search_existing (const prerequisite&); // Target state. // @@ -906,6 +908,14 @@ namespace build2 return target != nullptr ? target : prerequisite.target.load (mo); } + const target_type* + search_existing () const + { + return target != nullptr + ? target + : build2::search_existing (prerequisite); + } + // Return as a new prerequisite instance. // prerequisite_type |