[RFT/RFA] Per-directory libjava builds (was RFC)

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Wed May 11 11:59:00 GMT 2005


Richard Henderson wrote:

>On Tue, May 10, 2005 at 11:44:58AM +0200, Paolo Bonzini wrote:
>  
>
>>The only thing to do is to avoid extra long command lines when making 
>>Makefile.defs.
>>    
>>
>Which is actually a show-stopper.
>  
>
Do you mean you could not run it on Linux?  I could (and on Darwin as 
well), but anyway here is a revised patch that fixes that problem.   Now 
that the fix for PR21436 is in, it is also easier for people to test it.

Notes:

1) write_entries_to_file is very slow, but I need it to avoid extra long 
command lines.  The speed of a single invocation of 
write_entries_to_file compares with the savings in the "executing 
depfiles commands" phase of config.status (we have a lot of echo's to 
files.tmplist, instead of an echo for each .java file's dependency 
file).  Preparing Makefile.deps takes only a few seconds more than with 
my earlier patch.

2) I'm using sed instead of multiple invocations of 
write_entries_to_file.  I did not find a portable way to put a multiline 
`s' command in the Makefile, so I'm creating a temporary sed script.

3) I don't like using "x := $(shell cat abc)" instead of putting the 
assignment into an include file, but it is hard to persuade Automake not 
to move the -include statements near the very end of the file.  This 
idiom was also present in the previous patch.

4) It looks like $(shell) is expanded before executing *all* the 
commands in a rule.  write_entries_to_file uses $(shell), and that's why 
I had to write

%.list:
        @: $(shell $(mkinstalldirs) $(basename $@))
        @: $(call write_entries_to_file,$?,$@)

rather than

%.list:
        $(mkinstalldirs) $(basename $@)
        @: $(call write_entries_to_file,$?,$@)

5) This patch removes --enable-libgcj-multifile because Ranjit Mathew 
says it does not optimize anything.  That's probably because it does not 
build .lo files from multiple Java files -- only .class files.  It is 
probably possible to leave the option, but the implementation would be 
different from what I have now, so I'd prefer to reinstate it in a 
follow-up patch.

I tried to make the ChangeLog very thorough, so that it's easier to see 
what's going on.  Bootstrapped/regtested i686-pc-linux-gnu, C/C++/Java.  
Ok for mainline?

Paolo

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libjava-build-per-directory.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20050511/bb22a8f4/attachment.ksh>


More information about the Java-patches mailing list