[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.17 and 1.18

version 1.17, 1999/12/18 02:11:26 version 1.18, 1999/12/18 21:53:32
Line 967 
Line 967 
          * the parents. In addition, any saved commands for the node are placed           * the parents. In addition, any saved commands for the node are placed
          * on the .END target.           * on the .END target.
          */           */
         if (job->tailCmds != NILLNODE) {          if (job->tailCmds != NULL) {
             Lst_ForEachFrom(job->node->commands, job->tailCmds,              Lst_ForEachFrom(job->node->commands, job->tailCmds,
                              JobSaveCommand,                               JobSaveCommand,
                             (ClientData)job->node);                              (ClientData)job->node);
Line 1101 
Line 1101 
          * No commands. Look for .DEFAULT rule from which we might infer           * No commands. Look for .DEFAULT rule from which we might infer
          * commands           * commands
          */           */
         if ((DEFAULT != NILGNODE) && !Lst_IsEmpty(DEFAULT->commands)) {          if ((DEFAULT != NULL) && !Lst_IsEmpty(DEFAULT->commands)) {
             /*              /*
              * Make only looks for a .DEFAULT if the node was never the               * Make only looks for a .DEFAULT if the node was never the
              * target of an operator, so that's what we do too. If               * target of an operator, so that's what we do too. If
Line 1692 
Line 1692 
     }      }
   
     job->node = gn;      job->node = gn;
     job->tailCmds = NILLNODE;      job->tailCmds = NULL;
   
     /*      /*
      * Set the initial value of the flags for this job based on the global       * Set the initial value of the flags for this job based on the global
Line 1762 
Line 1762 
             } else {              } else {
                 LstNode ln = Lst_Next(gn->commands);                  LstNode ln = Lst_Next(gn->commands);
   
                 if ((ln == NILLNODE) ||                  if ((ln == NULL) ||
                     JobPrintCommand((ClientData) Lst_Datum(ln),                      JobPrintCommand((ClientData) Lst_Datum(ln),
                                     (ClientData) job))                                      (ClientData) job))
                 {                  {
Line 1854 
Line 1854 
          */           */
         if (cmdsOK) {          if (cmdsOK) {
             if (aborting == 0) {              if (aborting == 0) {
                 if (job->tailCmds != NILLNODE) {                  if (job->tailCmds != NULL) {
                     Lst_ForEachFrom(job->node->commands, job->tailCmds,                      Lst_ForEachFrom(job->node->commands, job->tailCmds,
                                     JobSaveCommand,                                      JobSaveCommand,
                                    (ClientData)job->node);                                     (ClientData)job->node);
Line 2255 
Line 2255 
   
         jnode = Lst_Find(jobs, (ClientData)&pid, JobCmpPid);          jnode = Lst_Find(jobs, (ClientData)&pid, JobCmpPid);
   
         if (jnode == NILLNODE) {          if (jnode == NULL) {
             if (WIFSIGNALED(status) && (WTERMSIG(status) == SIGCONT)) {              if (WIFSIGNALED(status) && (WTERMSIG(status) == SIGCONT)) {
                 jnode = Lst_Find(stoppedJobs, (ClientData) &pid, JobCmpPid);                  jnode = Lst_Find(stoppedJobs, (ClientData) &pid, JobCmpPid);
                 if (jnode == NILLNODE) {                  if (jnode == NULL) {
                     Error("Resumed child (%d) not in table", pid);                      Error("Resumed child (%d) not in table", pid);
                     continue;                      continue;
                 }                  }
Line 2365 
Line 2365 
                 free(readfdsp);                  free(readfdsp);
                 Punt("Cannot open job table");                  Punt("Cannot open job table");
             }              }
             while (nfds && (ln = Lst_Next(jobs)) != NILLNODE) {              while (nfds && (ln = Lst_Next(jobs)) != NULL) {
                 job = (Job *) Lst_Datum(ln);                  job = (Job *) Lst_Datum(ln);
                 if (FD_ISSET(job->inPipe, readfdsp)) {                  if (FD_ISSET(job->inPipe, readfdsp)) {
                     JobDoOutput(job, FALSE);                      JobDoOutput(job, FALSE);
Line 2439 
Line 2439 
     aborting =    0;      aborting =    0;
     errors =      0;      errors =      0;
   
     lastNode =    NILGNODE;      lastNode =    NULL;
   
     if (maxJobs == 1      if (maxJobs == 1
 #ifdef REMOTE  #ifdef REMOTE
Line 2513 
Line 2513 
   
     begin = Targ_FindNode(".BEGIN", TARG_NOCREATE);      begin = Targ_FindNode(".BEGIN", TARG_NOCREATE);
   
     if (begin != NILGNODE) {      if (begin != NULL) {
         JobStart(begin, JOB_SPECIAL, (Job *)0);          JobStart(begin, JOB_SPECIAL, (Job *)0);
         while (nJobs) {          while (nJobs) {
             Job_CatchOutput();              Job_CatchOutput();
Line 2817 
Line 2817 
     aborting = ABORT_INTERRUPT;      aborting = ABORT_INTERRUPT;
   
    (void) Lst_Open(jobs);     (void) Lst_Open(jobs);
     while ((ln = Lst_Next(jobs)) != NILLNODE) {      while ((ln = Lst_Next(jobs)) != NULL) {
         job = (Job *) Lst_Datum(ln);          job = (Job *) Lst_Datum(ln);
   
         if (!Targ_Precious(job->node)) {          if (!Targ_Precious(job->node)) {
Line 2862 
Line 2862 
   
 #ifdef REMOTE  #ifdef REMOTE
    (void)Lst_Open(stoppedJobs);     (void)Lst_Open(stoppedJobs);
     while ((ln = Lst_Next(stoppedJobs)) != NILLNODE) {      while ((ln = Lst_Next(stoppedJobs)) != NULL) {
         job = (Job *) Lst_Datum(ln);          job = (Job *) Lst_Datum(ln);
   
         if (job->flags & JOB_RESTART) {          if (job->flags & JOB_RESTART) {
Line 2923 
Line 2923 
   
     if (runINTERRUPT && !touchFlag) {      if (runINTERRUPT && !touchFlag) {
         interrupt = Targ_FindNode(".INTERRUPT", TARG_NOCREATE);          interrupt = Targ_FindNode(".INTERRUPT", TARG_NOCREATE);
         if (interrupt != NILGNODE) {          if (interrupt != NULL) {
             ignoreErrors = FALSE;              ignoreErrors = FALSE;
   
             JobStart(interrupt, JOB_IGNDOTS, (Job *)0);              JobStart(interrupt, JOB_IGNDOTS, (Job *)0);
Line 2956 
Line 2956 
 int  int
 Job_Finish()  Job_Finish()
 {  {
     if (postCommands != NILGNODE && !Lst_IsEmpty(postCommands->commands)) {      if (postCommands != NULL && !Lst_IsEmpty(postCommands->commands)) {
         if (errors) {          if (errors) {
             Error("Errors reported so .END ignored");              Error("Errors reported so .END ignored");
         } else {          } else {
Line 3047 
Line 3047 
     if (nJobs) {      if (nJobs) {
   
         (void) Lst_Open(jobs);          (void) Lst_Open(jobs);
         while ((ln = Lst_Next(jobs)) != NILLNODE) {          while ((ln = Lst_Next(jobs)) != NULL) {
             job = (Job *) Lst_Datum(ln);              job = (Job *) Lst_Datum(ln);
   
             /*              /*
Line 3105 
Line 3105 
     }      }
     jnode = Lst_Find(jobs, (ClientData)hostID, JobCmpRmtID);      jnode = Lst_Find(jobs, (ClientData)hostID, JobCmpRmtID);
   
     if (jnode == NILLNODE) {      if (jnode == NULL) {
         jnode = Lst_Find(stoppedJobs, (ClientData)hostID, JobCmpRmtID);          jnode = Lst_Find(stoppedJobs, (ClientData)hostID, JobCmpRmtID);
                 if (jnode == NILLNODE) {                  if (jnode == NULL) {
                     if (DEBUG(JOB)) {                      if (DEBUG(JOB)) {
                         Error("Evicting host(%d) not in table", hostID);                          Error("Evicting host(%d) not in table", hostID);
                     }                      }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18