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/make.1 | |
| 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/make.1')
| -rw-r--r-- | usr.bin/make/make.1 | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1 index 0951b5cfda0..530d43f27ed 100644 --- a/usr.bin/make/make.1 +++ b/usr.bin/make/make.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.50 2001/06/09 07:00:37 sjg Exp $ +.\" $NetBSD: make.1,v 1.51 2001/06/10 02:31:00 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -489,12 +489,18 @@ entered into the environment for all programs which .Nm executes. .It Va .MAKEOVERRIDES -This variable is used to record command line variable assignments -so that they may be exported as part of +This variable is used to record the names of variables assigned to +on the command line, so that they may be exported as part of .Ql Ev MAKEFLAGS . This behaviour can be disabled by assigning an empty value to .Ql Va .MAKEOVERRIDES -within a makefile. +within a makefile. Extra variables can be exported from a makefile +by appending their names to +.Ql Va .MAKEOVERRIDES . +.Ql Ev MAKEFLAGS +is re-exported whenever +.Ql Va .MAKEOVERRIDES +is modified. .It Ev PWD Alternate path to the current directory. .Nm |
