8006872: Stop creating four jars with identical content in the new build system.

Thu, 31 Jan 2013 14:00:09 +0100

author
ohrstrom
date
Thu, 31 Jan 2013 14:00:09 +0100
changeset 607
12782ec1da5f
parent 604
2a713921952c
child 608
7e584be2ee58

8006872: Stop creating four jars with identical content in the new build system.
Reviewed-by: erikj

common/autoconf/spec.gmk.in file | annotate | diff | comparison | revisions
common/makefiles/JavaCompilation.gmk file | annotate | diff | comparison | revisions
common/makefiles/javadoc/Javadoc.gmk file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/spec.gmk.in	Wed Jan 30 13:39:23 2013 -0800
     1.2 +++ b/common/autoconf/spec.gmk.in	Thu Jan 31 14:00:09 2013 +0100
     1.3 @@ -434,6 +434,12 @@
     1.4  
     1.5  JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
     1.6  
     1.7 +# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
     1.8 +BOOTSTRAP_JAVAC_JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
     1.9 +BOOTSTRAP_JAVAC_ARGS:="-Xbootclasspath/p:$(BOOTSTRAP_JAVAC_JAR)" -cp $(BOOTSTRAP_JAVAC_JAR)
    1.10 +NEW_JAVAC   = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javac.Main
    1.11 +NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main
    1.12 +
    1.13  # Base flags for RC
    1.14  # Guarding this against resetting value. Legacy make files include spec multiple
    1.15  # times.
     2.1 --- a/common/makefiles/JavaCompilation.gmk	Wed Jan 30 13:39:23 2013 -0800
     2.2 +++ b/common/makefiles/JavaCompilation.gmk	Thu Jan 31 14:00:09 2013 +0100
     2.3 @@ -42,8 +42,8 @@
     2.4  FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
     2.5  
     2.6  define SetupJavaCompiler
     2.7 -    # param 1 is for example BOOT_JAVAC or NEW_JAVAC
     2.8 -    # This is the name later used to decide which java compiler to use.
     2.9 +    # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE
    2.10 +    # This is the name of the compiler setup.
    2.11      # param 2-9 are named args.
    2.12      #   JVM:=The jvm used to run the javac/javah command
    2.13      #   JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
    2.14 @@ -487,10 +487,10 @@
    2.15          # Using sjavac to compile. 
    2.16          $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
    2.17  
    2.18 -        # Create SJAVAC variable,
    2.19 -        # expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar"
    2.20 -        # and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main"
    2.21 -        $1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main
    2.22 +        # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be 
    2.23 +        # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
    2.24 +        # and javac is simply replaced with sjavac.
    2.25 +        $1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
    2.26  
    2.27          # Set the $1_REMOTE to spawn a background javac server.
    2.28          $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
     3.1 --- a/common/makefiles/javadoc/Javadoc.gmk	Wed Jan 30 13:39:23 2013 -0800
     3.2 +++ b/common/makefiles/javadoc/Javadoc.gmk	Thu Jan 31 14:00:09 2013 +0100
     3.3 @@ -46,14 +46,11 @@
     3.4  
     3.5  BUILD_NUMBER=$(JDK_BUILD_NUMBER)
     3.6  
     3.7 -BOOT_JAVA_CMD=$(JAVA)
     3.8 -
     3.9 -JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
    3.10 -JAVADOC_CMD = $(BOOT_JAVA_CMD) \
    3.11 +JAVADOC_CMD = $(JAVA) \
    3.12                -Xmx1024m \
    3.13  	      -Djava.awt.headless=true \
    3.14 -              "-Xbootclasspath/p:$(JAVADOC_JAR)" \
    3.15 -              -jar $(JAVADOC_JAR) -bootclasspath $(JDK_OUTPUTDIR)/classes
    3.16 +	      $(NEW_JAVADOC) \
    3.17 +	      -bootclasspath $(JDK_OUTPUTDIR)/classes
    3.18  
    3.19  # Copyright year for beginning of Java and some of the apis
    3.20  #   (Needed when creating the javadocs)

mercurial