diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-28 16:52:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-28 16:52:47 +0200 |
commit | 56a6d901b9c06b58182ace0c83f2910d415293bb (patch) | |
tree | f87fccac6847dc7beaf3ffed444e6b871fe7a145 /build | |
parent | 85d33a51cdc7e183bb96d8b7026ba391eedd55d7 (diff) |
Remove sourcing triggers support for now
Diffstat (limited to 'build')
-rw-r--r-- | build/parser.cxx | 21 | ||||
-rw-r--r-- | build/scope | 17 |
2 files changed, 0 insertions, 38 deletions
diff --git a/build/parser.cxx b/build/parser.cxx index 443253c..5c9e2cb 100644 --- a/build/parser.cxx +++ b/build/parser.cxx @@ -387,24 +387,6 @@ namespace build p.normalize (); - // 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 ()) - { - if (!i->second (true, *scope_, p)) - { - level4 ([&]{trace (l) << "trigger instructed to skip " << p;}); - continue; - } - - trig = &i->second; - } - } - ifstream ifs (p.string ()); if (!ifs.is_open ()) @@ -449,9 +431,6 @@ namespace build auto v (root_->vars["src_root"]); src_root_ = v ? &v.as<const dir_path&> () : nullptr; } - - if (trig != nullptr) - (*trig) (false, *scope_, p); } if (tt == type::newline) diff --git a/build/scope b/build/scope index 1608be7..2975fd0 100644 --- a/build/scope +++ b/build/scope @@ -108,23 +108,6 @@ namespace build // std::unordered_set<path_type> buildfiles; - // A map of absolute and normalized buildfile paths to trigger - // functions that are executed when such files are sourced. The - // trigger is called twice: the first time before sourcing the - // file (pre is true) and the second time -- after (pre is false). - // - // The passed path is the buildfile, which can be altered by the - // trigger in the pre call, if desired. If the returned value is - // true, then the file is sourced. If false -- the file is ignored - // (and no post call is made). The return value is ignored in the - // post call. - // - // Note that currently triggers can only be registered on the - // project's root scope. - // - using trigger_type = std::function<bool (bool pre, scope&, path_type&)>; - std::unordered_map<path_type, trigger_type> triggers; - private: friend class scope_map; friend class temp_scope; |