This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFT/RFA] Per-directory libjava builds (take 3)


On Thu, May 12, 2005 at 10:30:29AM +0200, Paolo Bonzini wrote:
> Dependencies from Java to .class files
> --------------------------------------
> Each directory's filelist file depends on the corresponding Java source 
> files.  The stamp file depends on the filelist (using a `Static Pattern 
> Rule').  Each class file depends on the its directory's .stamp file. 
> This reflects the fact that 1) all classfiles are compiled in one go 
> when the .stamp file is built and 2) anything which depends on a 
> particular .class file must wait until its directory is processed and 
> the .stamp file is created.
> 
> Dependencies from Java to .lo files
> -----------------------------------
> As above, each directory's filelist file depends on the corresponding 
> Java source files, and the stamp file depends on the filelist.  For 
> native compilation, the lo file depends on the stamp file (also using a 
> `Static Pattern Rule').  So, when one Java file changes, the filelist 
> file is updated, the stamp file rule builds the .class files, and the 
> .lo file rule recompiles to native code.

I still don't understand why you'd have the filelist depend on the
source files at all.  Seems to me the filelist should depend only
on the makefile.  The .class files and .lo files should depend on
the source files and the filelist.

What do we gain by recreating the filelist after a source file changes?

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

This creates a list of only those files that have changed.  You want $^.



r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]