This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: gcj -c -d ?


Norman Hendrich wrote:
Three questions about gcj usability:

1) Why does gcj allow "-d <directory>" when compiling to bytecode,
   but not when compiling to object files?
It doesn't realy fit with gcc's way of doing things.
For one thing, it would be inconsistent with compiling from
source if the source file defines multiple classes.  Basically,
each invocation of cc1java (the actual compiler) can only generate
a single .o file.

For quick and dirty
development without hand-tuned makefiles, I really like the Java
(javac/jikes) way of compiling:
gcj -C -d . org/foo/bar/Baz.java
gcj -c -d . org/foo/bar/Baz.class
and:
gcj -c -d . */*/*/*.class
gcj -o baz.exe --main=org.foo.bar.Baz */*/*/*.o

instead of:

gcj -c -o org/foo/bar/Baz.o org/foo/bar/Baz.class and dozens of separate Makefiles, one per package directory.
Why not just:

gcj -o baz.exe --main=org.foo.bar.Baz */*/*/*.class

or:

gcj -c -d . */*/*/*.class -o Baz.o
gcj -o baz.exe --main=org.foo.bar.Baz Baz.o

Faster compilation time; simple Makefile.
--
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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