aboutsummaryrefslogtreecommitdiff
path: root/build2/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-01-20 13:46:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-02-03 14:35:45 +0200
commit934f2a9a90c5cad3cdc8a66b50c17827a3ddbcee (patch)
treef35f106e5369e98350327c79080c571195234c0b /build2/rule.cxx
parent280f4a5bf787587227ca193cd59c6bd74091db70 (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/rule.cxx')
-rw-r--r--build2/rule.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/build2/rule.cxx b/build2/rule.cxx
index 2ed0bbd..ef1d3a4 100644
--- a/build2/rule.cxx
+++ b/build2/rule.cxx
@@ -25,7 +25,7 @@ namespace build2
// that normal implementations should follow. So you probably shouldn't
// use it as a guide to implement your own, normal, rules.
//
- match_result file_rule::
+ bool file_rule::
match (action a, target& t, const string&) const
{
tracer trace ("file_rule::match");
@@ -131,7 +131,7 @@ namespace build2
// alias_rule
//
- match_result alias_rule::
+ bool alias_rule::
match (action, target&, const string&) const
{
return true;
@@ -153,7 +153,7 @@ namespace build2
// fsdir_rule
//
- match_result fsdir_rule::
+ bool fsdir_rule::
match (action, target&, const string&) const
{
return true;
@@ -220,7 +220,7 @@ namespace build2
// First update prerequisites (e.g. create parent directories) then create
// this directory.
//
- if (!t.prerequisite_targets.empty ())
+ if (!t.prerequisite_targets[a].empty ())
ts = straight_execute_prerequisites (a, t);
// The same code as in perform_update_direct() below.
@@ -243,9 +243,9 @@ namespace build2
{
// First create the parent directory. If present, it is always first.
//
- const target* p (t.prerequisite_targets.empty ()
+ const target* p (t.prerequisite_targets[a].empty ()
? nullptr
- : t.prerequisite_targets[0]);
+ : t.prerequisite_targets[a][0]);
if (p != nullptr && p->is_a<fsdir> ())
perform_update_direct (a, *p);
@@ -272,7 +272,7 @@ namespace build2
? target_state::changed
: target_state::unchanged);
- if (!t.prerequisite_targets.empty ())
+ if (!t.prerequisite_targets[a].empty ())
ts |= reverse_execute_prerequisites (a, t);
return ts;