This is the mail archive of the java-patches@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]

FYI: build com.sun.tools.javac unconditionally


Hi,

I committed this patch to trunk and redhat/gcc-4_1-branch. It causes the com.sun.tools.javac package to be included in libgcj-tools.jar regardless of whether or not ecj.jar is available at build time. When libjava is configured without the contrib ecj.jar and without the --with-ecj-jar option, attempting to run com.sun.tools.javac.Main prints an error message on standard error about ecj.jar not being found, then throws an exception.

Tom

2007-03-17 Thomas Fitzsimmons <fitzsim@redhat.com>

	* resource/com/sun/tools/javac/messages.properties
	(Main.FailedToRead, Main.MalformedURL, Main.FailedToLoad): Clarify
	messages for when --with-ecj-jar is not specified.
	* configure.ac (FOUND_ECJ_JAR): Remove conditional.
	* tools/Makefile.am: Build com.sun.tools.javac package
	unconditionally.
	* configure, doc/api/Makefile.in, doc/Makefile.in,
	examples/Makefile.in, external/jsr166/Makefile.in,
	external/Makefile.in, external/relaxngDatatype/Makefile.in,
	external/sax/Makefile.in, external/w3c_dom/Makefile.in,
	include/Makefile.in, lib/Makefile.in, Makefile.in,
	native/fdlibm/Makefile.in, native/jawt/Makefile.in,
	native/jni/classpath/Makefile.in,
	native/jni/gconf-peer/Makefile.in,
	native/jni/gtk-peer/Makefile.in, native/jni/java-io/Makefile.in,
	native/jni/java-lang/Makefile.in, native/jni/java-net/Makefile.in,
	native/jni/java-nio/Makefile.in, native/jni/java-util/Makefile.in,
	native/jni/Makefile.in, native/jni/midi-alsa/Makefile.in,
	native/jni/midi-dssi/Makefile.in,
	native/jni/native-lib/Makefile.in, native/jni/qt-peer/Makefile.in,
	native/jni/xmlj/Makefile.in, native/Makefile.in,
	native/plugin/Makefile.in, resource/Makefile.in,
	scripts/Makefile.in, tools/Makefile.in: Regenerate.
	* tools/classes/com/sun/tools/javac: New directory.
	* tools/classes/com/sun/tools/javac/Main.class,
	tools/classes/com/sun/tools/javac/Messages.class: New files.
Index: classpath/resource/com/sun/tools/javac/messages.properties
===================================================================
--- classpath/resource/com/sun/tools/javac/messages.properties	(revision 123010)
+++ classpath/resource/com/sun/tools/javac/messages.properties	(working copy)
@@ -35,8 +35,8 @@
 # obligated to do so.  If you do not wish to do so, delete this
 # exception statement from your version.
 
-Main.FailedToRead:failed to read {0}
-Main.MalformedURL:malformed URL for {0}
-Main.FailedToLoad:failed to load {0} from {1}
+Main.FailedToRead:failed to read ecj.jar (reconfigure with --with-ecj-jar): {0}
+Main.MalformedURL:malformed URL for ecj.jar: {0}
+Main.FailedToLoad:failed to load {0} from ecj.jar: {1}
 Main.FailedConstructor:failed to find ecj constructor
 Main.FailedCompile:failed to find ecj compile method
Index: classpath/tools/Makefile.am
===================================================================
--- classpath/tools/Makefile.am	(revision 123010)
+++ classpath/tools/Makefile.am	(working copy)
@@ -16,16 +16,6 @@
 endif
 endif
 
-if FOUND_ECJ_JAR
-COM_SUN_TOOLS_JAVAC = com/sun/tools/javac
-ABS_COM_SUN_TOOLS_JAVAC = $(srcdir)/$(COM_SUN_TOOLS_JAVAC)
-ABS_COM_SUN_TOOLS_JAVAC_SRCS = $(ABS_COM_SUN_TOOLS_JAVAC)/*.java
-else
-COM_SUN_TOOLS_JAVAC =
-ABS_COM_SUN_TOOLS_JAVAC =
-ABS_COM_SUN_TOOLS_JAVAC_SRCS =
-endif
-
 if CREATE_WRAPPERS
 bin_SCRIPTS =
 bin_PROGRAMS = gappletviewer gjarsigner gkeytool \
@@ -113,7 +103,7 @@
 TOOLS_JAVA_FILES = $(srcdir)/gnu/classpath/tools/*/*.java \
 	$(srcdir)/com/sun/javadoc/*.java \
 	$(srcdir)/com/sun/tools/doclets/*.java \
-	$(ABS_COM_SUN_TOOLS_JAVAC_SRCS) \
+	$(srcdir)/com/sun/tools/javac/*.java \
 	$(srcdir)/sun/rmi/rmic/*.java \
 	$(srcdir)/external/asm/org/objectweb/asm/*.java \
 	$(srcdir)/external/asm/org/objectweb/asm/attrs/*.java \
@@ -171,7 +161,7 @@
 	find $(srcdir)/gnu/classpath/tools \
 	     $(srcdir)/com/sun/javadoc \
 	     $(srcdir)/com/sun/tools/doclets \
-	     $(ABS_COM_SUN_TOOLS_JAVAC) \
+	     $(srcdir)/com/sun/tools/javac \
 	     $(srcdir)/sun/rmi/rmic \
 	     -name '*.java' -print > classes.lst
 	if [ -f $(top_builddir)/../vm-tools-packages ]; then \
@@ -190,7 +180,7 @@
 	$(JCOMPILER) -g -w -d $(srcdir)/classes @classes.lst @vm-tools.lst
 ## Copy over tools resource files.
 	@list=`cd $(top_srcdir)/resource && find gnu/classpath/tools \
-	       com/sun/javadoc com/sun/tools/doclets $(COM_SUN_TOOLS_JAVAC) \
+	       com/sun/javadoc com/sun/tools/doclets com/sun/tools/javac \
 	       sun/rmi/rmic -name \*.properties -print`; \
 	for p in $$list; do \
 	  dirname=classes/`dirname $$p`; \
Index: classpath/configure.ac
===================================================================
--- classpath/configure.ac	(revision 123010)
+++ classpath/configure.ac	(working copy)
@@ -729,7 +729,6 @@
 	       ECJ_JAR='$(jardir)/ecj.jar'
 	     fi])
 AC_SUBST(ECJ_JAR)
-AM_CONDITIONAL(FOUND_ECJ_JAR, test "$ECJ_JAR" != "")
 
 dnl -----------------------------------------------------------
 dnl Should the VM explicitly run class initialization subfunctions for

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