40 endif |
40 endif |
41 |
41 |
42 FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST |
42 FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST |
43 |
43 |
44 define SetupJavaCompiler |
44 define SetupJavaCompiler |
45 # param 1 is for example BOOT_JAVAC or NEW_JAVAC |
45 # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE |
46 # This is the name later used to decide which java compiler to use. |
46 # This is the name of the compiler setup. |
47 # param 2-9 are named args. |
47 # param 2-9 are named args. |
48 # JVM:=The jvm used to run the javac/javah command |
48 # JVM:=The jvm used to run the javac/javah command |
49 # JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out |
49 # JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out |
50 # FLAGS:=Flags to be supplied to javac |
50 # FLAGS:=Flags to be supplied to javac |
51 # SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here |
51 # SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here |
485 endif |
485 endif |
486 |
486 |
487 # Using sjavac to compile. |
487 # Using sjavac to compile. |
488 $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state |
488 $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state |
489 |
489 |
490 # Create SJAVAC variable, |
490 # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be |
491 # expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar" |
491 # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main" |
492 # and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main" |
492 # and javac is simply replaced with sjavac. |
493 $1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main |
493 $1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC)) |
494 |
494 |
495 # Set the $1_REMOTE to spawn a background javac server. |
495 # Set the $1_REMOTE to spawn a background javac server. |
496 $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC)))) |
496 $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC)))) |
497 |
497 |
498 $$($1_BIN)/javac_state: $$($1_SRCS) $$($1_DEPENDS) |
498 $$($1_BIN)/javac_state: $$($1_SRCS) $$($1_DEPENDS) |