From 9d6583056a82829f4512e6ba6a471a9b3e86a4a5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 31 Jan 2017 15:17:28 +0200 Subject: Redo variable pattern-typing to match in more specific order --- build2/context.cxx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'build2/context.cxx') diff --git a/build2/context.cxx b/build2/context.cxx index a326002..466db0d 100644 --- a/build2/context.cxx +++ b/build2/context.cxx @@ -237,19 +237,23 @@ namespace build2 // Enter builtin variables and patterns. // - // file.cxx:import() + // All config. variables are by default overridable. // - // Note that the order is important (reverse application). + vp.insert_pattern ("config.**", nullopt, true, nullopt, true, false); + + // file.cxx:import() (note that order is important; see insert_pattern()). // - vp.insert_pattern ("config.import.**", true); - vp.insert_pattern ("config.import.*", true); + vp.insert_pattern ( + "config.import.*", true, variable_visibility::normal, true); + vp.insert_pattern ( + "config.import.**", true, variable_visibility::normal, true); // module.cxx:load_module(). // - vp.insert_pattern ("**.loaded", false, variable_visibility::project); - vp.insert_pattern ("**.configured", - false, - variable_visibility::project); + vp.insert_pattern ( + "**.loaded", false, variable_visibility::project); + vp.insert_pattern ( + "**.configured", false, variable_visibility::project); var_src_root = &vp.insert ("src_root"); var_out_root = &vp.insert ("out_root"); -- cgit v1.1