From b0524a0b18eec9d5e5c3f6ce30b6cecdd02a6306 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 20 Jan 2015 17:18:09 +0200 Subject: Diagnostic infrastructure revamp --- build/rule.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'build/rule.cxx') diff --git a/build/rule.cxx b/build/rule.cxx index b73b053..d40eebf 100644 --- a/build/rule.cxx +++ b/build/rule.cxx @@ -5,7 +5,8 @@ #include #include // move() -#include + +#include using namespace std; @@ -74,9 +75,9 @@ namespace build { if (mt < mtp->mtime ()) { - cerr << "error: no rule to update target " << t << endl - << "info: prerequisite " << pt << " is ahead of " << t << - " by " << (mtp->mtime () - mt) << endl; + error << "no rule to update target " << t << + info << "prerequisite " << pt << " is ahead of " << t + << " by " << (mtp->mtime () - mt); return target_state::failed; } @@ -87,9 +88,9 @@ namespace build // if (pt.state () == target_state::updated) { - cerr << "error: no rule to update target " << t << endl - << "info: prerequisite " << pt << " is ahead of " << t << - " because it was updated" << endl; + error << "no rule to update target " << t << + info << "prerequisite " << pt << " is ahead of " << t + << " because it was updated"; return target_state::failed; } -- cgit v1.1