This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[ecj] Patch: FYI: check in all the generated files
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 13 Oct 2006 14:46:45 -0600
- Subject: [ecj] Patch: FYI: check in all the generated files
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcj-eclipse branch.
This adds all the class files and header files.
You have to use --enable-maintainer-mode to rebuild these.
The generated files aren't included in this note, they are huge.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* HACKING: Updated.
* sources.am, Makefile.in: Rebuilt.
* scripts/makemake.tcl (emit_bc_rule): Updated for class files in
srcdir.
(emit_package_rule): Likewise.
(emit_process_package_rule): Likewise.
* Makefile.am (gcjh.stamp): Conditional on MAINTAINER_MODE. Put
headers in srcdir.
(libgcj-$(gcc_version).jar): Updated to find classes in source
tree.
(BOOTCLASSPATH): Likewise.
(install-data-local): Likewise.
Added all the .class and CNI .h files.
Index: classpath/ChangeLog.gcj
from Tom Tromey <tromey@redhat.com>
* lib/Makefile.in: Rebuilt.
* lib/Makefile.am (JAVAC): Put classes in srcdir.
(compile-classes): Conditional on MAINTAINER_MODE.
Index: HACKING
===================================================================
--- HACKING (revision 117624)
+++ HACKING (working copy)
@@ -60,6 +60,9 @@
Possibly update the gcj/javaprims.h file with scripts/classes.pl
(See below, it can only be done after the first source->bytecode
pass has finished.)
+ You will need to configure with --enable-maintainer-mode and you
+ will need to update the .class files and generated CNI header files in
+ your working tree
Over time we plan to remove as many of the remaining divergences as
possible.
Index: scripts/makemake.tcl
===================================================================
--- scripts/makemake.tcl (revision 117648)
+++ scripts/makemake.tcl (working copy)
@@ -245,7 +245,7 @@
if {[info exists exclusion_map($package)]} {
set omit "| grep -v $exclusion_map($package)"
}
- puts "\t@find classpath/lib/$package -name '*.class'${omit} > $tname"
+ puts "\t@find \$(srcdir)/classpath/lib/$package -name '*.class'${omit} > $tname"
puts "\t\$(LTGCJCOMPILE) -fjni -findirect-dispatch -fno-indirect-classes -c -o $loname @$tname"
puts "\t@rm -f $tname"
puts ""
@@ -283,7 +283,7 @@
# A rule to make the phony file we are going to compile.
puts "$lname: \$($varname)"
puts "\t@\$(mkinstalldirs) \$(dir \$@)"
- puts "\techo classpath/lib/$package/*.class $omit> $lname"
+ puts "\techo \$(srcdir)/classpath/lib/$package/*.class $omit> $lname"
puts ""
puts "-include $dname"
puts ""
@@ -304,7 +304,7 @@
puts "$lname: java/lang/${platform}Process.java"
puts "\t@\$(mkinstalldirs) \$(dir \$@)"
- puts "\techo classpath/lib/java/lang/${platform}Process*.class > $lname"
+ puts "\techo \$(srcdir)/classpath/lib/java/lang/${platform}Process*.class > $lname"
puts ""
puts "-include $dname"
puts ""
Index: classpath/lib/Makefile.am
===================================================================
--- classpath/lib/Makefile.am (revision 117624)
+++ classpath/lib/Makefile.am (working copy)
@@ -16,10 +16,10 @@
# handling source to bytecode compiler programs like gcj, jikes and kjc
if FOUND_GCJ
-## This should never be used when gcj is the compiler.
## See the compile-classes target.
## There's no point in warning, and we always want debug info.
-JAVAC = $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath '' --classpath $(compile_classpath) -d . @classes
+## GCJ LOCAL: use srcdir
+JAVAC = $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath '' --classpath $(compile_classpath) -d $(srcdir) @classes
else
if FOUND_JIKES
JAVAC = $(JIKES) $(JIKESWARNINGS) +F $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(compile_classpath) -d . @classes
@@ -162,7 +162,9 @@
# touch compile-classes
# else
compile-classes: classes $(JAVA_SRCS) Makefile
+if MAINTAINER_MODE
$(JAVAC)
+endif
touch compile-classes
# endif
Index: Makefile.am
===================================================================
--- Makefile.am (revision 117648)
+++ Makefile.am (working copy)
@@ -163,7 +163,7 @@
$(GCINCS) $(THREADINCS) $(INCLTDL) \
$(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
-BOOTCLASSPATH = $(here)/classpath/lib
+BOOTCLASSPATH = $(srcdir)/classpath/lib
## ################################################################
@@ -324,8 +324,10 @@
$(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
libgcj-$(gcc_version).jar: classpath/lib/compile-classes
- cd classpath/lib; $(JAR) -cfM \
- ../../libgcj-$(gcc_version).jar gnu java javax org sun
+## Note that this now omits the property files.
+## It doesn't matter since we don't use the jar at runtime.
+ here=`pwd`; cd $(srcdir)/classpath/lib; $(JAR) -cfM \
+ $$here/libgcj-$(gcc_version).jar gnu java javax org sun
CLEANFILES = libgcj-$(gcc_version).jar
DISTCLEANFILES = native.dirs
@@ -389,7 +391,10 @@
$(generic_header_files): gcjh.stamp
gcjh.stamp: classpath/lib/compile-classes
- $(MYGCJH) --cni --all classpath/lib --cmdfile=$(srcdir)/headers.txt
+if MAINTAINER_MODE
+ $(MYGCJH) --cni --all $(srcdir)/classpath/lib \
+ --cmdfile=$(srcdir)/headers.txt -d $(srcdir)
+endif
echo > gcjh.stamp
inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
@@ -456,16 +461,16 @@
done
$(INSTALL_DATA) $(srcdir)/java/util/logging/logging.properties $(DESTDIR)$(propdir)/logging.properties
## Install inner class headers.
- $(INSTALL_DATA) 'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
- $(INSTALL_DATA) 'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
- $(INSTALL_DATA) 'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
- $(INSTALL_DATA) 'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
- $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
- $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
- $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
- $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
- $(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
- $(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
+ $(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
+ $(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
+ $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
+ $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
+ $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
+ $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
+ $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
+ $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
+ $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
+ $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.