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

Diff for /src/usr.bin/make/compat.c between version 1.24 and 1.25

version 1.24, 2000/04/17 23:54:47 version 1.25, 2000/06/10 01:26:36
Line 122 
Line 122 
         if (signo == SIGINT) {          if (signo == SIGINT) {
             gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE);              gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE);
             if (gn != NULL) {              if (gn != NULL) {
                 Lst_ForEach(gn->commands, CompatRunCommand, gn);                  Lst_Find(gn->commands, CompatRunCommand, gn);
             }              }
         }          }
   
Line 191 
Line 191 
  *      error, the node's made field is set to ERROR and creation stops.   *      error, the node's made field is set to ERROR and creation stops.
  *   *
  * Results:   * Results:
  *      0 if the command succeeded, 1 if an error occurred.   *      1 if the command succeeded, 0 if an error occurred.
  *   *
  * Side Effects:   * Side Effects:
  *      The node's 'made' field may be set to ERROR.   *      The node's 'made' field may be set to ERROR.
Line 245 
Line 245 
     if (*cmdStart == '\0') {      if (*cmdStart == '\0') {
         free(cmdStart);          free(cmdStart);
         Error("%s expands to empty string", cmd);          Error("%s expands to empty string", cmd);
         return(0);          return 1;
     } else {      } else {
         cmd = cmdStart;          cmd = cmdStart;
     }      }
Line 253 
Line 253 
   
     if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) {      if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) {
         Lst_AtEnd(ENDNode->commands, cmdStart);          Lst_AtEnd(ENDNode->commands, cmdStart);
         return(0);          return 1;
     } else if (strcmp(cmdStart, "...") == 0) {      } else if (strcmp(cmdStart, "...") == 0) {
         gn->type |= OP_SAVE_CMDS;          gn->type |= OP_SAVE_CMDS;
         return(0);          return 1;
     }      }
   
     while ((*cmd == '@') || (*cmd == '-')) {      while ((*cmd == '@') || (*cmd == '-')) {
Line 293 
Line 293 
      * If we're not supposed to execute any commands, this is as far as       * If we're not supposed to execute any commands, this is as far as
      * we go...       * we go...
      */       */
     if (noExecute) {      if (noExecute)
         return (0);          return 1;
     }  
   
     if (*cp != '\0') {      if (*cp != '\0') {
         /*          /*
Line 321 
Line 320 
         case -1: /* handled internally */          case -1: /* handled internally */
                 free(bp);                  free(bp);
                 free(av);                  free(av);
                 return 0;                  return 1;
         case 1:          case 1:
                 shargv[1] = (errCheck ? "-ec" : "-c");                  shargv[1] = (errCheck ? "-ec" : "-c");
                 shargv[2] = cmd;                  shargv[2] = cmd;
Line 416 
Line 415 
         }          }
     }      }
   
     return (status);      return !status;
 }  }
   
 /*-  /*-
Line 522 
Line 521 
              */               */
             if (!touchFlag) {              if (!touchFlag) {
                 curTarg = gn;                  curTarg = gn;
                 Lst_ForEach(gn->commands, CompatRunCommand, gn);                  Lst_Find(gn->commands, CompatRunCommand, gn);
                 curTarg = NULL;                  curTarg = NULL;
             } else {              } else {
                 Job_Touch (gn, gn->type & OP_SILENT);                  Job_Touch (gn, gn->type & OP_SILENT);
Line 697 
Line 696 
     if (!queryFlag) {      if (!queryFlag) {
         gn = Targ_FindNode(".BEGIN", TARG_NOCREATE);          gn = Targ_FindNode(".BEGIN", TARG_NOCREATE);
         if (gn != NULL) {          if (gn != NULL) {
             Lst_ForEach(gn->commands, CompatRunCommand, gn);              Lst_Find(gn->commands, CompatRunCommand, gn);
             if (gn->made == ERROR) {              if (gn->made == ERROR) {
                 printf("\n\nStop.\n");                  printf("\n\nStop.\n");
                 exit(1);                  exit(1);
Line 731 
Line 730 
      * If the user has defined a .END target, run its commands.       * If the user has defined a .END target, run its commands.
      */       */
     if (errors == 0) {      if (errors == 0) {
         Lst_ForEach(ENDNode->commands, CompatRunCommand, gn);          Lst_Find(ENDNode->commands, CompatRunCommand, gn);
     }      }
 }  }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25