From 4c44c914d898af53152addad5530504548175e85 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 20 Apr 2015 15:34:16 +0200 Subject: Merge config.cxx.* variables into cxx.* when loading cxx module --- build/parser.cxx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'build/parser.cxx') diff --git a/build/parser.cxx b/build/parser.cxx index 6c3989d..4275411 100644 --- a/build/parser.cxx +++ b/build/parser.cxx @@ -389,13 +389,19 @@ namespace build // See if there is a trigger for this path. // + const scope::trigger_type* trig (nullptr); { auto i (root_->triggers.find (p)); - if (i != root_->triggers.end () && !i->second (*root_, p)) + if (i != root_->triggers.end ()) { - level4 ([&]{trace (l) << "trigger instructed to skip " << p;}); - continue; + if (!i->second (true, *scope_, p)) + { + level4 ([&]{trace (l) << "trigger instructed to skip " << p;}); + continue; + } + + trig = &i->second; } } @@ -443,6 +449,9 @@ namespace build auto v (root_->vars["src_root"]); src_root_ = v ? &v.as () : nullptr; } + + if (trig != nullptr) + (*trig) (false, *scope_, p); } if (tt == type::newline) -- cgit v1.1