revision 1.91
Fri Nov 7 01:01:46 2003 UTC by lukem
Add some subsections in the VARIABLE ASSIGNMENTS section.
In the "modifier description" list, show each modifier with the leading `:'.
Rationale: it's hard to search for modifiers without it, and we already do
the same thing in the -options and .makecommands lists. I now find it much
easier to find the description for a modifier in the man page.
Obtained from: NetBSD
Do by specifying ".../" with '-m' or MAKESYSPATH (new) environment variable.
Reviewed by: <sjg@NetBSD.org>
Obtained from: NetBSD (+ embellishment by me, sent back to NetBSD)
This gets rid of gnu89 style inlining. Also silence gcc by assigning two
variables NULL. This lets use to remove NO_WERROR.
Approved by: kib (mentor)
Approved by: harti
E.g., .MAKE.JOB.PREFIX=${.newline}---[${.MAKE.PID}]
would produce
---[1234] target ---
2. Added ${.newline} as a simple means of being able to include '\n' in the
assignment of .MAKE.JOB.PREFIX
Obtained from: NetBSD
In particular, point out that string comparison can only use != and ==
(how weird, given that the underlying call to strcmp returns more
information), that floating point values are correctly interpreted
as numbers, and that the left-hand side must be a variable expansion.
MFC after: 3 weeks
This article [1] describes the -p flag for make(1):
Write to standard output the complete set of macro definitions and
target descriptions. The output format is unspecified.
We already support a similar flag (-d g1), but unlike -p, it still
executes commands. Our implementation just turns it into -d g1, but also
sets flag `printGraphOnly', which will cause make(1) to skip execution.
[1] http://www.opengroup.org/onlinepubs/009695399/utilities/make.html
Reviewed by: imp
PR: standards/99960
spaces in values. Without this change, the following valid
call broke due to parsing of .MAKEFLAGS in bsd.symver.mk:
cd /usr/src/lib/libc && make -n DEBUG_FLAGS="-DFOO -DBAR"
Spotted by: Igor Sysoev
Submitted by: Maxim Dounin, ru
MFC after: 1 week
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
explicitly rather than relying on name space pollution to pull it in
for us.
NB: The usage of INT_MIN is somewhat bogus and suspect to my eye, but this
commit doesn't address that issue.
The most important point is that -f option(s) are never copied from
.Ev MAKEFILE to .Va .MAKEFILE by make(1), which is consistent with
handling the command line. (-f silently sit in .Ev MAKEFILE and go
to make's children unless overwritten via .Va .MAKEFILE)
Bump .Dd.