diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-20 13:46:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-02-03 14:35:45 +0200 |
commit | 934f2a9a90c5cad3cdc8a66b50c17827a3ddbcee (patch) | |
tree | f35f106e5369e98350327c79080c571195234c0b /build2/version/rule.cxx | |
parent | 280f4a5bf787587227ca193cd59c6bd74091db70 (diff) |
Get rid of action rule override semantics
Instead we now have two more or less separate match states for outer and
inner parts of an action.
Diffstat (limited to 'build2/version/rule.cxx')
-rw-r--r-- | build2/version/rule.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx index 9e127ca..bbfe1f6 100644 --- a/build2/version/rule.cxx +++ b/build2/version/rule.cxx @@ -45,12 +45,12 @@ namespace build2 return d == rs.src_path (); } - // version_doc + // doc_rule // - match_result version_doc:: + bool doc_rule:: match (action a, target& xt, const string&) const { - tracer trace ("version::version_doc::match"); + tracer trace ("version::doc_rule::match"); doc& t (static_cast<doc&> (xt)); @@ -76,7 +76,7 @@ namespace build2 return false; } - recipe version_doc:: + recipe doc_rule:: apply (action a, target& xt) const { doc& t (static_cast<doc&> (xt)); @@ -101,7 +101,7 @@ namespace build2 } } - target_state version_doc:: + target_state doc_rule:: perform_update (action a, const target& xt) { const doc& t (xt.as<const doc&> ()); @@ -168,12 +168,12 @@ namespace build2 return target_state::changed; } - // version_in + // in_rule // - match_result version_in:: + bool in_rule:: match (action a, target& xt, const string&) const { - tracer trace ("version::version_in::match"); + tracer trace ("version::in_rule::match"); file& t (static_cast<file&> (xt)); const scope& rs (t.root_scope ()); @@ -195,7 +195,7 @@ namespace build2 return fm && fi; } - recipe version_in:: + recipe in_rule:: apply (action a, target& xt) const { file& t (static_cast<file&> (xt)); @@ -220,10 +220,10 @@ namespace build2 } } - target_state version_in:: + target_state in_rule:: perform_update (action a, const target& xt) { - tracer trace ("version::version_in::perform_update"); + tracer trace ("version::in_rule::perform_update"); const file& t (xt.as<const file&> ()); const path& tp (t.path ()); |