Dollar ($) expansion still needs attention

Jim Laskey (Oracle) james.laskey at oracle.com
Wed Feb 27 12:14:15 UTC 2013


I wanted to double check and trace the origins of the MakeBase.gmk patch before I responded.  It was part of the original set Erik sent me, but looking thru the other parts of the patch it's not clear why it was necessary.

http://cr.openjdk.java.net/~erikj/nashorn-build/webrev.01/

-- Jim




On 2013-02-27, at 6:15 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 27/02/2013 02:47, David Holmes wrote:
>> :
>> 
>> So the same file names are listed once with \$$ and once with \$$$$, and they both have to be that way to work!
>> 
>> This is untenable. There should only be one way to write the name of a nested class file inside the makefile.
>> 
>> FYI in Profiles.gmk when expanding foo/*.class I already had to do a similar substitution as is now in ListPathsSafely:
>> 
>> # Function to expand foo/*.class into the set of classes
>> # NOTE: Classfiles with $ in their name are problematic as that is the
>> # meta-character for both make and the shell! Hence the \$$$$ substitution.
>> # But note that if you echo these values they will NOT display as expected.
>> class_list =  $(patsubst $(JDK_OUTPUTDIR)/classes/%,%,\
>>     $(foreach i,$(1), $(subst $$,\$$$$, $(wildcard $(JDK_OUTPUTDIR)/classes/$i))))
>> 
>> 
>> So I'd like to understand why the nashorn change was made so that we can determine how to get back to only having one way to specify file names containing $
> I completely agree, it's very difficult to maintain. Also the two patches yesterday were just to get the build working again (Erik is out this week so it wasn't possible to establish why MakeBase.gmk was changed, also I cannot find the review thread to know if it came up during the review).
> 
> -Alan




More information about the build-dev mailing list