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

Diff for /src/usr.bin/make/parse.c between version 1.126 and 1.127

version 1.126, 2020/01/13 13:54:44 version 1.127, 2020/01/13 13:59:24
Line 837 
Line 837 
         Array_Reset(&gsources);          Array_Reset(&gsources);
   
         cp = parse_do_targets(&paths, &tOp, line);          cp = parse_do_targets(&paths, &tOp, line);
           assert(specType == SPECIAL_PATH || Lst_IsEmpty(&paths));
         if (cp == NULL || specType == SPECIAL_ERROR) {          if (cp == NULL || specType == SPECIAL_ERROR) {
                 /* invalidate targets for further processing */                  /* invalidate targets for further processing */
                 Array_Reset(&gtargets);                  Array_Reset(&gtargets);
Line 855 
Line 856 
   
         line = cp;          line = cp;
   
         /*          /* Several special targets have specific semantics with no source:
          * Several special targets take different actions if present with no           *      .SUFFIXES       clears out all old suffixes
          * sources:           *      .PRECIOUS/.IGNORE/.SILENT
          *      a .SUFFIXES line with no sources clears out all old suffixes           *                      apply to all target
          *      a .PRECIOUS line makes all targets precious           *      .PATH           clears out all search paths.  */
          *      a .IGNORE line ignores errors for all targets  
          *      a .SILENT line creates silence when making all targets  
          *      a .PATH removes all directories from the search path(s).  
          */  
         if (!*line) {          if (!*line) {
                 switch (specType) {                  switch (specType) {
                 case SPECIAL_SUFFIXES:                  case SPECIAL_SUFFIXES:
Line 885 
Line 882 
                         break;                          break;
                 }                  }
         } else if (specType == SPECIAL_MFLAGS) {          } else if (specType == SPECIAL_MFLAGS) {
                 /* Call on functions in main.c to deal with these arguments */  
                 Main_ParseArgLine(line);                  Main_ParseArgLine(line);
                 return;                  return;
         } else if (specType == SPECIAL_NOTPARALLEL) {          } else if (specType == SPECIAL_NOTPARALLEL) {
                 return;                  return;
         }          }
   
         /*          /* NOW GO FOR THE SOURCES */
          * NOW GO FOR THE SOURCES  
          */  
         if (specType == SPECIAL_SUFFIXES || specType == SPECIAL_PATH ||          if (specType == SPECIAL_SUFFIXES || specType == SPECIAL_PATH ||
             specType == SPECIAL_NOTHING) {              specType == SPECIAL_NOTHING) {
                 while (*line) {                  while (*line) {
                     /*                      /* Some special targets take a list of space-separated
                      * If the target was one that doesn't take files as its                       * words.  For each word,
                      * sources but takes something like suffixes, we take each  
                      * space-separated word on the line as a something and deal  
                      * with it accordingly.  
                      *                       *
                      * If the target was .SUFFIXES, we take each source as a                       * if .SUFFIXES, add it to the list of suffixes maintained
                      * suffix and add it to the list of suffixes maintained by                       * by suff.c.
                      * the Suff module.  
                      *                       *
                      * If the target was a .PATH, we add the source as a                       * if .PATHS, add it as a directory on the main search path.
                      * directory to search on the search path.  
                      *                       *
                      * If it was .INCLUDES, the source is taken to be the                       * if .LIBS/.INCLUDE/.NULL... this has been deprecated,
                      * suffix of files which will be #included and whose search                       * ignore
                      * path should be present in the .INCLUDES variable.  
                      *  
                      * If it was .LIBS, the source is taken to be the suffix of  
                      * files which are considered libraries and whose search  
                      * path should be present in the .LIBS variable.  
                      *  
                      * If it was .NULL, the source is the suffix to use when a  
                      * file has no valid suffix.  
                      */                       */
                     while (*cp && !ISSPACE(*cp))                      while (*cp && !ISSPACE(*cp))
                             cp++;                              cp++;
Line 936 
Line 917 
                                 ln = Lst_Adv(ln))                                  ln = Lst_Adv(ln))
                                     Dir_AddDiri(Lst_Datum(ln), line, cp);                                      Dir_AddDiri(Lst_Datum(ln), line, cp);
                             break;                              break;
                               Lst_Destroy(&paths, NOFREE);
                             }                              }
                     default:                      default:
                             break;                              break;
Line 946 
Line 928 
                         cp++;                          cp++;
                     line = cp;                      line = cp;
                 }                  }
                 Lst_Destroy(&paths, NOFREE);  
         } else {          } else {
                 while (*line) {                  while (*line) {
                         /*                          /*

Legend:
Removed from v.1.126  
changed lines
  Added in v.1.127