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

Diff for /src/usr.bin/make/main.c between version 1.88 and 1.89

version 1.88, 2007/11/03 11:44:30 version 1.89, 2007/11/17 09:49:53
Line 118 
Line 118 
   
 static void setup_VPATH(void);  static void setup_VPATH(void);
   
 static void read_all_make_rules(bool, Lst, struct dirs *);  static void read_all_make_rules(bool, bool, Lst, struct dirs *);
 static void read_makefile_list(Lst, struct dirs *);  static void read_makefile_list(Lst, struct dirs *);
 static int ReadMakefile(void *, void *);  static int ReadMakefile(void *, void *);
   
Line 586 
Line 586 
 }  }
   
 static void  static void
 read_all_make_rules(bool noBuiltins, Lst makefiles, struct dirs *d)  read_all_make_rules(bool noBuiltins, bool read_depend,
       Lst makefiles, struct dirs *d)
 {  {
         /*          /*
          * Read in the built-in rules first, followed by the specified           * Read in the built-in rules first, followed by the specified
Line 613 
Line 614 
                 if (!ReadMakefile("makefile", d))                  if (!ReadMakefile("makefile", d))
                         (void)ReadMakefile("Makefile", d);                          (void)ReadMakefile("Makefile", d);
   
         /* Always read a .depend file, if it exists. */          /* read a .depend file, if it exists, and we're not building depend */
         (void)ReadMakefile(".depend", d);  
           if (read_depend)
                   (void)ReadMakefile(".depend", d);
 }  }
   
   
Line 646 
Line 649 
         const char *syspath = _PATH_DEFSYSPATH;          const char *syspath = _PATH_DEFSYSPATH;
         char *p;          char *p;
         static struct dirs d;          static struct dirs d;
           bool read_depend = true;/* false if we don't want to read .depend */
   
         no_fd_limits();          no_fd_limits();
         setup_CURDIR_OBJDIR(&d, machine);          setup_CURDIR_OBJDIR(&d, machine);
Line 725 
Line 729 
                 for (ln = Lst_First(create); ln != NULL; ln = Lst_Adv(ln)) {                  for (ln = Lst_First(create); ln != NULL; ln = Lst_Adv(ln)) {
                         char *name = (char *)Lst_Datum(ln);                          char *name = (char *)Lst_Datum(ln);
   
                           if (strcmp(name, "depend") == 0)
                                   read_depend = false;
   
                         Var_Append(".TARGETS", name);                          Var_Append(".TARGETS", name);
                 }                  }
         } else          } else
Line 739 
Line 746 
         if (Lst_IsEmpty(systemIncludePath))          if (Lst_IsEmpty(systemIncludePath))
             add_dirpath(systemIncludePath, syspath);              add_dirpath(systemIncludePath, syspath);
   
         read_all_make_rules(noBuiltins, &makefiles, &d);          read_all_make_rules(noBuiltins, read_depend, &makefiles, &d);
   
         Var_Append("MFLAGS", Var_Value(MAKEFLAGS));          Var_Append("MFLAGS", Var_Value(MAKEFLAGS));
   

Legend:
Removed from v.1.88  
changed lines
  Added in v.1.89