From abb7bf1045fde14f6ef87c8941ee22af233af397 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 3 Aug 2015 15:47:35 +0200 Subject: match_only rework, part 2 --- build/target | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'build/target') diff --git a/build/target b/build/target index dbfe9a8..2aa3b5f 100644 --- a/build/target +++ b/build/target @@ -140,6 +140,8 @@ namespace build class target { public: + typedef build::action action_type; + virtual ~target () = default; @@ -149,6 +151,12 @@ namespace build target (dir_path d, std::string n, const std::string* e) : dir (std::move (d)), name (std::move (n)), ext (e) {} + // Reset the target before matching a rule for it. The + // default implementation clears prerequisite_targets. + // + virtual void + reset (action_type); + const dir_path dir; // Absolute and normalized. const std::string name; const std::string* ext; // Extension, NULL means unspecified, @@ -173,7 +181,7 @@ namespace build // say that the rule "semantically recognizes" the group and picks // some of its members. // - // Updating an alternative group as a whole can mean updating some + // Updating an alternatives group as a whole can mean updating some // subset of its members (e.g., lib{}). Or the group may not support // this at all (e.g., obj{}). // @@ -199,7 +207,7 @@ namespace build // resolve_group_members() from . // virtual group_view - group_members (action) const; + group_members (action_type) const; target_key key () const {return target_key {&type (), &dir, &name, &ext};} @@ -318,8 +326,6 @@ namespace build std::size_t dependents; public: - typedef build::action action_type; - action_type action; // Action this recipe is for. public: -- cgit v1.1