aboutsummaryrefslogtreecommitdiff
path: root/build2/target-type
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-04-19 09:24:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-04-19 15:25:50 +0200
commitfc18a6dc1fcb02b505f07914e484cebbaf268698 (patch)
tree2cb9b04c5924dfd46e7d934912b41c3efd894a93 /build2/target-type
parentae20570f2ad55b2fa8e71cf450457cb9c4b21b1b (diff)
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.
Diffstat (limited to 'build2/target-type')
-rw-r--r--build2/target-type8
1 files changed, 5 insertions, 3 deletions
diff --git a/build2/target-type b/build2/target-type
index de210e1..6006b2c 100644
--- a/build2/target-type
+++ b/build2/target-type
@@ -31,14 +31,16 @@ namespace build2
// respectively. If the extension function returns NULL, then that means the
// default extension for this target could not be derived.
//
- // The extension function is used in two places: search_existing_file() and
- // in target::derive_path(); see their implementations for details.
+ // The extension function is used in two places: search_existing_file()
+ // (called for a prerequisite) and in target::derive_path() (called for a
+ // target); see their implementations for details.
//
struct target_type
{
const char* name;
const target_type* base;
- target* (*factory) (const target_type&, dir_path, string, const string*);
+ target* (*factory) (
+ const target_type&, dir_path, dir_path, string, const string*);
const string* (*extension) (const target_key&, scope&);
void (*print) (ostream&, const target_key&);
target* (*search) (const prerequisite_key&);