freebsd-dev/usr.bin/make
harti ce8ae127b1 Put variable assignments from the command line into the MAKEFLAGS
variable as required by POSIX. This causes such variables to be
pushed into all sub-makes called by the make (except when the MAKEFLAGS
variable is explicitely changed in the sub-make's environment).
This makes them also mostly un-overrideable in sub-makes except on the
sub-make's command line. Therefor specifying 'make CC=icc' will cause
icc to be used as C compiler in all sub-makes no matter what the Makefiles
itself try to do to the CC variable.

This patch also corrects the handling of the MFLAGS variable. MFLAGS
contains all the command line flags but not the command line variable
assignments. The evaluation of the .MFLAGS or .MAKEFLAGS target now
changes both MFLAGS and MAKEFLAGS (they used to change MAKEFLAGS only).
Makefiles can use MFLAGS for their own purposes given that they do not
except MFLAGS to be undefined at the beginning and that they don't evaluate
.MFLAGS or .MAKEFLAGS. MFLAGS should be removed for POSIX compliance,
but it is unfortunately heavily used by the X makefiles.

This has been extensively tested by port builds (thanks to portmgr), new
worlds and kernels.

PR:		standards/57295 (1st part above)
Submitted by:	James E. Flemer <jflemer@alum.rpi.edu>
Approved by:	portmgr
Obtained from:	NetBSD (1st part above)
MFC after:	4 weeks
2004-08-03 18:56:31 +00:00
..
lst.lib Use __FBSDID in the lst.lib files, to match to main make(1) files. It is 2002-10-09 02:00:22 +00:00
PSD.doc Remove another unused Makefile. 2003-02-03 04:15:53 +00:00
arch.c Remove efree(), it isn't used consistently enough to even pretend that it 2002-10-23 23:16:43 +00:00
buf.c Convert make(1) to use ANSI style function declarations. Variable 2002-10-09 03:42:10 +00:00
buf.h #define<space> -> #define<tab> 2002-09-17 21:29:06 +00:00
compat.c Implement POSIX's '+' flag for command lines. This flag causes a line 2004-07-29 14:29:23 +00:00
cond.c Improve make's diagnostic of mistmatched .if-.endif. This patch is 2004-07-20 07:42:06 +00:00
config.h #define<space> -> #define<tab> 2002-09-17 21:29:06 +00:00
dir.c Fix a bug that prevented exists() from finding "foo/", "foo/." 2003-10-02 21:30:30 +00:00
dir.h - Cut out the code that caches the "." directory out of Dir_Init() 2003-09-14 12:31:33 +00:00
for.c Reworked the fix to print the useful line number on error in 2004-03-10 21:51:06 +00:00
hash.c Convert make(1) to use ANSI style function declarations. Variable 2002-10-09 03:42:10 +00:00
hash.h #define<space> -> #define<tab> 2002-09-17 21:29:06 +00:00
job.c Implement POSIX's '+' flag for command lines. This flag causes a line 2004-07-29 14:29:23 +00:00
job.h Change the select timeout from 100ms to 2 seconds now that SIGCHILD is 2003-12-19 11:18:37 +00:00
list.h #define<space> -> #define<tab> 2002-09-17 21:29:06 +00:00
lst.h #define<space> -> #define<tab> 2002-09-17 21:29:06 +00:00
main.c Put variable assignments from the command line into the MAKEFLAGS 2004-08-03 18:56:31 +00:00
make.1 Bump the date in .Dd for the recent '+' flag commit. 2004-07-29 16:54:42 +00:00
make.c Remove efree(), it isn't used consistently enough to even pretend that it 2002-10-23 23:16:43 +00:00
make.h Improve make's diagnostic of mistmatched .if-.endif. This patch is 2004-07-20 07:42:06 +00:00
Makefile Put variable assignments from the command line into the MAKEFLAGS 2004-08-03 18:56:31 +00:00
Makefile.dist
nonints.h Put variable assignments from the command line into the MAKEFLAGS 2004-08-03 18:56:31 +00:00
parse.c Fix handling of comments on .elif lines. The patch given in a followup 2004-07-22 11:12:01 +00:00
pathnames.h Back out the ``run shell from $PATH'' change; this was an overkill 2002-05-24 15:51:27 +00:00
sprite.h #define<space> -> #define<tab> 2002-09-17 21:29:06 +00:00
str.c Fixed a bug that previous revision has introduced -- we missed 2004-01-25 12:28:36 +00:00
suff.c The .DEFAULT target with no commands caused a null pointer dereference. 2004-04-12 20:05:11 +00:00
targ.c Remove efree(), it isn't used consistently enough to even pretend that it 2002-10-23 23:16:43 +00:00
util.c Move utilitarian routines to util.c, which isn't the same as the old 2002-10-10 19:27:48 +00:00
var_modify.c In VarHead(), look into the correct (modified) string. 2002-10-29 12:11:56 +00:00
var.c Put variable assignments from the command line into the MAKEFLAGS 2004-08-03 18:56:31 +00:00
var.h Split var.c into var.c and var_modify.c and move all the modification funcs 2002-10-28 23:33:57 +00:00