version 1.124, 2020/01/08 14:09:29 |
version 1.125, 2020/01/13 14:51:50 |
|
|
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 */ |
|
|
Var_Append(MAKEFLAGS, arg); |
Var_Append(MAKEFLAGS, arg); |
} |
} |
|
|
|
void |
|
set_notparallel() |
|
{ |
|
compatMake = true; |
|
} |
|
|
static void |
static void |
posixParseOptLetter(int c) |
posixParseOptLetter(int c) |
{ |
{ |
|
|
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" |
|
|
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 */ |
|
|
|
|
|
|
|
|
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. */ |
|
|
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) |