< prev index next >

make/Main.gmk

Print this page

        

@@ -1,7 +1,7 @@
 #
-# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 only, as
 # published by the Free Software Foundation.  Oracle designates this

@@ -64,30 +64,34 @@
 ################################################################################
 
 ################################################################################
 # Interim/build tools targets, compiling tools used during the build
 
-buildtools-langtools:
+# When creating a BUILDJDK, the buildtools and interim targets have already
+# been built and should not be built again.
+ifneq ($(CREATING_BUILDJDK), true)
+  buildtools-langtools:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ToolsLangtools.gmk)
 
-interim-langtools:
+  interim-langtools:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk)
 
-interim-rmic:
+  interim-rmic:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
 
-interim-cldrconverter:
+  interim-cldrconverter:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
 
-buildtools-jdk:
+  buildtools-jdk:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsJdk.gmk)
 
-buildtools-modules:
+  buildtools-modules:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileModuleTools.gmk)
 
-buildtools-hotspot:
+  buildtools-hotspot:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk)
+endif
 
 ALL_TARGETS += buildtools-langtools interim-langtools \
     interim-rmic interim-cldrconverter buildtools-jdk buildtools-modules \
     buildtools-hotspot
 

@@ -100,43 +104,47 @@
 ALL_TARGETS += generate-exported-symbols
 
 ################################################################################
 # Gensrc targets, generating source before java compilation can be done
 #
-$(eval $(call DeclareRecipesForPhase, GENSRC, \
-    TARGET_SUFFIX := gensrc-src, \
-    FILE_PREFIX := Gensrc, \
-    MAKE_SUBDIR := gensrc, \
-    CHECK_MODULES := $(ALL_MODULES), \
-))
-
-$(foreach m, $(GENSRC_MODULES), $(eval $m-gensrc: $m-gensrc-src))
-
-LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, $(LANGTOOLS_MODULES)), $(GENSRC_TARGETS))
-INTERIM_LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, \
-    $(INTERIM_LANGTOOLS_BASE_MODULES)), $(GENSRC_TARGETS))
-HOTSPOT_GENSRC_TARGETS := $(filter $(addsuffix -%, $(HOTSPOT_MODULES)), $(GENSRC_TARGETS))
-JDK_GENSRC_TARGETS := $(filter-out $(LANGTOOLS_GENSRC_TARGETS) \
-    $(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
-
-GENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
-GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
-    $(GENSRC_MODULEINFO_MODULES))
-
-GENSRC_MODULES := $(GENSRC_MODULEINFO_MODULES)
-GENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \
-    $(addsuffix -gensrc, $(GENSRC_MODULES)))
+# When creating a BUILDJDK, the java targets have already been built and copied
+# into the buildjdk so no need to generate sources.
+ifneq ($(CREATING_BUILDJDK), true)
+  $(eval $(call DeclareRecipesForPhase, GENSRC, \
+      TARGET_SUFFIX := gensrc-src, \
+      FILE_PREFIX := Gensrc, \
+      MAKE_SUBDIR := gensrc, \
+      CHECK_MODULES := $(ALL_MODULES), \
+  ))
+
+  $(foreach m, $(GENSRC_MODULES), $(eval $m-gensrc: $m-gensrc-src))
+
+  LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, $(LANGTOOLS_MODULES)), $(GENSRC_TARGETS))
+  INTERIM_LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, \
+      $(INTERIM_LANGTOOLS_BASE_MODULES)), $(GENSRC_TARGETS))
+  HOTSPOT_GENSRC_TARGETS := $(filter $(addsuffix -%, $(HOTSPOT_MODULES)), $(GENSRC_TARGETS))
+  JDK_GENSRC_TARGETS := $(filter-out $(LANGTOOLS_GENSRC_TARGETS) \
+      $(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
+
+  GENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
+  GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
+      $(GENSRC_MODULEINFO_MODULES))
+
+  GENSRC_MODULES := $(GENSRC_MODULEINFO_MODULES)
+  GENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \
+      $(addsuffix -gensrc, $(GENSRC_MODULES)))
 
-define DeclareModuleInfoRecipe
-  $1-gensrc-moduleinfo:
+  define DeclareModuleInfoRecipe
+    $1-gensrc-moduleinfo:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
             -f GensrcModuleInfo.gmk MODULE=$1)
 
-  $1-gensrc: $1-gensrc-moduleinfo
-endef
+    $1-gensrc: $1-gensrc-moduleinfo
+  endef
 
-$(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m)))
+  $(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m)))
+endif
 
 ALL_TARGETS += $(GENSRC_TARGETS)
 
 ################################################################################
 # Generate data targets

@@ -278,31 +286,10 @@
 
 ALL_TARGETS += $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
 ALL_TARGETS += compile-commands compile-commands-hotspot
 
 ################################################################################
-# VS Code projects
-vscode-project:
-        +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
-      VSCODE_INDEXER=cpptools)
-
-vscode-project-clangd:
-        +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
-      VSCODE_INDEXER=clangd)
-
-vscode-project-rtags:
-        +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
-      VSCODE_INDEXER=rtags)
-
-vscode-project-ccls:
-        +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
-      VSCODE_INDEXER=ccls)
-
-ALL_TARGETS += vscode-project vscode-project-clangd vscode-project-rtags \
-  vscode-project-ccls
-
-################################################################################
 # Build demos targets
 
 demos-jdk:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk)
 

@@ -346,13 +333,12 @@
 
 BOOTCYCLE_TARGET := product-images
 bootcycle-images:
         ifneq ($(COMPILE_TYPE), cross)
           $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image)
-          $(call MakeDir, $(OUTPUTDIR)/bootcycle-build)
           +$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
-              LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
+              JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
         else
           $(call LogWarn, Boot cycle build disabled when cross compiling)
         endif
 
 zip-security:

@@ -383,19 +369,14 @@
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ReleaseFile.gmk)
 
 exploded-image-optimize:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
 
-ifeq ($(JCOV_ENABLED), true)
-  jcov-image:
-        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Coverage.gmk jcov-image)
-endif
-
 ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-images zip-security \
     zip-source jrtfs-jar jdk-image legacy-jre-image \
     symbols-image mac-jdk-bundle mac-legacy-jre-bundle \
-    release-file exploded-image-optimize jcov-image
+    release-file exploded-image-optimize
 
 ################################################################################
 # Docs targets
 
 # If building full docs, to complete docs-*-api we need both the javadoc and

@@ -445,22 +426,19 @@
   # This target is only called by the recursive call below.
   create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \
       java.base-copy jdk.jdeps-launchers
 endif
 
-BUILDJDK_MODULES := $(sort $(foreach m, jdk.jlink $(INTERIM_IMAGE_MODULES), \
-    $(call FindTransitiveDepsForModule, $m) $m))
+create-buildjdk-copy:
+        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk)
 
 create-buildjdk-interim-image:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
             $@-helper \
             SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
             HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
-            CREATING_BUILDJDK=true \
-            LOG_PREFIX="[buildjdk] " \
-            JAVA_MODULES="$(BUILDJDK_MODULES)" \
-        )
+            CREATING_BUILDJDK=true)
 
 ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image
 
 ################################################################################
 # The interim-image is a small jlinked image that is used to generate artifacts

@@ -471,11 +449,11 @@
 define DeclareInterimJmodRecipe
   $1-interim-jmod:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
             MODULE=$1 \
             JMODS_DIR=$(INTERIM_JMODS_DIR) \
-            JMODS_SUPPORT_DIR=$(INTERIM_JMODS_DIR)/support \
+            JMODS_TEMPDIR=$(INTERIM_JMODS_DIR)/temp \
             INTERIM_JMOD=true \
         )
 endef
 
 $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $(call DeclareInterimJmodRecipe,$m)))

@@ -494,16 +472,16 @@
 # Generate test names for all JTReg test groups
 #
 
 define DeclareRunTestRecipe
   test-$1:
-        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
-            TEST="$1")
+        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$1")
 
   exploded-test-$1:
-        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
+        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
             TEST="$1" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
+
 endef
 
 # ALL_NAMED_TESTS is defined in FindTests.gmk
 $(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t)))
 ALL_TEST_TARGETS := $(addprefix test-, $(ALL_NAMED_TESTS))

@@ -577,44 +555,31 @@
 
 ################################################################################
 # Run tests
 
 test:
-        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
-            TEST="$(TEST)")
+        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$(TEST)")
 
 exploded-test:
-        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
+        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
             TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
 
-jcov-test:
-        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
-            TEST="$(TEST)" TEST_OPTS_JCOV=true)
-
-ALL_TARGETS += test exploded-test jcov-test
+ALL_TARGETS += test exploded-test
 
 ################################################################################
 # Bundles
 
 product-bundles:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles)
 
-legacy-bundles:
-        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk legacy-bundles)
-
 test-bundles:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk test-bundles)
 
 docs-bundles:
         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles)
 
-ifeq ($(JCOV_ENABLED), true)
-  jcov-bundles:
-        +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk jcov-bundles)
-endif
-
-ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles jcov-bundles
+ALL_TARGETS += product-bundles test-bundles docs-bundles
 
 ################################################################################
 # Install targets
 
 install:

@@ -665,11 +630,11 @@
 
   $(JAVA_TARGETS): interim-langtools
 
   # Declare dependencies between hotspot-<variant>* targets
   $(foreach v, $(JVM_VARIANTS), \
-      $(eval hotspot-$v-gensrc: java.base-copy) \
+      $(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
       $(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
   )
 
   hotspot-ide-project: hotspot exploded-image
 

@@ -688,11 +653,11 @@
   endif
 
   # The demos are currently linking to libjvm and libjava, just like all other
   # jdk libs, even though they don't need to. To avoid warnings, make sure they
   # aren't built until after libjava and libjvm are available to link to.
-  demos-jdk: java.base-libs exploded-image
+  demos-jdk: java.base-libs exploded-image-optimize
   test-image-demos-jdk: demos-jdk
 
   # Declare dependency from <module>-java to <module>-gensrc
   $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
 

@@ -704,11 +669,15 @@
   # Declare dependencies between <module>-rmic to <module>-java
   $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
 
   # Declare dependencies from <module>-lib to <module>-java
   # Skip modules that do not have java source.
-  $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
+  # When creating a BUILDJDK, the java compilation has already been done by the
+  # normal build and copied in.
+  ifneq ($(CREATING_BUILDJDK), true)
+    $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
+  endif
 
   # Declare dependencies from all other <module>-lib to java.base-lib
   $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
       $(eval $t: java.base-libs))
 

@@ -742,11 +711,11 @@
   # The ct.sym generation uses all the moduleinfos as input
   jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS)
 
   # Declare dependencies between jmod targets.
   # java.base jmod needs jrt-fs.jar and access to the other jmods to be built.
-  # When creating the BUILDJDK, we don't need to add hashes to java.base, thus
+  # When creating a BUILDJDK, we don't need to add hashes to java.base, thus
   # we don't need to depend on all other jmods
   ifneq ($(CREATING_BUILDJDK), true)
     java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
   endif
 

@@ -755,11 +724,15 @@
 
   # Building java.base-jmod requires all of VM (ie hotspot) to be built.
   java.base-jmod: $(JVM_MAIN_TARGETS)
 
   # Declare dependencies from <module>-jmod to all other module targets
-  $(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java))
+  # When creating a BUILDJDK, the java compilation has already been done by the
+  # normal build and copied in.
+  ifneq ($(CREATING_BUILDJDK), true)
+    $(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java))
+  endif
   $(foreach m, $(GENDATA_MODULES), $(eval $m_JMOD_DEPS += $m-gendata))
   $(foreach m, $(RMIC_MODULES), $(eval $m_JMOD_DEPS += $m-rmic))
   $(foreach m, $(LIBS_MODULES), $(eval $m_JMOD_DEPS += $m-libs))
   $(foreach m, $(LAUNCHER_MODULES), $(eval $m_JMOD_DEPS += $m-launchers))
   $(foreach m, $(COPY_MODULES), $(eval $m_JMOD_DEPS += $m-copy))

@@ -775,46 +748,41 @@
 
   # For the full JDK compile commands, create all possible generated sources
   $(foreach m, $(GENSRC_MODULES), $(eval $m-libs-compile-commands: $m-gensrc))
   $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs-compile-commands: $m-java))
 
-  $(COMPILE_COMMANDS_TARGETS_HOTSPOT): clean-compile-commands
-  $(COMPILE_COMMANDS_TARGETS_JDK): clean-compile-commands
   compile-commands-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT)
   compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
 
-  vscode-project: compile-commands
-  vscode-project-clangd: compile-commands
-  vscode-project-rtags: compile-commands
-  vscode-project-ccls: compile-commands
-
   # Jmods cannot be created until we have the jmod tool ready to run. During
   # a normal build we run it from the exploded image, but when cross compiling
   # it's run from the buildjdk, which is either created at build time or user
   # supplied.
+  #
+  # For the exploded image to be runnable, all java modules and
+  # jdk.jlink-launchers need to be built. We also need to copy jvm.cfg (done
+  # in java.base-copy) and tzdb.dat (done in java.base-gendata) to the
+  # appropriate location otherwise jimage, jlink and jmod won't start. This
+  # also applies when creating the buildjdk.
+  DEFAULT_JMOD_DEPS += java.base-libs java.base-copy java.base-gendata \
+      jdk.jlink-launchers
+  # When cross compiling and buildjdk is to be created, depend on creating the
+  # buildjdk instead of the default dependencies.
   ifeq ($(CREATE_BUILDJDK), true)
+    # Avoid calling create-buildjdk from within a create-buildjdk call.
     ifneq ($(CREATING_BUILDJDK), true)
-      # When cross compiling and buildjdk is to be created, simply depend on
-      # creating the buildjdk.
       $(JMOD_TARGETS): create-buildjdk
       buildtools-modules: create-buildjdk
     else
-      # While actually creating the buildjdk, we need to list the bare
-      # minimum dependencies needed before running jmod, to avoid building
-      # more than necessary. This includes:
-      # * all java modules
-      # * jdk.jlink-launchers
-      # * copy jvm.cfg (done in java.base-copy)
-      # * tzdb.dat (done in java.base-gendata)
-      # Without all of these jimage, jlink and jmod won't start.
-      $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): java.base-libs java.base-copy \
-          java.base-gendata jdk.jlink-launchers java
+      # While actually creating the buildjdk, the default deps applies.
+      $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS)
     endif
   else
-    # The normal non cross compilation case uses needs to wait for the full
-    # exploded-image to avoid a race with the optimize target.
-    $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): exploded-image
+    # The normal non cross compilation case uses the default deps.
+    # To avoid races with the optimize target, that also needs to happen first.
+    $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS) \
+        exploded-image-optimize
   endif
 
   # All modules include the main license files from java.base.
   $(JMOD_TARGETS): java.base-copy
 

@@ -850,14 +818,10 @@
   symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS)
 
   mac-jdk-bundle: jdk-image
   mac-legacy-jre-bundle: legacy-jre-image
 
-  ifeq ($(JCOV_INPUT_JDK), )
-    jcov-image: jdk-image
-  endif
-
   # The optimize target can run as soon as the modules dir has been completely
   # populated (java, copy and gendata targets) and the basic libs and launchers
   # have been built.
   exploded-image-optimize: java copy gendata java.base-libs java.base-launchers \
       buildtools-modules

@@ -878,44 +842,49 @@
 
   # If not already set, then set the JVM specific docs targets
   JVM_DOCS_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
 
   # The gensrc steps for hotspot and jdk.jdi create html spec files.
-  docs-jdk-specs: buildtools-jdk $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
+  docs-jdk-specs: $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
       docs-jdk-index
 
+  docs-jdk-index: exploded-image buildtools-modules
+
   docs-zip: docs-jdk
 
   # Tests
   test: jdk-image test-image
 
   exploded-test: exploded-image test-image
 
-  jcov-test: jcov-image test-image
-
   test-make: clean-test-make compile-commands
 
   test-make-compile-commands: compile-commands
 
   # Declare dependency for all generated test targets
   $(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
   $(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
 
+  create-buildjdk-copy: jdk.jlink-java java.base-gendata \
+      $(addsuffix -java, $(INTERIM_IMAGE_MODULES))
+
+  create-buildjdk-interim-image: create-buildjdk-copy
+
   interim-image: $(INTERIM_JMOD_TARGETS)
 
-  build-test-lib: exploded-image
+  build-test-lib: exploded-image-optimize
 
   build-test-failure-handler: interim-langtools
 
   test-image-failure-handler: build-test-failure-handler
 
   build-test-hotspot-jtreg-native: buildtools-jdk \
       hotspot-$(JVM_VARIANT_MAIN)-libs
 
   build-test-jdk-jtreg-native: buildtools-jdk java.base-libs
 
-  build-test-hotspot-jtreg-graal: exploded-image
+  build-test-hotspot-jtreg-graal: exploded-image-optimize
 
   test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
 
   test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
 

@@ -925,18 +894,14 @@
 
   install: product-images
 
   product-bundles: product-images
 
-  legacy-bundles: legacy-images
-
   test-bundles: test-image
 
   docs-bundles: docs-image
 
-  jcov-bundles: jcov-image
-
   generate-summary: jmods buildtools-modules
 
   update-x11wrappers: java.base-copy buildtools-jdk
 
 endif

@@ -947,14 +912,10 @@
 # If not already set, set the JVM specific tools targets
 JVM_TOOLS_TARGETS ?= buildtools-hotspot
 buildtools: buildtools-langtools interim-langtools interim-rmic \
     buildtools-jdk $(JVM_TOOLS_TARGETS)
 
-# Declare dependencies from hotspot-<variant> targets
-$(foreach v, $(JVM_VARIANTS), \
-  $(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
-)
 hotspot: $(HOTSPOT_VARIANT_TARGETS)
 
 # Create targets hotspot-libs and hotspot-gensrc.
 $(foreach v, $(JVM_VARIANTS), \
   $(eval hotspot-libs: hotspot-$v-libs) \

@@ -1003,11 +964,11 @@
 # be runnable on the host platform anyway.
 ifneq ($(COMPILE_TYPE), cross)
   exploded-image: exploded-image-optimize
 endif
 
-create-buildjdk: create-buildjdk-interim-image
+create-buildjdk: create-buildjdk-copy create-buildjdk-interim-image
 
 docs-jdk-api: docs-jdk-api-javadoc
 docs-javase-api: docs-javase-api-javadoc
 docs-reference-api: docs-reference-api-javadoc
 

@@ -1033,13 +994,10 @@
 
 # This target builds the product images, e.g. the JDK image
 # (and possibly other, more specific versions)
 product-images: jdk-image symbols-image exploded-image
 
-# This target builds the legacy images, e.g. the legacy JRE image
-legacy-images: legacy-jre-image
-
 # zip-security is actually a bundle, but for now it needs to be considered
 # an image until this can be cleaned up properly.
 product-images: zip-security
 
 # The module summary cannot be run when:

@@ -1050,14 +1008,12 @@
   ifeq ($(EXTERNAL_BUILDJDK), false)
     product-images: generate-summary
   endif
 endif
 
-ifeq ($(call isTargetOs, macosx), true)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
   product-images: mac-jdk-bundle
-
-  legacy-images: mac-legacy-jre-bundle
 endif
 
 # This target builds the documentation image
 docs-image: docs-jdk
 

@@ -1088,11 +1044,11 @@
 ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
     copy java rmic libs launchers jmods \
     jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
     exploded-image-base exploded-image \
     create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
-    docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \
+    docs-javase docs-reference docs-javadoc mac-bundles product-images \
     docs-image test-image all-images \
     all-bundles
 
 ################################################################################
 

@@ -1138,12 +1094,11 @@
 ################################################################################
 # Clean targets are automatically run serially by the Makefile calling this
 # file.
 
 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
-    images make-support test-make bundles buildjdk test-results test-support \
-    support/images
+    images make-support test-make bundles buildjdk test-results test-support
 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
 CLEAN_SUPPORT_DIRS += demos
 CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
 CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
 CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))

@@ -1160,13 +1115,10 @@
         $(ECHO) Cleaned all build artifacts.
 
 clean-docs:
         $(call CleanDocs)
 
-clean-compile-commands:
-        $(call CleanMakeSupportDir,compile-commands)
-
 $(CLEAN_DIR_TARGETS):
         $(call CleanDir,$(patsubst clean-%, %, $@))
 
 $(CLEAN_SUPPORT_DIR_TARGETS):
         $(call CleanSupportDir,$(patsubst clean-%, %, $@))

@@ -1189,13 +1141,10 @@
 # while classes and touch files end up in jdk.
 clean-support: clean-jdk
 
 clean-test: clean-test-results clean-test-support
 
-# When cleaning images, also clean the support/images directory.
-clean-images: clean-support/images
-
 # Remove everything, including configure configuration. If the output
 # directory was created by configure and now becomes empty, remove it as well.
 dist-clean: clean
         ($(CD) $(OUTPUTDIR) && \
             $(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide \

@@ -1208,13 +1157,13 @@
                 && $(RM) -r $(OUTPUTDIR)) \
           fi \
         )
         $(ECHO) Cleaned everything, you will have to re-run configure.
 
-ALL_TARGETS += clean clean-docs clean-compile-commands dist-clean $(CLEAN_DIR_TARGETS) \
-    $(CLEAN_SUPPORT_DIR_TARGETS) $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) \
-    $(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS)
+ALL_TARGETS += clean clean-docs dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \
+    $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \
+    $(CLEAN_MODULE_PHASE_TARGETS)
 
 ################################################################################
 # Declare *-only targets for each normal target
 $(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
 
< prev index next >