From 960b9a32557ad054707cc1540441057808db2d8f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 23 Aug 2016 06:27:54 +0200 Subject: Rename cc.{vars,config} modules to cc.core.{vars,config} We are going to use cc.config for something else. --- build2/cc/init | 28 ++++++++++++++-------------- build2/cc/init.cxx | 44 ++++++++++++++++++++++---------------------- build2/cc/module.cxx | 17 +++++++++-------- 3 files changed, 45 insertions(+), 44 deletions(-) (limited to 'build2/cc') diff --git a/build2/cc/init b/build2/cc/init index d8ebd0e..3e84f51 100644 --- a/build2/cc/init +++ b/build2/cc/init @@ -15,22 +15,22 @@ namespace build2 namespace cc { bool - vars_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); + core_vars_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); bool - config_init (scope&, - scope&, - const location&, - unique_ptr&, - bool, - bool, - const variable_map&); + core_config_init (scope&, + scope&, + const location&, + unique_ptr&, + bool, + bool, + const variable_map&); bool core_init (scope&, diff --git a/build2/cc/init.cxx b/build2/cc/init.cxx index 5f8e2fb..63341d5 100644 --- a/build2/cc/init.cxx +++ b/build2/cc/init.cxx @@ -22,15 +22,15 @@ namespace build2 namespace cc { bool - vars_init (scope& r, - scope&, - const location&, - unique_ptr&, - bool first, - bool, - const variable_map&) + core_vars_init (scope& r, + scope&, + const location&, + unique_ptr&, + bool first, + bool, + const variable_map&) { - tracer trace ("cc::vars_init"); + tracer trace ("cc::core_vars_init"); l5 ([&]{trace << "for " << r.out_path ();}); assert (first); @@ -64,23 +64,23 @@ namespace build2 } bool - config_init (scope& r, - scope& b, - const location& loc, - unique_ptr&, - bool first, - bool, - const variable_map& hints) + core_config_init (scope& r, + scope& b, + const location& loc, + unique_ptr&, + bool first, + bool, + const variable_map& hints) { - tracer trace ("cc::config_init"); + tracer trace ("cc::core_config_init"); l5 ([&]{trace << "for " << b.out_path ();}); - // Load cc.vars. + // Load cc.core.vars. // if (first) { - if (!cast_false (b["cc.vars.loaded"])) - load_module ("cc.vars", r, b, loc); + if (!cast_false (b["cc.core.vars.loaded"])) + load_module ("cc.core.vars", r, b, loc); } // Configure. @@ -236,10 +236,10 @@ namespace build2 tracer trace ("cc::core_init"); l5 ([&]{trace << "for " << b.out_path ();}); - // Load cc.config. + // Load cc.core.config. // - if (!cast_false (b["cc.config.loaded"])) - load_module ("cc.config", r, b, loc, false, hints); + if (!cast_false (b["cc.core.config.loaded"])) + load_module ("cc.core.config", r, b, loc, false, hints); // Load the bin module. // diff --git a/build2/cc/module.cxx b/build2/cc/module.cxx index 4926fac..76b2b56 100644 --- a/build2/cc/module.cxx +++ b/build2/cc/module.cxx @@ -35,7 +35,7 @@ namespace build2 { tracer trace (x, "config_init"); - bool cc_loaded (cast_false (b["cc.config.loaded"])); + bool cc_loaded (cast_false (b["cc.core.config.loaded"])); // Configure. // @@ -65,8 +65,8 @@ namespace build2 if (p.first == nullptr) { - // If someone already loaded cc.config then use its toolchain id - // and (optional) pattern to guess an appropriate default (e.g., + // If someone already loaded cc.core.config then use its toolchain + // id and (optional) pattern to guess an appropriate default (e.g., // for {gcc, *-4.9} we will get g++-4.9). // path d (cc_loaded @@ -210,12 +210,12 @@ namespace build2 b.assign (x_libs) += cast_null ( config::optional (r, config_x_libs)); - // Load cc.config. + // Load cc.core.config. // if (!cc_loaded) { // Prepare configuration hints. They are only used on the first load - // of cc.config so we only populate them on our first load. + // of cc.core.config so we only populate them on our first load. // variable_map h; if (first) @@ -230,12 +230,13 @@ namespace build2 h.assign ("config.bin.pattern") = move (ci.bin_pattern); } - load_module ("cc.config", r, b, loc, false, h); + load_module ("cc.core.config", r, b, loc, false, h); } else if (first) { - // If cc.config is already loaded, verify its configuration matched - // ours since it could have been loaded by another c-family module. + // If cc.core.config is already loaded, verify its configuration + // matched ours since it could have been loaded by another c-family + // module. // auto check = [&r, &loc, this](const char* cvar, const variable& xvar, -- cgit v1.1