diff options
author | obrien <obrien@FreeBSD.org> | 2009-01-03 10:14:01 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2009-01-03 10:14:01 +0000 |
commit | a3f555f083888fd170c838c4620b5f3355c05886 (patch) | |
tree | 8485f281917e9edc0e34919c38ef1f84e6c69514 /usr.bin/make/var.c | |
parent | efe3f87721e5c915985776d2d88cb173737e8258 (diff) | |
download | FreeBSD-src-a3f555f083888fd170c838c4620b5f3355c05886.zip FreeBSD-src-a3f555f083888fd170c838c4620b5f3355c05886.tar.gz |
+ 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.
Diffstat (limited to 'usr.bin/make/var.c')
-rw-r--r-- | usr.bin/make/var.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index 259a672..952f3a3 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -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 */ |