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/compile-rule.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'build2/cc/compile-rule.cxx') diff --git a/build2/cc/compile-rule.cxx b/build2/cc/compile-rule.cxx index eacce7b..e0faf7f 100644 --- a/build2/cc/compile-rule.cxx +++ b/build2/cc/compile-rule.cxx @@ -3922,7 +3922,10 @@ namespace build2 // So the first step is to check if the project has already been created // and/or loaded and if not, then to go ahead and do so. // - dir_path pd (as->out_path () / modules_sidebuild_dir /= x); + dir_path pd (as->out_path () / + as->root_extra->build_dir / + modules_sidebuild_dir /= + x); { const scope* ps (&scopes.find (pd)); @@ -3942,7 +3945,8 @@ namespace build2 // The project might already be created in which case we just need // to load it. // - if (!is_src_root (pd)) + optional altn (false); // Standard naming scheme. + if (!is_src_root (pd, altn)) { // Copy our standard and force modules. // -- cgit v1.1