From 534f9d8db025d58c9ce23f3b81a37e8c34386a27 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Apr 2015 10:29:25 +0200 Subject: Add initial import support --- build/file | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'build/file') diff --git a/build/file b/build/file index 9975e06..32cac48 100644 --- a/build/file +++ b/build/file @@ -6,10 +6,18 @@ #define BUILD_FILE #include +#include namespace build { class scope; + struct location; + + bool + is_src_root (const path&); + + bool + is_out_root (const path&); void source (const path& buildfile, scope& root, scope& base); @@ -25,7 +33,7 @@ namespace build void source_once (const path& buildfile, scope& root, scope& base, scope& once); - // Create project's root scope. Only set the src_root variable is the + // Create project's root scope. Only set the src_root variable if the // passed src_root value is not empty. // scope& @@ -42,10 +50,28 @@ namespace build bool bootstrap_src (scope& root); - // Load project's root[-pre].build unless already loaded. + // Create and bootstrap outer root scopes, if any. Loading is + // done by load_root_pre() below. + // + void + create_bootstrap_outer (scope& root); + + // Create and bootstrap inner root scopes between root and base, + // if any. Return the innermost created root scope or root if + // none were created. Loading is done by load_root_pre() below. + // + scope& + create_bootstrap_inner (scope& root, const path& out_base); + + // Load project's root[-pre].build unless already loaded. Also + // make sure all outer root scopes are loaded prior to loading + // this root scope. // void - root_pre (scope& root); + load_root_pre (scope& root); + + void + import (scope& base, const name&, const location&); } #include -- cgit v1.1