common/makefiles/JavaCompilation.gmk

changeset 607
12782ec1da5f
parent 568
7b9c42f14281
child 611
d3d9ab8ee7b0
     1.1 --- a/common/makefiles/JavaCompilation.gmk	Wed Jan 30 13:39:23 2013 -0800
     1.2 +++ b/common/makefiles/JavaCompilation.gmk	Thu Jan 31 14:00:09 2013 +0100
     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 @@ -487,10 +487,10 @@
    1.15          # Using sjavac to compile. 
    1.16          $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
    1.17  
    1.18 -        # Create SJAVAC variable,
    1.19 -        # expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar"
    1.20 -        # and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main"
    1.21 -        $1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main
    1.22 +        # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be 
    1.23 +        # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
    1.24 +        # and javac is simply replaced with sjavac.
    1.25 +        $1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
    1.26  
    1.27          # Set the $1_REMOTE to spawn a background javac server.
    1.28          $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))

mercurial