[BACK]Return to job.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Diff for /src/usr.bin/make/job.c between version 1.85 and 1.86

version 1.85, 2007/09/23 12:49:04 version 1.86, 2007/09/23 12:51:59
Line 291 
Line 291 
 static void JobExec(Job *, char **);  static void JobExec(Job *, char **);
 static void JobMakeArgv(Job *, char **);  static void JobMakeArgv(Job *, char **);
 static void JobRestart(Job *);  static void JobRestart(Job *);
 static int JobStart(GNode *, int, Job *);  static int JobStart(GNode *, int);
 static char *JobOutput(Job *, char *, char *, int);  static char *JobOutput(Job *, char *, char *, int);
 static void JobDoOutput(Job *, bool);  static void JobDoOutput(Job *, bool);
 static void JobInterrupt(int, int);  static void JobInterrupt(int, int);
Line 1179 
Line 1179 
  */   */
 static int  static int
 JobStart(GNode *gn,             /* target to create */  JobStart(GNode *gn,             /* target to create */
     int flags,                  /* flags for the job to override normal ones.      int flags)                  /* flags for the job to override normal ones.
                                  * e.g. JOB_SPECIAL or JOB_IGNDOTS */                                   * e.g. JOB_SPECIAL */
     Job *previous)              /* The previous Job structure for this node,  
                                  * if any. */  
 {  {
         Job *job;               /* new job descriptor */          Job *job;               /* new job descriptor */
         char *argv[4];          /* Argument vector to shell */          char *argv[4];          /* Argument vector to shell */
         bool cmdsOK;            /* true if the nodes commands were all right */          bool cmdsOK;            /* true if the nodes commands were all right */
         bool noExec;            /* Set true if we decide not to run the job */          bool noExec;            /* Set true if we decide not to run the job */
   
         if (previous != NULL) {          job = emalloc(sizeof(Job));
                 previous->flags &= ~(JOB_FIRST|JOB_IGNERR|JOB_SILENT);          if (job == NULL) {
                 job = previous;                  Punt("JobStart out of memory");
         } else {  
                 job = emalloc(sizeof(Job));  
                 if (job == NULL) {  
                         Punt("JobStart out of memory");  
                 }  
                 flags |= JOB_FIRST;  
         }          }
           flags |= JOB_FIRST;
   
         job->node = gn;          job->node = gn;
         job->tailCmds = NULL;          job->tailCmds = NULL;
Line 1717 
Line 1710 
 void  void
 Job_Make(GNode *gn)  Job_Make(GNode *gn)
 {  {
         (void)JobStart(gn, 0, NULL);          (void)JobStart(gn, 0);
 }  }
   
 /*-  /*-
Line 1799 
Line 1792 
 #endif  #endif
   
         if ((begin_node->type & OP_DUMMY) == 0) {          if ((begin_node->type & OP_DUMMY) == 0) {
                 JobStart(begin_node, JOB_SPECIAL, (Job *)0);                  JobStart(begin_node, JOB_SPECIAL);
                 while (nJobs) {                  while (nJobs) {
                         Job_CatchOutput();                          Job_CatchOutput();
                         Job_CatchChildren();                          Job_CatchChildren();
Line 1898 
Line 1891 
                 if ((interrupt_node->type & OP_DUMMY) == 0) {                  if ((interrupt_node->type & OP_DUMMY) == 0) {
                         ignoreErrors = false;                          ignoreErrors = false;
   
                         JobStart(interrupt_node, JOB_IGNDOTS, (Job *)0);                          JobStart(interrupt_node, JOB_IGNDOTS);
                         while (nJobs) {                          while (nJobs) {
                                 Job_CatchOutput();                                  Job_CatchOutput();
                                 Job_CatchChildren();                                  Job_CatchChildren();
Line 1930 
Line 1923 
                 if (errors) {                  if (errors) {
                         Error("Errors reported so .END ignored");                          Error("Errors reported so .END ignored");
                 } else {                  } else {
                         JobStart(end_node, JOB_SPECIAL | JOB_IGNDOTS, NULL);                          JobStart(end_node, JOB_SPECIAL | JOB_IGNDOTS);
   
                         while (nJobs) {                          while (nJobs) {
                                 Job_CatchOutput();                                  Job_CatchOutput();

Legend:
Removed from v.1.85  
changed lines
  Added in v.1.86