diff options
| author | sjg <sjg@NetBSD.org> | 2001-06-09 05:22:47 +0000 |
|---|---|---|
| committer | sjg <sjg@NetBSD.org> | 2001-06-09 05:22:47 +0000 |
| commit | 44372a7be4eddf35690d5f03b4d6ff4b80bca8c3 (patch) | |
| tree | b4e2c0ab87a6817a7d91f24c86ac37385d6db79f /usr.bin/make/parse.c | |
| parent | 80a2d6590438fd507290c9dffad758f55e83ba47 (diff) | |
Modify handling of command line variable assignments and their exporting
via MAKEFLAGS. Instead of appending them directly to .MAKEFLAGS, put
them in .MAKEOVERRIDES (and ensure they are quoted). This is now done
in Var_Set when it exports VAR_CMD's.
Use ExportMAKEFLAGS() to export MAKEFLAGS, using the combined content
of .MAKEFLAGS and .MAKEOVERRIDES (with duplicate supression).
If .MAKEFLAGS is assigned to in a Makefile, ExportMAKEFLAGS is called again.
This allows a line like:
.MAKEOVERRIDES=
to effectively stop the exporting of the command line vars in MAKEFLAGS.
Diffstat (limited to 'usr.bin/make/parse.c')
| -rw-r--r-- | usr.bin/make/parse.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index a5f6a85ac02..c58e841a86d 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.67 2001/06/02 18:04:44 sommerfeld Exp $ */ +/* $NetBSD: parse.c,v 1.68 2001/06/09 05:22:47 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -39,14 +39,14 @@ */ #ifdef MAKE_BOOTSTRAP -static char rcsid[] = "$NetBSD: parse.c,v 1.67 2001/06/02 18:04:44 sommerfeld Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.68 2001/06/09 05:22:47 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.67 2001/06/02 18:04:44 sommerfeld Exp $"); +__RCSID("$NetBSD: parse.c,v 1.68 2001/06/09 05:22:47 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1585,6 +1585,8 @@ Parse_DoVar (line, ctxt) * Normal assignment -- just do it. */ Var_Set(line, cp, ctxt); + if (strcmp(line, MAKEOVERRIDES) == 0) + ExportMAKEFLAGS(0); /* re-export MAKEFLAGS */ } } |
