aboutsummaryrefslogtreecommitdiff
path: root/build/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-01 09:11:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-01 09:11:31 +0200
commit17b3a78696f0b1fd6f0f60d53ec568cf3b9e32b4 (patch)
treef54f92e5066e1a97a070af248931316cd76b61c3 /build/rule.cxx
parent70af0087d8efb3f2f7dc9ffdf2568419913f16da (diff)
Cleanup group "see through" design
Diffstat (limited to 'build/rule.cxx')
-rw-r--r--build/rule.cxx39
1 files changed, 16 insertions, 23 deletions
diff --git a/build/rule.cxx b/build/rule.cxx
index e834426..ce8ef01 100644
--- a/build/rule.cxx
+++ b/build/rule.cxx
@@ -80,7 +80,7 @@ namespace build
// Search and match all the prerequisites.
//
- search_and_match (a, t);
+ search_and_match_prerequisites (a, t);
return a == perform_update_id
? &perform_update
@@ -134,18 +134,7 @@ namespace build
recipe dir_rule::
apply (action a, target& t, const match_result&) const
{
- // When cleaning, ignore prerequisites that are not in the same
- // or a subdirectory of ours. For default, we don't do anything
- // other than letting our prerequisites do their thing.
- //
- 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);
- }
-
+ search_and_match_prerequisites (a, t);
return default_recipe;
}
@@ -162,26 +151,30 @@ namespace build
{
switch (a.operation ())
{
- // For default, we don't do anything other than letting our
- // prerequisites do their thing.
- //
case default_id:
case update_id:
+ // For default, we don't do anything other than letting our
+ // prerequisites do their thing.
+ //
+
// Inject dependency on the parent directory. Note that we
// don't do it for clean since we shouldn't be removing it.
//
inject_parent_fsdir (a, t);
- search_and_match (a, t);
+ search_and_match_prerequisites (a, t, dir_path ());
break;
- // For clean, ignore prerequisites that are not in the same or a
- // subdirectory of ours (if t.dir is foo/bar/, then "we" are bar
- // and our directory is foo/). Just meditate on it a bit and you
- // will see the light.
- //
+
case clean_id:
- search_and_match (a, t, t.dir.root () ? t.dir : t.dir.directory ());
+ // For clean, ignore prerequisites that are not in the same or a
+ // subdirectory of ours (if t.dir is foo/bar/, then "we" are bar
+ // and our directory is foo/). Just meditate on it a bit and you
+ // will see the light.
+ //
+ search_and_match_prerequisites (
+ a, t, t.dir.root () ? t.dir : t.dir.directory ());
break;
+
default:
assert (false);
}