aboutsummaryrefslogtreecommitdiff
path: root/build2/file
diff options
context:
space:
mode:
Diffstat (limited to 'build2/file')
-rw-r--r--build2/file14
1 files changed, 11 insertions, 3 deletions
diff --git a/build2/file b/build2/file
index 191e3dc..c8d8f6f 100644
--- a/build2/file
+++ b/build2/file
@@ -59,14 +59,14 @@ namespace build2
source (const path& buildfile, scope& root, scope& base);
// As above but first check if this buildfile has already been sourced for
- // the base scope.
+ // the base scope. Return false if the file has already been sourced.
//
- void
+ bool
source_once (const path& buildfile, scope& root, scope& base);
// As above but checks against the specified scope rather than base.
//
- void
+ bool
source_once (const path& buildfile, scope& root, scope& base, scope& once);
// Create project's root scope. Only set the src_root variable if the
@@ -88,6 +88,14 @@ namespace build2
const dir_path& out_base,
const dir_path& src_base);
+ // Return a scope for the specified directory (first). Note that switching
+ // to this scope might also involve switch to a new root scope (second) if
+ // the new scope is in another project. In the new scope is not in any
+ // project, then NULL is returned in second.
+ //
+ pair<scope&, scope*>
+ switch_scope (scope& root, const dir_path&);
+
// Bootstrap the project's root scope, the out part.
//
void