+ Add the -Q be-quiet flag for parallel jobs.
- Enable -Q by default for the moment - there is something weird going on in the rescue build.
This commit is contained in:
parent
efe3f87721
commit
a3f555f083
@ -76,6 +76,7 @@ extern Boolean compatMake; /* True if we are make compatible */
|
||||
extern Boolean ignoreErrors; /* True if should ignore all errors */
|
||||
extern Boolean beSilent; /* True if should print no commands */
|
||||
extern Boolean beVerbose; /* True if should print extra cruft */
|
||||
extern Boolean beQuiet; /* True if want quiet headers with -j */
|
||||
extern Boolean noExecute; /* True if should execute nothing */
|
||||
extern Boolean allPrecious; /* True if every target is precious */
|
||||
extern Boolean is_posix; /* .POSIX target seen */
|
||||
|
@ -2363,7 +2363,7 @@ Job_Init(int maxproc)
|
||||
|
||||
lastNode = NULL;
|
||||
|
||||
if (maxJobs == 1 && fifoFd < 0) {
|
||||
if ((maxJobs == 1 && fifoFd < 0) || beQuiet || beVerbose == 0) {
|
||||
/*
|
||||
* If only one job can run at a time, there's no need for a
|
||||
* banner, no is there?
|
||||
|
@ -126,6 +126,7 @@ Boolean is_posix; /* .POSIX target seen */
|
||||
Boolean mfAutoDeps; /* .MAKEFILEDEPS target seen */
|
||||
Boolean beSilent; /* -s flag */
|
||||
Boolean beVerbose; /* -v flag */
|
||||
Boolean beQuiet = TRUE; /* -Q flag */
|
||||
Boolean compatMake; /* -B argument */
|
||||
int debug; /* -d flag */
|
||||
Boolean ignoreErrors; /* -i flag */
|
||||
@ -370,7 +371,7 @@ MainParseArgs(int argc, char **argv)
|
||||
rearg:
|
||||
optind = 1; /* since we're called more than once */
|
||||
optreset = 1;
|
||||
#define OPTFLAGS "ABC:D:E:I:PSV:Xd:ef:ij:km:npqrstvx:"
|
||||
#define OPTFLAGS "ABC:D:E:I:PSV:Xd:ef:ij:km:nQpqrstvx:"
|
||||
for (;;) {
|
||||
if ((optind < argc) && strcmp(argv[optind], "--") == 0) {
|
||||
found_dd = TRUE;
|
||||
@ -516,6 +517,10 @@ MainParseArgs(int argc, char **argv)
|
||||
printGraphOnly = TRUE;
|
||||
debug |= DEBUG_GRAPH1;
|
||||
break;
|
||||
case 'Q':
|
||||
beQuiet = TRUE;
|
||||
MFLAGS_append("-Q", NULL);
|
||||
break;
|
||||
case 'q':
|
||||
queryFlag = TRUE;
|
||||
/* Kind of nonsensical, wot? */
|
||||
@ -535,6 +540,7 @@ MainParseArgs(int argc, char **argv)
|
||||
break;
|
||||
case 'v':
|
||||
beVerbose = TRUE;
|
||||
beQuiet = FALSE;
|
||||
MFLAGS_append("-v", NULL);
|
||||
break;
|
||||
case 'x':
|
||||
|
@ -258,6 +258,9 @@ When combined with
|
||||
only the builtin rules of
|
||||
.Nm
|
||||
are displayed.
|
||||
.It Fl Q
|
||||
Be extra quiet.
|
||||
For multi-job makes, this will cause file banners not to be generated.
|
||||
.It Fl q
|
||||
Do not execute any commands, but exit 0 if the specified targets are
|
||||
up-to-date and 1, otherwise.
|
||||
@ -289,7 +292,7 @@ the variables will be printed one per line,
|
||||
with a blank line for each null or undefined variable.
|
||||
.It Fl v
|
||||
Be extra verbose.
|
||||
For multi-job makes, this will cause file banners to be generated.
|
||||
Print any extra information.
|
||||
.It Fl X
|
||||
When using the
|
||||
.Fl V
|
||||
|
@ -946,12 +946,14 @@ VarFindAny(const char name[], GNode *ctxt)
|
||||
* The name and val arguments are duplicated so they may
|
||||
* safely be freed.
|
||||
*/
|
||||
static void
|
||||
static Var *
|
||||
VarAdd(const char *name, const char *val, GNode *ctxt)
|
||||
{
|
||||
Var *v;
|
||||
|
||||
Lst_AtFront(&ctxt->context, VarCreate(name, val, 0));
|
||||
Lst_AtFront(&ctxt->context, v = VarCreate(name, val, 0));
|
||||
DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, name, val));
|
||||
return (v);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1004,30 +1006,22 @@ Var_Set(const char *name, const char *val, GNode *ctxt)
|
||||
n = VarPossiblyExpand(name, ctxt);
|
||||
v = VarFindOnly(n, ctxt);
|
||||
if (v == NULL) {
|
||||
VarAdd(n, val, ctxt);
|
||||
if (ctxt == VAR_CMD) {
|
||||
/*
|
||||
* Any variables given on the command line
|
||||
* are automatically exported to the
|
||||
* environment (as per POSIX standard)
|
||||
*/
|
||||
setenv(n, val, 1);
|
||||
}
|
||||
v = VarAdd(n, val, ctxt);
|
||||
} else {
|
||||
Buf_Clear(v->val);
|
||||
Buf_Append(v->val, val);
|
||||
|
||||
if (ctxt == VAR_CMD || (v->flags & VAR_TO_ENV)) {
|
||||
/*
|
||||
* Any variables given on the command line
|
||||
* are automatically exported to the
|
||||
* environment (as per POSIX standard)
|
||||
*/
|
||||
setenv(n, val, 1);
|
||||
}
|
||||
DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, n, val));
|
||||
}
|
||||
|
||||
if (ctxt == VAR_CMD || (v->flags & VAR_TO_ENV)) {
|
||||
/*
|
||||
* Any variables given on the command line
|
||||
* are automatically exported to the
|
||||
* environment (as per POSIX standard)
|
||||
*/
|
||||
setenv(n, val, 1);
|
||||
}
|
||||
|
||||
free(n);
|
||||
}
|
||||
|
||||
@ -2325,7 +2319,8 @@ match_var(const char str[], const char var[])
|
||||
* None. The old string must be freed by the caller
|
||||
*/
|
||||
Buffer *
|
||||
Var_Subst(const char *str, GNode *ctxt, Boolean err)
|
||||
//Var_Subst(const char *var, const char *str, GNode *ctxt, Boolean undefErr)
|
||||
Var_Subst( const char *str, GNode *ctxt, Boolean err)
|
||||
{
|
||||
Boolean errorReported;
|
||||
Buffer *buf; /* Buffer for forming things */
|
||||
|
Loading…
Reference in New Issue
Block a user