diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-14 09:56:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-14 14:53:51 +0200 |
commit | 8a7b3bb944ca08d240fc778a9269c6db0f9746f8 (patch) | |
tree | 750e1ae74d9fdd3989871f92b71df4b0feb3b3f1 /build2/bin/rule.cxx | |
parent | cc2b346d96bc2877efc9719507ceaa4fefbc9668 (diff) |
Modify library mate-information protocol not to use lib{} group
Diffstat (limited to 'build2/bin/rule.cxx')
-rw-r--r-- | build2/bin/rule.cxx | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/build2/bin/rule.cxx b/build2/bin/rule.cxx index ea84971..075af0e 100644 --- a/build2/bin/rule.cxx +++ b/build2/bin/rule.cxx @@ -46,7 +46,7 @@ namespace build2 "insufficient space"); match_result lib_rule:: - match (slock& ml, action act, target& xt, const string&) const + match (slock&, action act, target& xt, const string&) const { lib& t (xt.as<lib> ()); @@ -64,30 +64,6 @@ namespace build2 fail << "unknown library type: " << type << info << "'static', 'shared', or 'both' expected"; - // Search and pre-match the members. The pre-match here is part - // of the "library meta-information protocol" that could be used - // by the module that actually builds the members. The idea is - // that pre-matching members may populate our prerequisite_targets - // with prerequisite libraries from which others can extract the - // meta-information about the library, such as the options to use - // when linking it, etc. - // - if (a) - { - if (t.a == nullptr) - t.a = &search<liba> (t.dir, t.out, t.name, nullptr, nullptr); - - match_only (ml, act, *t.a); - } - - if (s) - { - if (t.s == nullptr) - t.s = &search<libs> (t.dir, t.out, t.name, nullptr, nullptr); - - match_only (ml, act, *t.s); - } - t.data (match_data {type}); // Save in the target's auxilary storage. match_result mr (true); @@ -112,13 +88,21 @@ namespace build2 bool a (type == "static" || type == "both"); bool s (type == "shared" || type == "both"); - // Now we do full match. - // if (a) + { + if (t.a == nullptr) + t.a = &search<liba> (t.dir, t.out, t.name, nullptr, nullptr); + build2::match (ml, act, *t.a); + } if (s) + { + if (t.s == nullptr) + t.s = &search<libs> (t.dir, t.out, t.name, nullptr, nullptr); + build2::match (ml, act, *t.s); + } return &perform; } |