Advertisement
yaneurabeya

More meaningful make errors

Dec 1st, 2011
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. Index: usr.bin/make/job.c
  2. ===================================================================
  3. --- usr.bin/make/job.c (revision 228107)
  4. +++ usr.bin/make/job.c (working copy)
  5. @@ -954,17 +954,18 @@
  6. lastNode = job->node;
  7. }
  8. fprintf(out,
  9. - "*** Completed successfully\n");
  10. + "*** [%s] Completed successfully\n",
  11. + job->node->name);
  12. }
  13. } else {
  14. if (usePipes && job->node != lastNode) {
  15. - MESSAGE(out, job->node);
  16. lastNode = job->node;
  17. }
  18. - fprintf(out, "*** Error code %d%s\n",
  19. + fprintf(out, "*** [%s] Error code %d%s\n",
  20. + job->node->name,
  21. WEXITSTATUS(*status),
  22. (job->flags & JOB_IGNERR) ?
  23. - "(ignored)" : "");
  24. + " (ignored)" : "");
  25.  
  26. if (job->flags & JOB_IGNERR) {
  27. *status = 0;
  28. @@ -1002,10 +1003,10 @@
  29. */
  30. if (job->flags & (JOB_RESUME | JOB_RESTART)) {
  31. if (usePipes && job->node != lastNode) {
  32. - MESSAGE(out, job->node);
  33. lastNode = job->node;
  34. }
  35. - fprintf(out, "*** Continued\n");
  36. + fprintf(out, "*** [%s] Continued\n",
  37. + job->node->name);
  38. }
  39. if (!(job->flags & JOB_CONTINUING)) {
  40. DEBUGF(JOB, ("Warning: process %jd was not "
  41. @@ -1025,11 +1026,11 @@
  42.  
  43. } else {
  44. if (usePipes && job->node != lastNode) {
  45. - MESSAGE(out, job->node);
  46. lastNode = job->node;
  47. }
  48. fprintf(out,
  49. - "*** Signal %d\n", WTERMSIG(*status));
  50. + "*** [%s] Signal %d\n", job->node->name,
  51. + WTERMSIG(*status));
  52. fflush(out);
  53. }
  54. }
  55. @@ -1053,10 +1054,10 @@
  56.  
  57. DEBUGF(JOB, ("Process %jd stopped.\n", (intmax_t) job->pid));
  58. if (usePipes && job->node != lastNode) {
  59. - MESSAGE(out, job->node);
  60. lastNode = job->node;
  61. }
  62. - fprintf(out, "*** Stopped -- signal %d\n", WSTOPSIG(*status));
  63. + fprintf(out, "*** [%s] Stopped -- signal %d\n",
  64. + job->node->name, WSTOPSIG(*status));
  65. job->flags |= JOB_RESUME;
  66. TAILQ_INSERT_TAIL(&stoppedJobs, job, link);
  67. fflush(out);
  68. @@ -3042,13 +3043,15 @@
  69. if (status == 0) {
  70. return (0);
  71. } else {
  72. - printf("*** Error code %d", status);
  73. + printf("*** [%s] Error code %d",
  74. + gn->name, status);
  75. }
  76. } else if (WIFSTOPPED(reason)) {
  77. status = WSTOPSIG(reason);
  78. } else {
  79. status = WTERMSIG(reason);
  80. - printf("*** Signal %d", status);
  81. + printf("*** [%s] Signal %d",
  82. + gn->name, status);
  83. }
  84.  
  85. if (ps.errCheck) {
  86.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement