From 54e24990203f5e123396a44297ea4656ed3b6101 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 26 Apr 2015 09:53:41 +0200 Subject: Rework resolved prerequisite targets storage --- build/rule.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'build/rule.cxx') 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 (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; -- cgit v1.1