cvs commit: ports/java/jdk14 Makefile

Ruslan Ermilov ru at FreeBSD.org
Wed Aug 18 01:17:16 PDT 2004


On Wed, Aug 18, 2004 at 07:06:03AM +0000, Greg Lewis wrote:
> glewis      2004-08-18 07:06:03 UTC
> 
>   FreeBSD ports repository
> 
>   Modified files:
>     java/jdk14           Makefile 
>   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.
>   
>   Submitted by:   truckman
>   Requested by:   kris
>   
>   Revision  Changes    Path
>   1.79      +2 -1      ports/java/jdk14/Makefile
> 
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=bar''.  Note the difference
between .MAKEFLAGS variable and a target.

%%%
.if make(all)
.MAKEFLAGS+=	FOO=foo		# override for submakes only
#.MAKEFLAGS:	FOO=foo		# override for myself and submakes
all:
	@echo "${.TARGET}'s idea of FOO: ${FOO}"
	@echo .MAKEFLAGS=${.MAKEFLAGS}
	@cd ${.CURDIR} && ${MAKE} submake
.endif

.if make(submake)
submake:
	@echo "${.TARGET}'s idea of FOO: ${FOO}"
	@echo .MAKEFLAGS=${.MAKEFLAGS}
.endif
%%%


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-all/attachments/20040818/ca5496a4/attachment.bin


More information about the cvs-all mailing list