[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.124 and 1.125

version 1.124, 2020/01/08 14:09:29 version 1.125, 2020/01/13 14:51:50
Line 73 
Line 73 
 Lst create = &to_create;  Lst create = &to_create;
 bool            allPrecious;    /* .PRECIOUS given on line by itself */  bool            allPrecious;    /* .PRECIOUS given on line by itself */
   
 static bool             noBuiltins;     /* -r flag */  static bool     noBuiltins;     /* -r flag */
 static LIST             makefiles;      /* ordered list of makefiles to read */  static LIST     makefiles;      /* ordered list of makefiles to read */
 static LIST             varstoprint;    /* list of variables to print */  static LIST     varstoprint;    /* list of variables to print */
 int                     maxJobs;        /* -j argument */  static int      optj;           /* -j argument */
 bool            compatMake;     /* -B argument */  static bool     compatMake;     /* -B argument */
 static bool             forceJobs = false;  static bool     forceJobs = false;
 int             debug;          /* -d flag */  int             debug;          /* -d flag */
 bool            noExecute;      /* -n flag */  bool            noExecute;      /* -n flag */
 bool            keepgoing;      /* -k flag */  bool            keepgoing;      /* -k flag */
Line 126 
Line 126 
                 Var_Append(MAKEFLAGS, arg);                  Var_Append(MAKEFLAGS, arg);
 }  }
   
   void
   set_notparallel()
   {
           compatMake = true;
   }
   
 static void  static void
 posixParseOptLetter(int c)  posixParseOptLetter(int c)
 {  {
Line 313 
Line 319 
                         const char *errstr;                          const char *errstr;
   
                         forceJobs = true;                          forceJobs = true;
                         maxJobs = strtonum(optarg, 1, INT_MAX, &errstr);                          optj = strtonum(optarg, 1, INT_MAX, &errstr);
                         if (errstr != NULL) {                          if (errstr != NULL) {
                                 fprintf(stderr,                                  fprintf(stderr,
                                     "make: illegal argument to -j option"                                      "make: illegal argument to -j option"
Line 676 
Line 682 
         touchFlag = false;              /* Actually update targets */          touchFlag = false;              /* Actually update targets */
         debug = 0;                      /* No debug verbosity, please. */          debug = 0;                      /* No debug verbosity, please. */
   
         maxJobs = DEFMAXJOBS;          optj = DEFMAXJOBS;
         compatMake = false;             /* No compat mode */          compatMake = false;             /* No compat mode */
   
   
Line 757 
Line 763 
   
         read_all_make_rules(noBuiltins, read_depend, &makefiles, &d);          read_all_make_rules(noBuiltins, read_depend, &makefiles, &d);
   
           if (compatMake)
                   optj = 1;
   
         Var_Append("MFLAGS", Var_Value(MAKEFLAGS));          Var_Append("MFLAGS", Var_Value(MAKEFLAGS));
   
         /* Install all the flags into the MAKEFLAGS env variable. */          /* Install all the flags into the MAKEFLAGS env variable. */
Line 796 
Line 805 
                 else                  else
                         Targ_FindList(&targs, create);                          Targ_FindList(&targs, create);
   
                 Job_Init(maxJobs);                  Job_Init(optj);
                 /* If the user has defined a .BEGIN target, execute the commands                  /* If the user has defined a .BEGIN target, execute the commands
                  * attached to it.  */                   * attached to it.  */
                 if (!queryFlag)                  if (!queryFlag)

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.125