aboutsummaryrefslogtreecommitdiff
path: root/build2/bin
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-14 09:56:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-14 14:53:51 +0200
commit8a7b3bb944ca08d240fc778a9269c6db0f9746f8 (patch)
tree750e1ae74d9fdd3989871f92b71df4b0feb3b3f1 /build2/bin
parentcc2b346d96bc2877efc9719507ceaa4fefbc9668 (diff)
Modify library mate-information protocol not to use lib{} group
Diffstat (limited to 'build2/bin')
-rw-r--r--build2/bin/rule.cxx38
-rw-r--r--build2/bin/target3
-rw-r--r--build2/bin/target.cxx9
3 files changed, 11 insertions, 39 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;
}
diff --git a/build2/bin/target b/build2/bin/target
index 0108f09..4157f67 100644
--- a/build2/bin/target
+++ b/build2/bin/target
@@ -94,9 +94,6 @@ namespace build2
const_ptr<liba> a = nullptr;
const_ptr<libs> s = nullptr;
- virtual void
- reset (action_type) override;
-
public:
static const target_type static_type;
diff --git a/build2/bin/target.cxx b/build2/bin/target.cxx
index caef8e0..ea0a1ac 100644
--- a/build2/bin/target.cxx
+++ b/build2/bin/target.cxx
@@ -201,15 +201,6 @@ namespace build2
// lib
//
- void lib::
- reset (action_type)
- {
- clear_data ();
-
- // Don't clear prerequisite_targets since it is "given" to our
- // members to implement "library meta-information protocol".
- }
-
static pair<target*, optional<string>>
lib_factory (const target_type&,
dir_path d,