diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-09 11:06:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-09 11:06:26 +0200 |
commit | 51267fc81abdbf0ca7f1098fccd7f3e0d7da5306 (patch) | |
tree | 3dd4f7216a49064e2ba9a9eee5c0133749b35fe1 /build2/algorithm.cxx | |
parent | a18191ff73781a92605762f3f409b9f6783d3ce8 (diff) |
Force creation of output directory before opening depdb
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r-- | build2/algorithm.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index 89dd029..80325ed 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -300,7 +300,7 @@ namespace build2 } } - void + fsdir* inject_parent_fsdir (action a, target& t) { tracer trace ("inject_parent_fsdir"); @@ -309,7 +309,7 @@ namespace build2 scope* rs (s.root_scope ()); if (rs == nullptr) // Could be outside any project. - return; + return nullptr; const dir_path& out_root (rs->out_path ()); @@ -318,14 +318,15 @@ namespace build2 // const dir_path& d (t.name.empty () ? t.dir.directory () : t.dir); - if (!d.sub (out_root) || d == out_root) - return; + if (!d.sub (out_root)) + return nullptr; l6 ([&]{trace << "for " << t;}); - fsdir& dt (search<fsdir> (d, string (), nullptr, &s)); - match (a, dt); - t.prerequisite_targets.emplace_back (&dt); + fsdir* r (&search<fsdir> (d, string (), nullptr, &s)); + match (a, *r); + t.prerequisite_targets.emplace_back (r); + return r; } target_state |