From 17b3a78696f0b1fd6f0f60d53ec568cf3b9e32b4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Jul 2015 09:11:31 +0200 Subject: Cleanup group "see through" design --- build/cli/rule.cxx | 10 ++-------- build/cli/target | 6 +++--- build/cli/target.cxx | 10 ++++++---- 3 files changed, 11 insertions(+), 15 deletions(-) (limited to 'build/cli') diff --git a/build/cli/rule.cxx b/build/cli/rule.cxx index 09ef4f3..2d001c4 100644 --- a/build/cli/rule.cxx +++ b/build/cli/rule.cxx @@ -163,15 +163,9 @@ namespace build // inject_parent_fsdir (a, t); - // Search and match prerequisites. + // Search and match prerequisite members. // - switch (a.operation ()) - { - case default_id: - case update_id: search_and_match (a, t); break; - case clean_id: search_and_match (a, t, t.dir); break; - default: assert (false); // We didn't register for this. - } + search_and_match_prerequisite_members (a, t); switch (a) { diff --git a/build/cli/target b/build/cli/target index e5bf16d..e72d4e0 100644 --- a/build/cli/target +++ b/build/cli/target @@ -23,10 +23,10 @@ namespace build static const target_type static_type; }; - class cli_cxx: public target_group + class cli_cxx: public target { public: - using target_group::target_group; + using target::target; target* m[3] {nullptr, nullptr, nullptr}; @@ -39,7 +39,7 @@ namespace build void i (cxx::ixx& t) {m[2] = &t;} virtual group_view - members (action) const; + group_members (action) const; public: virtual const target_type& type () const {return static_type;} diff --git a/build/cli/target.cxx b/build/cli/target.cxx index 2854818..aded1ff 100644 --- a/build/cli/target.cxx +++ b/build/cli/target.cxx @@ -20,13 +20,14 @@ namespace build &file::static_type, &target_factory, &target_extension_fix, - &search_file + &search_file, + false }; // cli.cxx // group_view cli_cxx:: - members (action) const + group_members (action) const { return m[0] != nullptr ? group_view {m, (m[2] != nullptr ? 3U : 2U)} @@ -37,10 +38,11 @@ namespace build { typeid (cli_cxx), "cli.cxx", - &target_group::static_type, + &target::static_type, &target_factory, nullptr, - &search_target + &search_target, + true // See through default semantics. }; } } -- cgit v1.1