From 6298f309bddaf3f279a724034e2d1d3ce58e0e1a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 3 Dec 2015 17:20:15 +0200 Subject: Clean up rule names --- build/context.cxx | 58 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 27 deletions(-) (limited to 'build/context.cxx') diff --git a/build/context.cxx b/build/context.cxx index 7f30c81..f98ca96 100644 --- a/build/context.cxx +++ b/build/context.cxx @@ -59,22 +59,26 @@ namespace build // Enter builtin variables. // - var_pool.find ("work", dir_path_type); - var_pool.find ("home", dir_path_type); + { + auto& v (var_pool); - var_pool.find ("src_root", dir_path_type); - var_pool.find ("out_root", dir_path_type); - var_pool.find ("src_base", dir_path_type); - var_pool.find ("out_base", dir_path_type); + v.find ("work", dir_path_type); + v.find ("home", dir_path_type); - var_pool.find ("project", string_type); - var_pool.find ("amalgamation", dir_path_type); + v.find ("src_root", dir_path_type); + v.find ("out_root", dir_path_type); + v.find ("src_base", dir_path_type); + v.find ("out_base", dir_path_type); - // Shouldn't be typed since the value requires pre-processing. - // - var_pool.find ("subprojects", nullptr, '='); + v.find ("project", string_type); + v.find ("amalgamation", dir_path_type); - var_pool.find ("extension", string_type); + // Shouldn't be typed since the value requires pre-processing. + // + v.find ("subprojects", nullptr, '='); + + v.find ("extension", string_type); + } // Create global scope. For Win32 this is not a "real" root path. // On POSIX, however, this is a real path. See the comment in @@ -89,29 +93,29 @@ namespace build // Register builtin target types. // { - target_type_map& tts (global_scope->target_types); - - tts.insert (); - tts.insert (); - tts.insert (); - tts.insert (); - tts.insert (); - tts.insert (); - tts.insert (); + target_type_map& t (global_scope->target_types); + + t.insert (); + t.insert (); + t.insert (); + t.insert (); + t.insert (); + t.insert (); + t.insert (); } // Register builtin rules. // { - rule_map& rs (global_scope->rules); + rule_map& r (global_scope->rules); - rs.insert (perform_id, 0, "alias", alias_rule::instance); + r.insert (perform_id, 0, "alias", alias_rule::instance); - rs.insert (perform_id, update_id, "fsdir", fsdir_rule::instance); - rs.insert (perform_id, clean_id, "fsdir", fsdir_rule::instance); + r.insert (perform_update_id, "fsdir", fsdir_rule::instance); + r.insert (perform_clean_id, "fsdir", fsdir_rule::instance); - rs.insert (perform_id, update_id, "file", file_rule::instance); - rs.insert (perform_id, clean_id, "file", file_rule::instance); + r.insert (perform_update_id, "file", file_rule::instance); + r.insert (perform_clean_id, "file", file_rule::instance); } } -- cgit v1.1