From 1845141809aa91b03718066a6f46863885a6a887 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 7 Mar 2019 09:06:37 +0200 Subject: 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). --- build2/cc/init.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'build2/cc/init.cxx') diff --git a/build2/cc/init.cxx b/build2/cc/init.cxx index edb9961..d9c1371 100644 --- a/build2/cc/init.cxx +++ b/build2/cc/init.cxx @@ -27,7 +27,9 @@ namespace build2 static target_state clean_module_sidebuilds (action, const scope& rs, const dir&) { - dir_path d (rs.out_path () / modules_sidebuild_dir); + const dir_path& out_root (rs.out_path ()); + + dir_path d (out_root / rs.root_extra->build_dir / modules_sidebuild_dir); if (exists (d)) { @@ -35,7 +37,7 @@ namespace build2 { // Clean up cc/ if it became empty. // - d = rs.out_path () / module_dir; + d = out_root / rs.root_extra->build_dir / module_dir; if (empty (d)) { rmdir (d); @@ -43,7 +45,7 @@ namespace build2 // And build/ if it also became empty (e.g., in case of a build // with a transient configuration). // - d = rs.out_path () / build_dir; + d = out_root / rs.root_extra->build_dir; if (empty (d)) rmdir (d); } -- cgit v1.1