diff options
author | fjoe <fjoe@FreeBSD.org> | 2012-02-12 05:34:01 +0000 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2012-02-12 05:34:01 +0000 |
commit | 4475fc98c15d33254f483b55edbac3bceba3d83a (patch) | |
tree | 5beb35f916b8df810fe0d738ff49c465343c69f2 /usr.bin | |
parent | 8f904a323b99f801ee66a43b54c9f353cfeac35a (diff) | |
download | FreeBSD-src-4475fc98c15d33254f483b55edbac3bceba3d83a.zip FreeBSD-src-4475fc98c15d33254f483b55edbac3bceba3d83a.tar.gz |
Include target names in diagnostic output.
Submitted by: Garrett Cooper
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/make/job.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 2798181..bc1d6a0 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -954,17 +954,19 @@ JobFinish(Job *job, int *status) lastNode = job->node; } fprintf(out, - "*** Completed successfully\n"); + "*** [%s] Completed successfully\n", + job->node->name); } } else { if (usePipes && job->node != lastNode) { MESSAGE(out, job->node); lastNode = job->node; } - fprintf(out, "*** Error code %d%s\n", + fprintf(out, "*** [%s] Error code %d%s\n", + job->node->name, WEXITSTATUS(*status), (job->flags & JOB_IGNERR) ? - "(ignored)" : ""); + " (ignored)" : ""); if (job->flags & JOB_IGNERR) { *status = 0; @@ -1005,7 +1007,8 @@ JobFinish(Job *job, int *status) MESSAGE(out, job->node); lastNode = job->node; } - fprintf(out, "*** Continued\n"); + fprintf(out, "*** [%s] Continued\n", + job->node->name); } if (!(job->flags & JOB_CONTINUING)) { DEBUGF(JOB, ("Warning: process %jd was not " @@ -1029,7 +1032,8 @@ JobFinish(Job *job, int *status) lastNode = job->node; } fprintf(out, - "*** Signal %d\n", WTERMSIG(*status)); + "*** [%s] Signal %d\n", job->node->name, + WTERMSIG(*status)); fflush(out); } } @@ -1056,7 +1060,8 @@ JobFinish(Job *job, int *status) MESSAGE(out, job->node); lastNode = job->node; } - fprintf(out, "*** Stopped -- signal %d\n", WSTOPSIG(*status)); + fprintf(out, "*** [%s] Stopped -- signal %d\n", + job->node->name, WSTOPSIG(*status)); job->flags |= JOB_RESUME; TAILQ_INSERT_TAIL(&stoppedJobs, job, link); fflush(out); @@ -3034,13 +3039,15 @@ Compat_RunCommand(LstNode *cmdNode, GNode *gn) if (status == 0) { return (0); } else { - printf("*** Error code %d", status); + printf("*** [%s] Error code %d", + gn->name, status); } } else if (WIFSTOPPED(reason)) { status = WSTOPSIG(reason); } else { status = WTERMSIG(reason); - printf("*** Signal %d", status); + printf("*** [%s] Signal %d", + gn->name, status); } if (ps.errCheck) { |