This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFT/RFA] Per-directory libjava builds (was RFC)
On Wed, May 11, 2005 at 01:58:09PM +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?
Yep. Dunno what configuration differences, but...
> 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.
What is Makefile.deps for? Browsing the top of it wasn't enlightening.
> 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.
This appears to be unnecessary. Why are you taking this
+ @: $(call write_entries_to_file,$(all_java_source_files),files.tmplist)
+ sed 's,/[^/]*$$,,' \
+ files.tmplist | sort | uniq > bytecodes.list
...
+all_native_compiled_dirs := $(shell test -f native.list && cat native.list)
through a temporary file at all? You can do this directly with
gnu make functions. Note that $(sort) also does uniq.
> 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,$?,$@)
Yep, I discovered this too.
I think this approach is fairly promising...
r~