summaryrefslogtreecommitdiff
path: root/libjava/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/Makefile.am')
-rw-r--r--libjava/Makefile.am20
1 files changed, 20 insertions, 0 deletions
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index 59a3773cc56..b17f920af1a 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -339,6 +339,10 @@ all_java_source_files = \
all_java_class_files = $(all_java_source_files:.java=.class)
+if ONESTEP
+
+# Compile all classfiles in one go.
+
libgcj-@gcc_version@.jar: $(all_java_source_files)
-@rm -f libgcj-@gcc_version@.jar
@echo Compiling Java sourcefiles...
@@ -356,6 +360,22 @@ libgcj-@gcc_version@.jar: $(all_java_source_files)
# is built.
$(all_java_class_files): libgcj-@gcc_version@.jar
+else # !ONESTEP
+
+# Compile each classfile individually.
+
+.java.class:
+ $(JAVAC) $(JCFLAGS) -classpath '' -bootclasspath $(here):$(srcdir) -d $(here) $<
+
+libgcj-@gcc_version@.jar: $(all_java_class_files)
+ -@rm -f libgcj-@gcc_version@.jar
+## Note that we explicitly want to include directory information.
+ find java gnu javax org -type d -o -type f -name '*.class' | \
+ sed -e '/\/\./d' -e '/\/xlib/d' | \
+ $(ZIP) cfM0E@ $@
+
+endif
+
# Note: The libtool objects are removed by mostlyclean-local
# because of command-line-length issues.
MOSTLYCLEANFILES = $(nat_headers) $(x_nat_headers)