aboutsummaryrefslogtreecommitdiff
path: root/build2/scope.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-03-07 09:06:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-03-07 09:06:37 +0200
commit1845141809aa91b03718066a6f46863885a6a887 (patch)
treea3f542ec7c1781e65aa16a9b0d5c31eae4c4d757 /build2/scope.hxx
parente0002617846755fb5f199f40a677e16d6f69e5ec (diff)
Add support for alternative build file/directory naming scheme
Now the build/*.build, buildfile, and .buildignore filesystem entries in a project can alternatively (but consistently) be called build2/*.build2, build2file, and .build2ignore. See a note at the beginning of the Project Structure section in the manual for details (motivation, restrictions, etc).
Diffstat (limited to 'build2/scope.hxx')
-rw-r--r--build2/scope.hxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/build2/scope.hxx b/build2/scope.hxx
index 3bb7269..fe7b0b6 100644
--- a/build2/scope.hxx
+++ b/build2/scope.hxx
@@ -279,6 +279,31 @@ namespace build2
public:
loaded_module_map modules; // Only on root scope.
+ // Extra root scope-only data.
+ //
+ public:
+ struct root_data
+ {
+ bool altn; // True if using alternative build file/directory naming.
+
+ // Build file/directory naming scheme used by this project.
+ //
+ const string& build_ext; // build or build2 (no dot)
+ const dir_path& build_dir; // build/ or build2/
+ const path& buildfile_file; // buildfile or build2file
+ const path& buildignore_file; // buildignore or build2ignore
+
+ const dir_path& root_dir; // build[2]/root/
+ const dir_path& bootstrap_dir; // build[2]/bootstrap/
+
+ const path& root_file; // build[2]/root.build[2]
+ const path& export_file; // build[2]/export.build[2]
+ const path& src_root_file; // build[2]/bootstrap/src-root.build[2]
+ const path& out_root_file; // build[2]/bootstrap/src-root.build[2]
+ };
+
+ unique_ptr<root_data> root_extra;
+
public:
// RW access.
//