svn commit: r236742 - stable/9/usr.bin/make

Max Khon fjoe at FreeBSD.org
Fri Jun 8 10:03:37 UTC 2012


Author: fjoe
Date: Fri Jun  8 10:03:37 2012
New Revision: 236742
URL: http://svn.freebsd.org/changeset/base/236742

Log:
  MFC: r231544
  
  Include target names in diagnostic output.
  
  Submitted by:	Garrett Cooper

Modified:
  stable/9/usr.bin/make/job.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.bin/   (props changed)
  stable/9/usr.bin/make/   (props changed)

Modified: stable/9/usr.bin/make/job.c
==============================================================================
--- stable/9/usr.bin/make/job.c	Fri Jun  8 09:51:57 2012	(r236741)
+++ stable/9/usr.bin/make/job.c	Fri Jun  8 10:03:37 2012	(r236742)
@@ -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);
@@ -3042,13 +3047,15 @@ Compat_RunCommand(char *cmd, 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) {


More information about the svn-src-stable-9 mailing list