aboutsummaryrefslogtreecommitdiff
path: root/build/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-26 09:53:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-26 09:53:41 +0200
commit54e24990203f5e123396a44297ea4656ed3b6101 (patch)
treed6581a15fa0fea6a5de7c7c7e5147f3d7c865cc9 /build/rule.cxx
parent478c521c09f1962e9d82a3fc4297e5cafb8c0758 (diff)
Rework resolved prerequisite targets storage
Diffstat (limited to 'build/rule.cxx')
-rw-r--r--build/rule.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/build/rule.cxx b/build/rule.cxx
index e912b2e..475d812 100644
--- a/build/rule.cxx
+++ b/build/rule.cxx
@@ -102,10 +102,8 @@ namespace build
//
timestamp mt (dynamic_cast<path_target&> (t).mtime ());
- for (target* pt: t.prerequisites)
+ for (target* pt: t.prerequisite_targets)
{
- assert (pt != nullptr); // We don't skip anything.
-
target_state ts (execute (a, *pt));
// If this is an mtime-based target, then compare timestamps.
@@ -170,6 +168,10 @@ namespace build
recipe fsdir_rule::
apply (action a, target& t, void*) const
{
+ // Inject dependency on the parent directory.
+ //
+ inject_parent_fsdir (a, t);
+
switch (a.operation ())
{
// For default, we don't do anything other than letting our
@@ -191,10 +193,6 @@ namespace build
assert (false);
}
- // Inject dependency on the parent directory.
- //
- inject_parent_fsdir (a, t);
-
switch (a)
{
case perform_update_id: return &perform_update;