[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.3 and 1.4

version 1.3, 1996/06/26 05:36:27 version 1.4, 1996/11/30 21:08:51
Line 1 
Line 1 
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
 /*      $NetBSD: compat.c,v 1.13 1995/11/22 17:40:00 christos Exp $     */  /*      $NetBSD: compat.c,v 1.14 1996/11/06 17:59:01 christos Exp $     */
   
 /*  /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.   * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
Line 41 
Line 41 
   
 #ifndef lint  #ifndef lint
 #if 0  #if 0
 static char sccsid[] = "@(#)compat.c    5.7 (Berkeley) 3/1/91";  static char sccsid[] = "@(#)compat.c    8.2 (Berkeley) 3/19/94";
 #else  #else
 static char rcsid[] = "$OpenBSD$";  static char rcsid[] = "$OpenBSD$";
 #endif  #endif
Line 108 
Line 108 
     int     signo;      int     signo;
 {  {
     GNode   *gn;      GNode   *gn;
   
     if ((curTarg != NILGNODE) && !Targ_Precious (curTarg)) {      if ((curTarg != NILGNODE) && !Targ_Precious (curTarg)) {
         char      *p1;          char      *p1;
         char      *file = Var_Value (TARGET, curTarg, &p1);          char      *file = Var_Value (TARGET, curTarg, &p1);
Line 169 
Line 169 
     char          *cmd = (char *) cmdp;      char          *cmd = (char *) cmdp;
     GNode         *gn = (GNode *) gnp;      GNode         *gn = (GNode *) gnp;
   
     /*      /*
      * Avoid clobbered variable warnings by forcing the compiler       * Avoid clobbered variable warnings by forcing the compiler
      * to ``unregister'' variables       * to ``unregister'' variables
      */       */
Line 189 
Line 189 
      * command? In any case, we warn the user that the command expanded to       * command? In any case, we warn the user that the command expanded to
      * nothing (is this the right thing to do?).       * nothing (is this the right thing to do?).
      */       */
   
     if (*cmdStart == '\0') {      if (*cmdStart == '\0') {
         free(cmdStart);          free(cmdStart);
         Error("%s expands to empty string", cmd);          Error("%s expands to empty string", cmd);
Line 218 
Line 218 
   
     while (isspace((unsigned char)*cmd))      while (isspace((unsigned char)*cmd))
         cmd++;          cmd++;
   
     /*      /*
      * Search for meta characters in the command. If there are no meta       * Search for meta characters in the command. If there are no meta
      * characters, there's no need to execute a shell to execute the       * characters, there's no need to execute a shell to execute the
Line 244 
Line 244 
     if (noExecute) {      if (noExecute) {
         return (0);          return (0);
     }      }
   
     if (*cp != '\0') {      if (*cp != '\0') {
         /*          /*
          * If *cp isn't the null character, we hit a "meta" character and           * If *cp isn't the null character, we hit a "meta" character and
Line 269 
Line 269 
         av = brk_string(cmd, &argc, TRUE);          av = brk_string(cmd, &argc, TRUE);
         av += 1;          av += 1;
     }      }
   
     local = TRUE;      local = TRUE;
   
     /*      /*
Line 291 
Line 291 
     }      }
     free(cmdStart);      free(cmdStart);
     Lst_Replace (cmdNode, (ClientData) NULL);      Lst_Replace (cmdNode, (ClientData) NULL);
   
     /*      /*
      * The child is off and running. Now all we can do is wait...       * The child is off and running. Now all we can do is wait...
      */       */
Line 302 
Line 302 
                 break;                  break;
             }              }
         }          }
   
         if (stat > -1) {          if (stat > -1) {
             if (WIFSTOPPED(reason)) {              if (WIFSTOPPED(reason)) {
                 status = WSTOPSIG(reason);              /* stopped */                  status = WSTOPSIG(reason);              /* stopped */
Line 314 
Line 314 
             } else {              } else {
                 status = WTERMSIG(reason);              /* signaled */                  status = WTERMSIG(reason);              /* signaled */
                 printf ("*** Signal %d", status);                  printf ("*** Signal %d", status);
             }              }
   
   
             if (!WIFEXITED(reason) || (status != 0)) {              if (!WIFEXITED(reason) || (status != 0)) {
                 if (errCheck) {                  if (errCheck) {
                     gn->made = ERROR;                      gn->made = ERROR;
Line 393 
Line 393 
             if (p1)              if (p1)
                 free(p1);                  free(p1);
         }          }
   
         /*          /*
          * All the children were made ok. Now cmtime contains the modification           * All the children were made ok. Now cmtime contains the modification
          * time of the newest child, we need to find out if we exist and when           * time of the newest child, we need to find out if we exist and when
Line 427 
Line 427 
          * Make_DoAllVar().           * Make_DoAllVar().
          */           */
         Make_DoAllVar(gn);          Make_DoAllVar(gn);
   
         /*          /*
          * Alter our type to tell if errors should be ignored or things           * Alter our type to tell if errors should be ignored or things
          * should not be printed so CompatRunCommand knows what to do.           * should not be printed so CompatRunCommand knows what to do.
Line 568 
Line 568 
   
     return (0);      return (0);
 }  }
   
 /*-  /*-
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
  * Compat_Run --   * Compat_Run --
Line 620 
Line 620 
         gn = Targ_FindNode(".BEGIN", TARG_NOCREATE);          gn = Targ_FindNode(".BEGIN", TARG_NOCREATE);
         if (gn != NILGNODE) {          if (gn != NILGNODE) {
             Lst_ForEach(gn->commands, CompatRunCommand, (ClientData)gn);              Lst_ForEach(gn->commands, CompatRunCommand, (ClientData)gn);
               if (gn->made == ERROR) {
                   printf("\n\nStop.\n");
                   exit(1);
               }
         }          }
     }      }
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4