aboutsummaryrefslogtreecommitdiff
path: root/build/algorithm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/algorithm.cxx')
-rw-r--r--build/algorithm.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/build/algorithm.cxx b/build/algorithm.cxx
index a19db36..8893045 100644
--- a/build/algorithm.cxx
+++ b/build/algorithm.cxx
@@ -41,6 +41,20 @@ namespace build
return create_new_target (pk);
}
+ target&
+ search (name n, scope& s)
+ {
+ const string* e;
+ const target_type* tt (s.find_target_type (n, e));
+
+ if (tt == nullptr)
+ fail << "unknown target type " << n.type << " in name " << n;
+
+ n.dir.normalize ();
+
+ return search (*tt, move (n.dir), move (n.value), e, &s);
+ }
+
match_result_impl
match_impl (action a, target& t, bool apply)
{