GNU Make 4.0

Erik Joelsson erik.joelsson at
Mon Oct 13 14:20:39 UTC 2014

I don't remember exactly, but the following case would be problematic:

FOO_FILE := /path/to/foo$$file
BAR_FILE := /path/to/bar$$file

         do_something $< $@

The correct escaping for the shell will not necessarily be correct for 
the target or dependency lines for make. IIRC, in one make version, it 
helps if you escape the $$ with a backlash '\'. I also think the target 
and the dependencies will behave differently in one version.

Regarding your error, what is on line 204 in you BuildLangtools.gmk? Is 
it a call to SetupJavaCompilation? If so, I would add $$(info ) lines to 
make/common/JavaCompilation.gmk and see how far I got parsing before the 
error to help pinpoint the failing line.


  but if you have a filename that includes a $ and put that in a rule, 
as either the target or a dependency, then references to $@ or $< can
On 2014-10-13 16:04, Salter, Thomas A wrote:
> I'm building 8u5.  I think that was the first update after JDK 8 shipped.
> Do you remember the nature of the subtle differences?  This problem could very well be the result of my changes to some of the make files.
> Tom
> -----Original Message-----
> From: Erik Joelsson [mailto:erik.joelsson at]
> Sent: Monday, October 13, 2014 5:05 AM
> To: Salter, Thomas A
> Cc: Omair Majid; OpenJDK (build-dev at
> Subject: Re: GNU Make 4.0
> Hello,
> The patch from Omair will likely be needed for building hotspot. Your
> failure is much earlier though. There are some subtle differences in
> make 3.82 and 4.0 regarding escaping of $ in certain situations. This
> caused some trouble with referring to inner classes from makefiles. I
> did some improvements in this area at some point but don't remember
> exactly when. When you say not up to date, how old is that? I'm pretty
> sure that jdk8 at release was buildable with make 4.0, but I may be wrong.
> /Erik
> On 2014-10-10 21:39, Omair Majid wrote:
>> * Salter, Thomas A <Thomas.Salter at> [2014-10-10 14:23]:
>>> Are there any known issues with using GNU Make 4.0 to build OpenJDK8?
>> Yes. I had to add this patch in Fedora to build with Make 4.0:
>> Cheers,
>> Omair

More information about the build-dev mailing list