Bug 327469 - "argument list too long" when compiling javaxpcom, r=jhpedemonte

git-svn-id: svn://10.0.0.236/trunk@190232 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
benjamin%smedbergs.us
2006-02-16 20:02:21 +00:00
parent 7a417d0627
commit 486c5df7de
2 changed files with 12 additions and 11 deletions

View File

@@ -63,7 +63,7 @@ GEN_JAVA_SRCS = \
# install jars into SDK
SDK_LIBRARY = $(JARFILE) $(JARFILE_SRC)
GARBAGE += $(JARFILE) $(JARFILE_SRC) $(GEN_JAVA_SRCS)
GARBAGE += $(JARFILE) $(JARFILE_SRC) $(GEN_JAVA_SRCS) java.files
GARBAGE_DIRS += _javagen org
include $(topsrcdir)/config/rules.mk
@@ -89,12 +89,12 @@ _javagen/org/mozilla/xpcom/.iface_done: $(JAVA_SRCS) $(DIST)/bin/GenerateJavaInt
$(RUN) $(DIST)/bin/GenerateJavaInterfaces$(BIN_SUFFIX) -d $(OUTPUT_DIR)
@touch $@
# Use find and xargs for passing list of Java files to JAVAC. This avoids the
# "argument list too long" error on Windows when using *.java
# Using the temporary "java.files" avoids an "argument list too long"
# error on Windows when using *.java
org/mozilla/xpcom/.class_done: _javagen/org/mozilla/xpcom/.iface_done
@echo Compiling Java interface classes
find _javagen -name "*.java" | xargs $(JAVAC) $(JAVAC_FLAGS) -classpath . \
-d . -sourcepath _javagen
find _javagen -name "*.java" > java.files
$(JAVAC) $(JAVAC_FLAGS) -classpath . -d . -sourcepath _javagen @java.files
@touch $@
$(JARFILE): org/mozilla/xpcom/.class_done Makefile