Makefile: 1.31->1.32
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 1 Dec 2004 01:10:17 +0000 (01:10 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Wed, 1 Dec 2004 01:10:17 +0000 (01:10 +0000)
commitd2e0d34c9ce1adfc8d83003dd201b7537ecd0bf4
treebdd98670d4fde42de2ab442cf5823e19b87c6586
parent78176f3f12151393b82538421385ee95ea298be3
Makefile: 1.31->1.32
main.c: 1.89->1.90
nonints.h: 1.21->1.22
var.c: 1.46->1.47
Author: harti
Log:
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

make.1: 1.75->1.76
Author: harti
Log:
Correct the description of the MFLAGS and .MAKEFLAGS variables. Add
the MFLAGS target. Document that variable assignments from the MAKEFLAGS
environment variable and the .MAKEFLAGS and .MFLAGS target have the
same precedence as command line variable assignments.

make.1: 1.76->1.77
Author: harti
Log:
Correct the .Dd date. Pluralize 'assignment' in one place.

Requested by: ru
usr.bin/make/Makefile
usr.bin/make/main.c
usr.bin/make/make.1
usr.bin/make/nonints.h
usr.bin/make/var.c