diff options
author | yar <yar@FreeBSD.org> | 2008-03-05 20:11:04 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2008-03-05 20:11:04 +0000 |
commit | 4905cb8cf9a7c31fd18e562cf1ceb0ea589a2cc0 (patch) | |
tree | 4609d400c4fc65fc29466c452a6a7f3c3a4b18c8 /usr.bin/quota | |
parent | 31c0a6bb3195f67b0aa31617153cd7119743dc58 (diff) | |
download | FreeBSD-src-4905cb8cf9a7c31fd18e562cf1ceb0ea589a2cc0.zip FreeBSD-src-4905cb8cf9a7c31fd18e562cf1ceb0ea589a2cc0.tar.gz |
Don't forget to set MAKEFLAGS in the childs' environment
from the .MAKEFLAGS global variable even if it's empty or
unset. This means setting MAKEFLAGS to just an empty string
in the latter case.
If not doing so, make(1) behaved inconsistently WRT MAKEFLAGS.
In particular, it would let a `-f foo' option down to sub-makes
if .MAKEFLAGS was unset. E.g.,
env MAKEFLAGS="-f mymakefile" make
would pass `-f mymakefile' down to sub-makes via their environment
(unless mymakefile added something to .MAKEFLAGS).
But any additional options appearing would change this behaviour to
not passing `-f mymakefile' to sub-makes, as in:
env MAKEFLAGS="-f mymakefile" make -D DUMMY
or
env MAKEFLAGS="-f mymakefile -D DUMMY" make
(unless mymakefile cleared .MAKEFLAGS).
Also make(1) would leave MAKEFLAGS at its initial value if the
makefile set .MAKEFLAGS to an empty value. I.e., it was impossible
to override MAKEFLAGS with an empty value. (Note well that makefiles
are not to touch MAKEFLAGS directly, they alter .MAKEFLAGS instead.
So make(1) can filter out things such as -f when copying MAKEFLAGS
to .MAKEFLAGS at startup. Direct modifications to MAKEFLAGS just go
nowhere.)
While the original intentions of the BSD make authors are somewhat
unclear here, the bug proves that NOT passing -f options down is
the settled behaviour because the opposite behaviour is totally
unreliable in the presence of any other options. In addition, not
passing down -f's found in the environment is consistent with doing
so WRT the command line.
Update the manpage accordingly and make the whole description of
MAKEFLAGS and .MAKEFLAGS more consistent as this change indeed
brings more consistency into the reliable behaviour of make(1).
Submitted by: ru (main.c)
Tested with: make world
Diffstat (limited to 'usr.bin/quota')
0 files changed, 0 insertions, 0 deletions