From fc18a6dc1fcb02b505f07914e484cebbaf268698 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 19 Apr 2016 09:24:38 +0200 Subject: Redesign src/out scoping We no longer enter paths from the src tree into scope map. Instead, targets from the src tree now include their out tree directory (in essence their "configuration"). This is then used to find a target's scope. See the comment in class target for details. The result of this change is that we can now again build multiple configurations (out trees) for same project at once. --- build2/algorithm.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'build2/algorithm.cxx') diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index 80325ed..ce25acf 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -44,7 +44,10 @@ namespace build2 n.dir.normalize (); - return search (*tt, move (n.dir), move (n.value), e, &s); + // @@ OUT: for now we assume the prerequisite's out is undetermined. + // Would need to pass a pair of names. + // + return search (*tt, n.dir, dir_path (), n.value, e, &s); } pair @@ -323,7 +326,9 @@ namespace build2 l6 ([&]{trace << "for " << t;}); - fsdir* r (&search (d, string (), nullptr, &s)); + // Target in the out tree, so out directory is empty. + // + fsdir* r (&search (d, dir_path (), string (), nullptr, &s)); match (a, *r); t.prerequisite_targets.emplace_back (r); return r; -- cgit v1.1