diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-31 13:45:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-31 13:45:57 +0200 |
commit | 5974cab56148a18628bfb423189e016ade2d40f9 (patch) | |
tree | 472a7966d0e1c5725f0736c73812cbdeaab827dc /build/dist | |
parent | 2a9d673f298b623db061ee85d397563d644c8268 (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/dist')
-rw-r--r-- | build/dist/module.cxx | 2 | ||||
-rw-r--r-- | build/dist/operation.cxx | 2 | ||||
-rw-r--r-- | build/dist/rule.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/build/dist/module.cxx b/build/dist/module.cxx index ab27df7..48c1fd0 100644 --- a/build/dist/module.cxx +++ b/build/dist/module.cxx @@ -40,7 +40,7 @@ namespace build return; } - const dir_path& out_root (r.path ()); + const dir_path& out_root (r.out_path ()); level4 ([&]{trace << "for " << out_root;}); // Register meta-operation. diff --git a/build/dist/operation.cxx b/build/dist/operation.cxx index 3c6ec98..c4d022b 100644 --- a/build/dist/operation.cxx +++ b/build/dist/operation.cxx @@ -79,7 +79,7 @@ namespace build if (rs == nullptr) fail << "out of project target " << t; - const dir_path& out_root (rs->path ()); + const dir_path& out_root (rs->out_path ()); const dir_path& src_root (rs->src_path ()); if (out_root == src_root) diff --git a/build/dist/rule.cxx b/build/dist/rule.cxx index bda2ef7..6977676 100644 --- a/build/dist/rule.cxx +++ b/build/dist/rule.cxx @@ -24,7 +24,7 @@ namespace build recipe rule:: apply (action a, target& t, const match_result&) const { - const dir_path& out_root (t.root_scope ().path ()); + const dir_path& out_root (t.root_scope ().out_path ()); for (prerequisite_member p: group_prerequisite_members (a, t)) { |