aboutsummaryrefslogtreecommitdiff
path: root/build/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-17 15:08:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-17 15:08:05 +0200
commit8f8ab1e8f6d85748547c0d0e9987eed4f3c3e17b (patch)
tree1ef9a9f271d688f1f6f2eb3fc5a8972574677433 /build/rule.cxx
parent6535bf6175af32e2514faf75d2742424751a783b (diff)
Add support for target groups, use to handle obj/obja/objso object targets
Diffstat (limited to 'build/rule.cxx')
-rw-r--r--build/rule.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/build/rule.cxx b/build/rule.cxx
index 884b28d..a9afe1b 100644
--- a/build/rule.cxx
+++ b/build/rule.cxx
@@ -102,20 +102,21 @@ namespace build
//
timestamp mt (dynamic_cast<path_target&> (t).mtime ());
- for (const prerequisite& p: t.prerequisites)
+ for (target* pt: t.prerequisites)
{
- target& pt (*p.target);
- target_state ts (execute (a, pt));
+ assert (pt != nullptr); // We don't skip anything.
+
+ target_state ts (execute (a, *pt));
// If this is an mtime-based target, then compare timestamps.
//
- if (auto mpt = dynamic_cast<const mtime_target*> (&pt))
+ if (auto mpt = dynamic_cast<const mtime_target*> (pt))
{
timestamp mp (mpt->mtime ());
if (mt < mp)
fail << "no recipe to " << diag_do (a, t) <<
- info << "prerequisite " << pt << " is ahead of " << t
+ info << "prerequisite " << *pt << " is ahead of " << t
<< " by " << (mp - mt);
}
else
@@ -124,7 +125,7 @@ namespace build
//
if (ts == target_state::changed)
fail << "no recipe to " << diag_do (a, t) <<
- info << "prerequisite " << pt << " is ahead of " << t
+ info << "prerequisite " << *pt << " is ahead of " << t
<< " because it was updated";
}
}