[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.11 and 1.12

version 1.11, 1998/07/13 02:11:37 version 1.12, 1998/12/05 00:06:27
Line 75 
Line 75 
  *                              Hence, the makefile must have been parsed   *                              Hence, the makefile must have been parsed
  *                              before this function is called.   *                              before this function is called.
  *   *
    *      Job_End                 Cleanup any memory used.
    *
  *      Job_Full                Return TRUE if the job table is filled.   *      Job_Full                Return TRUE if the job table is filled.
  *   *
  *      Job_Empty               Return TRUE if the job table is completely   *      Job_Empty               Return TRUE if the job table is completely
Line 84 
Line 86 
  *                              the line as a shell specification. Returns   *                              the line as a shell specification. Returns
  *                              FAILURE if the spec was incorrect.   *                              FAILURE if the spec was incorrect.
  *   *
  *      Job_End                 Perform any final processing which needs doing.   *      Job_Finish              Perform any final processing which needs doing.
  *                              This includes the execution of any commands   *                              This includes the execution of any commands
  *                              which have been/were attached to the .END   *                              which have been/were attached to the .END
  *                              target. It should only be called when the   *                              target. It should only be called when the
Line 215 
Line 217 
                                                    * Job_ParseShell function */                                                     * Job_ParseShell function */
 static char     *shellPath = NULL,                /* full pathname of  static char     *shellPath = NULL,                /* full pathname of
                                                    * executable image */                                                     * executable image */
                 *shellName;                       /* last component of shell */                  *shellName = NULL,                /* last component of shell */
                   *shellArgv = NULL;                /* Custom shell args */
   
   
 static int      maxJobs;        /* The most children we can run at once */  static int      maxJobs;        /* The most children we can run at once */
Line 1111 
Line 1114 
              */               */
             Make_HandleUse(DEFAULT, gn);              Make_HandleUse(DEFAULT, gn);
             Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), gn);              Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), gn);
             if (p1)              efree(p1);
                 free(p1);  
         } else if (Dir_MTime(gn) == 0) {          } else if (Dir_MTime(gn) == 0) {
             /*              /*
              * The node wasn't the target of an operator we have no .DEFAULT               * The node wasn't the target of an operator we have no .DEFAULT
Line 2681 
Line 2683 
     while (isspace(*line)) {      while (isspace(*line)) {
         line++;          line++;
     }      }
     words = brk_string(line, &wordCount, TRUE);  
   
       efree(shellArgv);
   
       words = brk_string(line, &wordCount, TRUE, &shellArgv);
   
     memset((Address)&newShell, 0, sizeof(newShell));      memset((Address)&newShell, 0, sizeof(newShell));
   
     /*      /*
      * Parse the specification by keyword       * Parse the specification by keyword
      */       */
     for (path = NULL, argc = wordCount - 1, argv = words + 1;      for (path = NULL, argc = wordCount - 1, argv = words;
          argc != 0;           argc != 0;
          argc--, argv++) {           argc--, argv++) {
              if (strncmp(*argv, "path=", 5) == 0) {               if (strncmp(*argv, "path=", 5) == 0) {
Line 2718 
Line 2723 
                  } else {                   } else {
                      Parse_Error(PARSE_FATAL, "Unknown keyword \"%s\"",                       Parse_Error(PARSE_FATAL, "Unknown keyword \"%s\"",
                                   *argv);                                    *argv);
                        free(words);
                      return(FAILURE);                       return(FAILURE);
                  }                   }
                  fullSpec = TRUE;                   fullSpec = TRUE;
Line 2937 
Line 2943 
   
 /*  /*
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
  * Job_End --   * Job_Finish --
  *      Do final processing such as the running of the commands   *      Do final processing such as the running of the commands
  *      attached to the .END target.   *      attached to the .END target.
  *   *
Line 2950 
Line 2956 
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
  */   */
 int  int
 Job_End()  Job_Finish()
 {  {
     if (postCommands != NILGNODE && !Lst_IsEmpty(postCommands->commands)) {      if (postCommands != NILGNODE && !Lst_IsEmpty(postCommands->commands)) {
         if (errors) {          if (errors) {
Line 2970 
Line 2976 
     return(errors);      return(errors);
 }  }
   
   /*-
    *-----------------------------------------------------------------------
    * Job_End --
    *      Cleanup any memory used by the jobs module
    *
    * Results:
    *      None.
    *
    * Side Effects:
    *      Memory is freed
    *-----------------------------------------------------------------------
    */
   void
   Job_End()
   {
       efree(shellArgv);
   }
   
 /*-  /*-
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
  * Job_Wait --   * Job_Wait --

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12