aboutsummaryrefslogtreecommitdiff
path: root/build/algorithm.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-24 10:32:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-24 10:32:50 +0200
commitbb4f9e6498ba715911f83e0dc221a5b1b86baf51 (patch)
tree021007995d476770b6dced459a770712baa8ea72 /build/algorithm.cxx
parent3c57a25a4d6a80301ece82ab33f1394e34f8b873 (diff)
Further test module development
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)
{