From owner-cvs-all@FreeBSD.ORG Wed Aug 18 08:25:35 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5696A16A4CE; Wed, 18 Aug 2004 08:25:35 +0000 (GMT) Received: from n33.kp.t-systems-sfr.com (n33.kp.t-systems-sfr.com [129.247.16.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id B35BA43D41; Wed, 18 Aug 2004 08:25:33 +0000 (GMT) (envelope-from harti@freebsd.org) Received: from n81.sp.op.dlr.de (n81g.sp.op.dlr.de [129.247.163.1]) i7I8PWX72394; Wed, 18 Aug 2004 10:25:32 +0200 Received: from zeus.nt.op.dlr.de (zeus.nt.op.dlr.de [129.247.173.3]) i7I8PWI77060; Wed, 18 Aug 2004 10:25:32 +0200 Received: from beagle.kn.op.dlr.de (opkndnwsbsd178 [129.247.173.178]) by zeus.nt.op.dlr.de (8.11.7+Sun/8.9.1) with ESMTP id i7I8PUe12487; Wed, 18 Aug 2004 10:25:30 +0200 (MET DST) Date: Wed, 18 Aug 2004 10:25:32 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt@beagle.kn.op.dlr.de To: Ruslan Ermilov In-Reply-To: <20040818081702.GB91053@ip.net.ua> Message-ID: <20040818102107.S872@beagle.kn.op.dlr.de> References: <200408180706.i7I763ps032344@repoman.freebsd.org> <20040818081702.GB91053@ip.net.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-ports@freebsd.org cc: Greg Lewis cc: cvs-all@freebsd.org cc: ports-committers@freebsd.org Subject: Re: cvs commit: ports/java/jdk14 Makefile X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Harti Brandt List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2004 08:25:35 -0000 On Wed, 18 Aug 2004, Ruslan Ermilov wrote: RE>On Wed, Aug 18, 2004 at 07:06:03AM +0000, Greg Lewis wrote: RE>> glewis 2004-08-18 07:06:03 UTC RE>> RE>> FreeBSD ports repository RE>> RE>> Modified files: RE>> java/jdk14 Makefile RE>> Log: RE>> . The changes to make in -CURRENT to use MAKEFLAGS make us unable to RE>> override the MAKEFLAGS ARCH value in the main HotSpot Makefile. Fix RE>> this by passing in a blank MAKEFLAGS up front so there is nothing to RE>> (try to) override. RE>> RE>> Submitted by: truckman RE>> Requested by: kris RE>> RE>> Revision Changes Path RE>> 1.79 +2 -1 ports/java/jdk14/Makefile RE>> RE>The fix to make(1) was to pass command-line variables as RE>command-line variables to sub-makes, as required by POSIX. RE>It's still possible to override anything that you want, RE>you just need to know well how MAKEFLAGS works. ;) RE> RE>MAKEFLAGS is an *environment* variable that make(1) reads RE>on startup, and treats its contents as if it was specified RE>on the command line. RE> RE>1. The contents of this environment variable is then entered RE>as the .MAKEFLAGS *global* variable. RE> RE>2. Makefile can modify this global as necessary, either by RE>modifying the variable directly (including adding to it, RE>overriding it, or even undefining it with .undef), or thru RE>the special .MAKEFLAGS macro. ^^^^^ target (see commented out line in Makefile below) RE> RE>3. When make(1) calls another ${MAKE}, it enters the value RE>of its global variable .MAKEFLAGS into the environment of RE>sub-make as the MAKEFLAGS variable. RE> RE>Make sure you have the latest make(1), then run this RE>makefile as ``make all FOO=bar''. Note the difference RE>between .MAKEFLAGS variable and a target. RE> RE>%%% RE>.if make(all) RE>.MAKEFLAGS+= FOO=foo # override for submakes only RE>#.MAKEFLAGS: FOO=foo # override for myself and submakes RE>all: RE> @echo "${.TARGET}'s idea of FOO: ${FOO}" RE> @echo .MAKEFLAGS=${.MAKEFLAGS} RE> @cd ${.CURDIR} && ${MAKE} submake RE>.endif RE> RE>.if make(submake) RE>submake: RE> @echo "${.TARGET}'s idea of FOO: ${FOO}" RE> @echo .MAKEFLAGS=${.MAKEFLAGS} RE>.endif RE>%%% RE> RE> RE>Cheers, This is an excellent explanation. Perhaps we can put part of it into make(1)? harti