aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make/job.c
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2012-02-12 05:34:01 +0000
committerMax Khon <fjoe@FreeBSD.org>2012-02-12 05:34:01 +0000
commit42e4b4f7df635c994fd1741025c3bcbaa21e69a8 (patch)
tree5beb35f916b8df810fe0d738ff49c465343c69f2 /usr.bin/make/job.c
parent36fb423e4f21f3df1b195633e093801d6aa54e06 (diff)
downloadsrc-42e4b4f7df635c994fd1741025c3bcbaa21e69a8.tar.gz
src-42e4b4f7df635c994fd1741025c3bcbaa21e69a8.zip
Include target names in diagnostic output.
Submitted by: Garrett Cooper
Notes
Notes: svn path=/head/; revision=231544
Diffstat (limited to 'usr.bin/make/job.c')
-rw-r--r--usr.bin/make/job.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 2798181d8527..bc1d6a076494 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) {