1.1 --- a/common/makefiles/JavaCompilation.gmk Thu Feb 21 15:25:31 2013 -0400 1.2 +++ b/common/makefiles/JavaCompilation.gmk Fri Feb 22 13:09:37 2013 -0400 1.3 @@ -42,8 +42,8 @@ 1.4 FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST 1.5 1.6 define SetupJavaCompiler 1.7 - # param 1 is for example BOOT_JAVAC or NEW_JAVAC 1.8 - # This is the name later used to decide which java compiler to use. 1.9 + # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE 1.10 + # This is the name of the compiler setup. 1.11 # param 2-9 are named args. 1.12 # JVM:=The jvm used to run the javac/javah command 1.13 # JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out 1.14 @@ -143,8 +143,8 @@ 1.15 ifneq (,$2) 1.16 $1_DEPS:=$2 1.17 else 1.18 - $1_DEPS:=$$(filter $$(addprefix %,$$($1_FIND_PATTERNS)),\ 1.19 - $$(call CacheFind $$($1_SRCS))) 1.20 + $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)),\ 1.21 + $$(call CacheFind,$$($1_SRCS))) 1.22 ifneq (,$$($1_GREP_INCLUDE_PATTERNS)) 1.23 $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS)) 1.24 endif 1.25 @@ -487,10 +487,10 @@ 1.26 # Using sjavac to compile. 1.27 $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state 1.28 1.29 - # Create SJAVAC variable, 1.30 - # expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar" 1.31 - # and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main" 1.32 - $1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main 1.33 + # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be 1.34 + # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main" 1.35 + # and javac is simply replaced with sjavac. 1.36 + $1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC)) 1.37 1.38 # Set the $1_REMOTE to spawn a background javac server. 1.39 $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))