From b262d2c9c56eed18d043dccefac02b54a6ae2f95 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Jan 2017 11:12:25 +0200 Subject: Implement pattern-based variable typing, tighten variable type update --- build2/context.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'build2/context.cxx') diff --git a/build2/context.cxx b/build2/context.cxx index 0f13f27..a8fe2df 100644 --- a/build2/context.cxx +++ b/build2/context.cxx @@ -231,8 +231,23 @@ namespace build2 vos.emplace_back (variable_override {var, *o, move (r.first)}); } - // Enter builtin variables. + // Enter builtin variables and patterns. // + + // file.cxx:import() + // + // Note that the order is important (reverse application). + // + vp.insert_pattern ("config.import.**", true); + vp.insert_pattern ("config.import.*", true); + + // module.cxx:load_module(). + // + 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"); var_src_base = &vp.insert ("src_base"); -- cgit v1.1