version 1.45, 1998/11/01 03:07:34 |
version 1.46, 1999/08/02 15:23:11 |
Line 169 MainParseArgs(argc, argv) |
|
Line 169 MainParseArgs(argc, argv) |
|
{ |
{ |
extern int optind; |
extern int optind; |
extern char *optarg; |
extern char *optarg; |
int c; |
int c, rc; |
int forceJobs = 0; |
int forceJobs = 0; |
|
|
optind = 1; /* since we're called more than once */ |
optind = 1; /* since we're called more than once */ |
Line 201 rearg: while((c = getopt(argc, argv, OPT |
|
Line 201 rearg: while((c = getopt(argc, argv, OPT |
|
break; |
break; |
#ifdef REMOTE |
#ifdef REMOTE |
case 'L': |
case 'L': |
maxLocal = atoi(optarg); |
rc = sscanf(optarg, "%d", &maxLocal); |
|
if (rc < 1 || maxLocal < 1) { |
|
(void) fprintf(stderr, "make: illegal argument to -L -- must be positive integer!\n"); |
|
exit(1); |
|
} |
Var_Append(MAKEFLAGS, "-L", VAR_GLOBAL); |
Var_Append(MAKEFLAGS, "-L", VAR_GLOBAL); |
Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL); |
Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL); |
break; |
break; |
Line 282 rearg: while((c = getopt(argc, argv, OPT |
|
Line 286 rearg: while((c = getopt(argc, argv, OPT |
|
break; |
break; |
case 'j': |
case 'j': |
forceJobs = TRUE; |
forceJobs = TRUE; |
maxJobs = atoi(optarg); |
rc = sscanf(optarg, "%d", &maxJobs); |
|
if (rc < 1 || maxJobs < 1) { |
|
(void) fprintf(stderr, "make: illegal argument to -j -- must be positive integer!\n"); |
|
exit(1); |
|
} |
#ifndef REMOTE |
#ifndef REMOTE |
maxLocal = maxJobs; |
maxLocal = maxJobs; |
#endif |
#endif |