aboutsummaryrefslogtreecommitdiff
path: root/build/cxx/link.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-08-31 13:45:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-08-31 13:45:57 +0200
commit5974cab56148a18628bfb423189e016ade2d40f9 (patch)
tree472a7966d0e1c5725f0736c73812cbdeaab827dc /build/cxx/link.cxx
parent2a9d673f298b623db061ee85d397563d644c8268 (diff)
Rework scoping logic
Now the src directory is entered into the scope map and points to the same scope as out. This means that targets that are in src, not out (e.g., source files) will "see" rules, variables, etc. This becomes important when we try, for example, to install a source file (say, a header) from src: we need the rule as well as the install.* variables.
Diffstat (limited to 'build/cxx/link.cxx')
-rw-r--r--build/cxx/link.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/build/cxx/link.cxx b/build/cxx/link.cxx
index 3b628b5..2554930 100644
--- a/build/cxx/link.cxx
+++ b/build/cxx/link.cxx
@@ -492,7 +492,7 @@ namespace build
const dir_path* amlg (
a.operation () != clean_id
? nullptr
- : &t.strong_scope ().path ());
+ : &t.strong_scope ().out_path ());
for (prerequisite_member p: group_prerequisite_members (a, t))
{
@@ -573,7 +573,7 @@ namespace build
// altogether. So we are going to use the target's project.
//
root = &t.root_scope ();
- out_root = &root->path ();
+ out_root = &root->out_path ();
src_root = &root->src_path ();
}