Date: Mon, 09 Aug 2004 10:05:09 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: harti@FreeBSD.org Cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/make Makefile main.c nonints.h var.c Message-ID: <20040809.100509.63410124.imp@bsdimp.com> In-Reply-To: <20040809174540.U32590@beagle.kn.op.dlr.de> References: <20040809.092824.11587387.imp@bsdimp.com> <20040809.094110.04712576.imp@bsdimp.com> <20040809174540.U32590@beagle.kn.op.dlr.de>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20040809174540.U32590@beagle.kn.op.dlr.de> Harti Brandt <harti@freebsd.org> writes: : On Mon, 9 Aug 2004, M. Warner Losh wrote: : : MWL>In message: <20040809.092824.11587387.imp@bsdimp.com> : MWL> "M. Warner Losh" <imp@bsdimp.com> writes: : MWL>: In message: <20040809061817.GA53369@numeri.campus.luth.se> : MWL>: Johan Karlsson <johan@FreeBSD.org> writes: : MWL>: : On Mon, Aug 09, 2004 at 14:12 (+0900), Jun Kuriyama wrote: : MWL>: : > At Tue, 3 Aug 2004 18:56:31 +0000 (UTC), : MWL>: : > Hartmut Brandt wrote: : MWL>: : > > Log: : MWL>: : > > Put variable assignments from the command line into the MAKEFLAGS : MWL>: : > > variable as required by POSIX. This causes such variables to be : MWL>: : > > pushed into all sub-makes called by the make (except when the MAKEFLAGS : MWL>: : > > variable is explicitely changed in the sub-make's environment). : MWL>: : > > This makes them also mostly un-overrideable in sub-makes except on the : MWL>: : > > sub-make's command line. Therefor specifying 'make CC=icc' will cause : MWL>: : > > icc to be used as C compiler in all sub-makes no matter what the Makefiles : MWL>: : > > itself try to do to the CC variable. : MWL>: : > > : MWL>: : > > This patch also corrects the handling of the MFLAGS variable. MFLAGS : MWL>: : > > contains all the command line flags but not the command line variable : MWL>: : > > assignments. The evaluation of the .MFLAGS or .MAKEFLAGS target now : MWL>: : > > changes both MFLAGS and MAKEFLAGS (they used to change MAKEFLAGS only). : MWL>: : > > Makefiles can use MFLAGS for their own purposes given that they do not : MWL>: : > > except MFLAGS to be undefined at the beginning and that they don't evaluate : MWL>: : > > .MFLAGS or .MAKEFLAGS. MFLAGS should be removed for POSIX compliance, : MWL>: : > > but it is unfortunately heavily used by the X makefiles. : MWL>: : > : MWL>: : > I'm using MAKEOBJDIRPREFIX as a make argument to build the world. : MWL>: : : MWL>: : Don't. : MWL>: : According to make(1) it is an environment variable. : MWL>: : MWL>: The current man page is stunningly vague about this. It says that it : MWL>: respects these environment variables, but it doesn't say they have to : MWL>: be set in the enviornment to the exclusion of setting them on the : MWL>: command line. : MWL> : MWL>So either we can make it work, or document that the variables listed : MWL>in the environment section must be set as environment variables only. : : There is nothing to be made work. Both variables are intended to be used : as environment variables. That they happend to work from the command line : was a side effect of make putting its variables into the environment. : Does the following clarify things enough? Yes. That's great! Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040809.100509.63410124.imp>