[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.57 and 1.58

version 1.57, 2002/03/02 00:23:14 version 1.58, 2002/12/30 02:29:24
Line 199 
Line 199 
         int c;          int c;
         int forceJobs = 0;          int forceJobs = 0;
   
   #define OPTFLAGS "BD:I:PSV:d:ef:ij:km:nqrst"
   #define OPTLETTERS "BPSiknqrst"
   
         optind = 1;     /* since we're called more than once */          optind = 1;     /* since we're called more than once */
 # define OPTFLAGS "BD:I:PSV:d:ef:ij:km:nqrst"          optreset = 1;
 # define OPTLETTERS "BPSiknqrst"          while (optind < argc) {
 rearg:  while ((c = getopt(argc, argv, OPTFLAGS)) != -1) {                  switch (c = getopt(argc, argv, OPTFLAGS)) {
                 switch (c) {  
                 case 'D':                  case 'D':
                         Var_Set(optarg, "1", VAR_GLOBAL);                          Var_Set(optarg, "1", VAR_GLOBAL);
                         record_option(c, optarg);                          record_option(c, optarg);
Line 296 
Line 298 
                         Dir_AddDir(sysIncPath, optarg);                          Dir_AddDir(sysIncPath, optarg);
                         record_option(c, optarg);                          record_option(c, optarg);
                         break;                          break;
                   case -1:
                           /* Check for variable assignments and targets. */
                           if (!Parse_DoVar(argv[optind], VAR_CMD)) {
                                   if (!*argv[optind])
                                           Punt("illegal (null) argument.");
                                   if (strcmp(argv[optind], "--") != 0)
                                           Lst_AtEnd(create, estrdup(argv[optind]));
                           }
                           optind++;       /* skip over non-option */
                           break;
                 default:                  default:
                         posixParseOptLetter(c);                          posixParseOptLetter(c);
                 }                  }
Line 309 
Line 321 
                 compatMake = true;                  compatMake = true;
   
         oldVars = true;          oldVars = true;
   
         /*  
          * See if the rest of the arguments are variable assignments and  
          * perform them if so. Else take them to be targets and stuff them  
          * on the end of the "create" list.  
          */  
         for (argv += optind, argc -= optind; *argv; ++argv, --argc)  
                 if (!Parse_DoVar(*argv, VAR_CMD)) {  
                         if (!**argv)  
                                 Punt("illegal (null) argument.");  
                         if (**argv == '-') {  
                                 if ((*argv)[1])  
                                         optind = 0;     /* -flag... */  
                                 else  
                                         optind = 1;     /* - */  
                                 goto rearg;  
                         }  
                         Lst_AtEnd(create, estrdup(*argv));  
                 }  
 }  }
   
 /*-  /*-

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58