diff options
| author | sjg <sjg@NetBSD.org> | 2001-06-10 02:31:00 +0000 |
|---|---|---|
| committer | sjg <sjg@NetBSD.org> | 2001-06-10 02:31:00 +0000 |
| commit | fc0df160d89195b37f5832075656d06bd0a024af (patch) | |
| tree | 9fbca62fb8f65f8a8656ebf184fa9ec5e84b096e /usr.bin/make/parse.c | |
| parent | a2b115fa4cb9b51c7e0f8a242a9bd644ff6eabe6 (diff) | |
Simplify the exporting of VAR_CMD's via MAKEFLAGS.
We now just list the names of such variables in .MAKEOVERRIDES.
When we come to export MAKEFLAGS we quote the value of each exported variable
using :Q, using: ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@}
The :O:u suppresses duplicate names.
Also modifed Parse_DoVar to re-export MAKEFLAGS whenever .MAKEOVERRIDES
is assigned to so .MAKEOVERRIDES+= PATH will export PATH=${PATH:Q}
to the environment, while .MAKEOVERRIDES= will disable export of VAR_CMD's.
Diffstat (limited to 'usr.bin/make/parse.c')
| -rw-r--r-- | usr.bin/make/parse.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index c58e841a86d..3ae0e886ded 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.68 2001/06/09 05:22:47 sjg Exp $ */ +/* $NetBSD: parse.c,v 1.69 2001/06/10 02:31:00 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -39,14 +39,14 @@ */ #ifdef MAKE_BOOTSTRAP -static char rcsid[] = "$NetBSD: parse.c,v 1.68 2001/06/09 05:22:47 sjg Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.69 2001/06/10 02:31:00 sjg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.68 2001/06/09 05:22:47 sjg Exp $"); +__RCSID("$NetBSD: parse.c,v 1.69 2001/06/10 02:31:00 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1585,9 +1585,9 @@ Parse_DoVar (line, ctxt) * Normal assignment -- just do it. */ Var_Set(line, cp, ctxt); - if (strcmp(line, MAKEOVERRIDES) == 0) - ExportMAKEFLAGS(0); /* re-export MAKEFLAGS */ } + if (strcmp(line, MAKEOVERRIDES) == 0) + ExportMAKEFLAGS(0); /* re-export MAKEFLAGS */ } |
