aboutsummaryrefslogtreecommitdiff
path: root/build/algorithm.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-15 14:44:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-15 14:44:15 +0200
commit243da3993c138d33063f633aa3996a8a710ea396 (patch)
tree6d49a3f964f395773c06e258b6550a4d386fbec3 /build/algorithm.cxx
parent3c2bc8595e9d6cf6ff35079231c3aab474a38130 (diff)
Implement project-qualified names/prerequisites, two-stage import
Diffstat (limited to 'build/algorithm.cxx')
-rw-r--r--build/algorithm.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/algorithm.cxx b/build/algorithm.cxx
index 488bbb7..83a6510 100644
--- a/build/algorithm.cxx
+++ b/build/algorithm.cxx
@@ -15,6 +15,7 @@
#include <build/target>
#include <build/prerequisite>
#include <build/rule>
+#include <build/file> // import()
#include <build/search>
#include <build/context>
#include <build/utility>
@@ -28,6 +29,12 @@ namespace build
target&
search (const prerequisite_key& pk)
{
+ // If this is a project-qualified prerequisite, then this
+ // is import's business.
+ //
+ if (*pk.proj != nullptr)
+ return import (pk);
+
if (target* t = pk.tk.type->search (pk))
return *t;