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

Diff for /src/usr.bin/make/engine.c between version 1.62 and 1.63

version 1.62, 2020/01/13 14:15:21 version 1.63, 2020/01/13 14:51:50
Line 603 
Line 603 
         _exit(1);          _exit(1);
 }  }
   
 static Job myjob;  
   
 void  void
 job_attach_node(Job *job, GNode *node)  job_attach_node(Job *job, GNode *node)
 {  {
Line 680 
Line 678 
                          * JOB_IS_EXPENSIVE, perform the computation for                           * JOB_IS_EXPENSIVE, perform the computation for
                          * sequential make to figure out whether to display the                           * sequential make to figure out whether to display the
                          * command or not.  */                           * command or not.  */
                         if ((job->flags & JOB_SILENT) && job == &myjob)                          if ((job->flags & JOB_SILENT) && sequential)
                                 determine_expensive_job(job);                                  determine_expensive_job(job);
                         if ((job->flags & (JOB_SILENT | JOB_IS_EXPENSIVE))                          if ((job->flags & (JOB_SILENT | JOB_IS_EXPENSIVE))
                             == JOB_SILENT)                              == JOB_SILENT)
Line 702 
Line 700 
 int  int
 run_gnode(GNode *gn)  run_gnode(GNode *gn)
 {  {
           Job *j;
         if (!gn || (gn->type & OP_DUMMY))          if (!gn || (gn->type & OP_DUMMY))
                 return NOSUCHNODE;                  return NOSUCHNODE;
   
         job_attach_node(&myjob, gn);          assert(availableJobs != NULL);
         while (myjob.exit_type == JOB_EXIT_OKAY) {          j = availableJobs;
                 bool finished = job_run_next(&myjob);          availableJobs = availableJobs->next;
           job_attach_node(j, gn);
           while (j->exit_type == JOB_EXIT_OKAY) {
                   bool finished = job_run_next(j);
                 if (finished)                  if (finished)
                         break;                          break;
                 handle_one_job(&myjob);                  handle_one_job(j);
         }          }
   
           j->next = availableJobs;
           availableJobs = j;
         return gn->built_status;          return gn->built_status;
 }  }
   

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63