Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Aug 2004 11:17:02 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Greg Lewis <glewis@FreeBSD.org>, Hartmut Brandt <harti@FreeBSD.org>
Cc:        ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports/java/jdk14 Makefile
Message-ID:  <20040818081702.GB91053@ip.net.ua>
In-Reply-To: <200408180706.i7I763ps032344@repoman.freebsd.org>
References:  <200408180706.i7I763ps032344@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--hHWLQfXTYDoKhP50
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 18, 2004 at 07:06:03AM +0000, Greg Lewis wrote:
> glewis      2004-08-18 07:06:03 UTC
>=20
>   FreeBSD ports repository
>=20
>   Modified files:
>     java/jdk14           Makefile=20
>   Log:
>   . The changes to make in -CURRENT to use MAKEFLAGS make us unable to
>     override the MAKEFLAGS ARCH value in the main HotSpot Makefile.  Fix
>     this by passing in a blank MAKEFLAGS up front so there is nothing to
>     (try to) override.
>  =20
>   Submitted by:   truckman
>   Requested by:   kris
>  =20
>   Revision  Changes    Path
>   1.79      +2 -1      ports/java/jdk14/Makefile
>=20
The fix to make(1) was to pass command-line variables as
command-line variables to sub-makes, as required by POSIX.
It's still possible to override anything that you want,
you just need to know well how MAKEFLAGS works.  ;)

MAKEFLAGS is an *environment* variable that make(1) reads
on startup, and treats its contents as if it was specified
on the command line.

1. The contents of this environment variable is then entered
as the .MAKEFLAGS *global* variable.

2. Makefile can modify this global as necessary, either by
modifying the variable directly (including adding to it,
overriding it, or even undefining it with .undef), or thru
the special .MAKEFLAGS macro.

3. When make(1) calls another ${MAKE}, it enters the value
of its global variable .MAKEFLAGS into the environment of
sub-make as the MAKEFLAGS variable.

Make sure you have the latest make(1), then run this
makefile as ``make all FOO=3Dbar''.  Note the difference
between .MAKEFLAGS variable and a target.

%%%
=2Eif make(all)
=2EMAKEFLAGS+=3D	FOO=3Dfoo		# override for submakes only
#.MAKEFLAGS:	FOO=3Dfoo		# override for myself and submakes
all:
	@echo "${.TARGET}'s idea of FOO: ${FOO}"
	@echo .MAKEFLAGS=3D${.MAKEFLAGS}
	@cd ${.CURDIR} && ${MAKE} submake
=2Eendif

=2Eif make(submake)
submake:
	@echo "${.TARGET}'s idea of FOO: ${FOO}"
	@echo .MAKEFLAGS=3D${.MAKEFLAGS}
=2Eendif
%%%


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--hHWLQfXTYDoKhP50
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (FreeBSD)

iD8DBQFBIxB+qRfpzJluFF4RAhPTAKCLok+++pH+rXWGsJ5qNooSmugGnACffw4A
+kuWaMetRbwDsDQcBuOzy6A=
=A3v8
-----END PGP SIGNATURE-----

--hHWLQfXTYDoKhP50--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040818081702.GB91053>