Hi,

These patches simplify the tools.zip build by always building the com.sun.tools.javac package regardless of whether or not ecj.jar was found. When GNU Classpath is configured without --with-ecj-jar, 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-16  Thomas Fitzsimmons  <[EMAIL PROTECTED]>

        * 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.
Index: resource/com/sun/tools/javac/messages.properties
===================================================================
RCS file: /sources/classpath/classpath/resource/com/sun/tools/javac/messages.properties,v
retrieving revision 1.1
diff -u -r1.1 messages.properties
--- resource/com/sun/tools/javac/messages.properties	1 Mar 2007 00:26:08 -0000	1.1
+++ resource/com/sun/tools/javac/messages.properties	17 Mar 2007 00:23:38 -0000
@@ -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: configure.ac
===================================================================
RCS file: /sources/classpath/classpath/configure.ac,v
retrieving revision 1.197
diff -u -r1.197 configure.ac
--- configure.ac	16 Mar 2007 23:20:25 -0000	1.197
+++ configure.ac	17 Mar 2007 00:00:47 -0000
@@ -704,7 +704,6 @@
   	    [ECJ_JAR=$withval]
   	    )
 AC_SUBST(ECJ_JAR)
-AM_CONDITIONAL(FOUND_ECJ_JAR, test -n "$ECJ_JAR")
 
 dnl -----------------------------------------------------------
 dnl Should the VM explicitly run class initialization subfunctions for
Index: tools/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/tools/Makefile.am,v
retrieving revision 1.38
diff -u -r1.38 Makefile.am
--- tools/Makefile.am	1 Mar 2007 00:26:08 -0000	1.38
+++ tools/Makefile.am	17 Mar 2007 00:00:49 -0000
@@ -14,16 +14,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 \
@@ -112,7 +102,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,14 +161,14 @@
 	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
 	$(JCOMPILER) -g -d classes @classes.lst
 	cat classes.lst asm.lst > all-classes.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`; \

Reply via email to