[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.84 and 1.85

version 1.84, 2007/09/17 08:36:57 version 1.85, 2007/09/17 09:28:36
Line 1142 
Line 1142 
   
         /* Handle non-system non-absolute files... */          /* Handle non-system non-absolute files... */
         if (!isSystem && file[0] != '/') {          if (!isSystem && file[0] != '/') {
                 /* ... by looking first under the same directory as the                  /* ... by looking first under the same directory as the
                  * current file */                   * current file */
                 char *slash;                  char *slash;
                 const char *fname;                  const char *fname;
Line 1153 
Line 1153 
                 if (slash != NULL) {                  if (slash != NULL) {
                         char *newName;                          char *newName;
   
                         newName = Str_concati(fname, slash, file,                          newName = Str_concati(fname, slash, file,
                             strchr(file, '\0'), '/');                              strchr(file, '\0'), '/');
                         fullname = Dir_FindFile(newName, parseIncPath);                          fullname = Dir_FindFile(newName, parseIncPath);
                         if (fullname == NULL)                          if (fullname == NULL)
Line 1183 
Line 1183 
 }  }
   
 static void  static void
 handle_include_file(const char *name, const char *ename, bool isSystem,  handle_include_file(const char *name, const char *ename, bool isSystem,
     bool errIfNotFound)      bool errIfNotFound)
 {  {
         char *file;          char *file;
Line 1214 
Line 1214 
 static bool  static bool
 lookup_bsd_include(const char *file)  lookup_bsd_include(const char *file)
 {  {
         char endc;          char endc;
         const char *efile;          const char *efile;
         bool isSystem;          bool isSystem;
   
Line 1249 
Line 1249 
   
   
 static void  static void
 lookup_sysv_style_include(const char *file, const char *directive,  lookup_sysv_style_include(const char *file, const char *directive,
     bool errIfMissing)      bool errIfMissing)
 {  {
         const char *efile;          const char *efile;
Line 1344 
Line 1344 
                 break;                  break;
         }          }
         if ((*p != '\0' && *p != '#') || type == POISON_INVALID) {          if ((*p != '\0' && *p != '#') || type == POISON_INVALID) {
                 Parse_Error(PARSE_WARNING, "Invalid syntax for .poison: %s",                  Parse_Error(PARSE_WARNING, "Invalid syntax for .poison: %s",
                     line);                      line);
                 return false;                  return false;
         } else {          } else {
Line 1447 
Line 1447 
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case COND_PARSE:          case COND_PARSE:
                 return true;                  return true;
         case COND_ISFOR:          case COND_ISFOR:
                 return handle_for_loop(linebuf, line);                  return handle_for_loop(linebuf, line);
         case COND_ISINCLUDE:          case COND_ISINCLUDE:
                 return lookup_bsd_include(line + 7);                  return lookup_bsd_include(line + 7);
         case COND_ISPOISON:          case COND_ISPOISON:
                 return handle_poison(line+6);                  return handle_poison(line+6);
         case COND_ISUNDEF:          case COND_ISUNDEF:
                 return handle_undef(line + 5);                  return handle_undef(line + 5);
         default:          default:
                 break;                  break;
Line 1523 
Line 1523 
             } else {              } else {
                 char *stripped;                  char *stripped;
                 stripped = strip_comments(&copy, line);                  stripped = strip_comments(&copy, line);
                 if (*stripped == '.' && handle_bsd_command(&buf, &copy,                  if (*stripped == '.' && handle_bsd_command(&buf, &copy,
                     stripped+1))                      stripped+1))
                         ;                          ;
                 else if (FEATURES(FEATURE_SYSVINCLUDE) &&                  else if (FEATURES(FEATURE_SYSVINCLUDE) &&
                     strncmp(stripped, "include", 7) == 0 &&                      strncmp(stripped, "include", 7) == 0 &&
                     isspace(stripped[7]) &&                      isspace(stripped[7]) &&
                     strchr(stripped, ':') == NULL) {                      strchr(stripped, ':') == NULL) {
                     /* It's an S3/S5-style "include".  */                      /* It's an S3/S5-style "include".  */
                         lookup_sysv_include(stripped + 7, "include");                          lookup_sysv_include(stripped + 7, "include");
                 } else if (FEATURES(FEATURE_CONDINCLUDE) &&                  } else if (FEATURES(FEATURE_CONDINCLUDE) &&
                     strncmp(stripped, "sinclude", 8) == 0 &&                      strncmp(stripped, "sinclude", 8) == 0 &&
                     isspace(stripped[8]) &&                      isspace(stripped[8]) &&
                     strchr(stripped, ':') == NULL) {                      strchr(stripped, ':') == NULL) {
                         lookup_conditional_include(stripped+8, "sinclude");                          lookup_conditional_include(stripped+8, "sinclude");
                 } else if (FEATURES(FEATURE_CONDINCLUDE) &&                  } else if (FEATURES(FEATURE_CONDINCLUDE) &&
                     strncmp(stripped, "-include", 8) == 0 &&                      strncmp(stripped, "-include", 8) == 0 &&
                     isspace(stripped[8]) &&                      isspace(stripped[8]) &&
                     strchr(stripped, ':') == NULL) {                      strchr(stripped, ':') == NULL) {
                         lookup_conditional_include(stripped+8, "-include");                          lookup_conditional_include(stripped+8, "-include");

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85