[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.60 and 1.61

version 1.60, 2003/04/06 22:47:14 version 1.61, 2003/04/21 23:14:06
Line 194 
Line 194 
         int argc;          int argc;
         char **argv;          char **argv;
 {  {
         extern int optind;          int c, optend;
         extern char *optarg;  
         int c;  
         int forceJobs = 0;          int forceJobs = 0;
   
 #define OPTFLAGS "BD:I:PSV:d:ef:ij:km:nqrst"  #define OPTFLAGS "BD:I:PSV:d:ef:ij:km:nqrst"
Line 204 
Line 202 
   
         optind = 1;     /* since we're called more than once */          optind = 1;     /* since we're called more than once */
         optreset = 1;          optreset = 1;
           optend = 0;
         while (optind < argc) {          while (optind < argc) {
                 switch (c = getopt(argc, argv, OPTFLAGS)) {                  if (!optend && argv[optind][0] == '-') {
                           if (argv[optind][1] == '\0')
                                   optind++;       /* ignore "-" */
                           else if (argv[optind][1] == '-' &&
                               argv[optind][2] == '\0') {
                                   optind++;       /* ignore "--" */
                                   optend++;       /* "--" denotes end of flags */
                           }
                   }
                   c = optend ? -1 : 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 304 
Line 313 
                             !Parse_DoVar(argv[optind], VAR_CMD)) {                              !Parse_DoVar(argv[optind], VAR_CMD)) {
                                 if (!*argv[optind])                                  if (!*argv[optind])
                                         Punt("illegal (null) argument.");                                          Punt("illegal (null) argument.");
                                 if (strcmp(argv[optind], "-") != 0)                                  Lst_AtEnd(create, estrdup(argv[optind]));
                                         Lst_AtEnd(create, estrdup(argv[optind]));  
                         }                          }
                         optind++;       /* skip over non-option */                          optind++;       /* skip over non-option */
                         break;                          break;

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61