< prev index next >

make/Main.gmk

Print this page




  49 # valid top level targets. It's used to declare them all as PHONY and to
  50 # generate the -only targets.
  51 ALL_TARGETS :=
  52 
  53 # Hook to include the corresponding custom file, if present.
  54 $(eval $(call IncludeCustomExtension, Main.gmk))
  55 
  56 # All modules for the current target platform.
  57 ALL_MODULES := $(call FindAllModules)
  58 
  59 ################################################################################
  60 ################################################################################
  61 #
  62 # Recipes for all targets. Only recipes, dependencies are declared later.
  63 #
  64 ################################################################################
  65 
  66 ################################################################################
  67 # Interim/build tools targets, compiling tools used during the build
  68 
  69 buildtools-langtools:



  70         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ToolsLangtools.gmk)
  71 
  72 interim-langtools:
  73         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk)
  74 
  75 interim-rmic:
  76         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
  77 
  78 interim-cldrconverter:
  79         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
  80 
  81 buildtools-jdk:
  82         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsJdk.gmk)
  83 
  84 buildtools-modules:
  85         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileModuleTools.gmk)
  86 
  87 buildtools-hotspot:
  88         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk)

  89 
  90 ALL_TARGETS += buildtools-langtools interim-langtools \
  91     interim-rmic interim-cldrconverter buildtools-jdk buildtools-modules \
  92     buildtools-hotspot
  93 
  94 ################################################################################
  95 # Special targets for certain modules
  96 
  97 generate-exported-symbols:
  98         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildStatic.gmk)
  99 
 100 ALL_TARGETS += generate-exported-symbols
 101 
 102 ################################################################################
 103 # Gensrc targets, generating source before java compilation can be done
 104 #
 105 $(eval $(call DeclareRecipesForPhase, GENSRC, \
 106     TARGET_SUFFIX := gensrc-src, \
 107     FILE_PREFIX := Gensrc, \
 108     MAKE_SUBDIR := gensrc, \
 109     CHECK_MODULES := $(ALL_MODULES), \
 110 ))
 111 
 112 $(foreach m, $(GENSRC_MODULES), $(eval $m-gensrc: $m-gensrc-src))
 113 
 114 LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, $(LANGTOOLS_MODULES)), $(GENSRC_TARGETS))
 115 INTERIM_LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, \
 116     $(INTERIM_LANGTOOLS_BASE_MODULES)), $(GENSRC_TARGETS))
 117 HOTSPOT_GENSRC_TARGETS := $(filter $(addsuffix -%, $(HOTSPOT_MODULES)), $(GENSRC_TARGETS))
 118 JDK_GENSRC_TARGETS := $(filter-out $(LANGTOOLS_GENSRC_TARGETS) \
 119     $(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
 120 
 121 GENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
 122 GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
 123     $(GENSRC_MODULEINFO_MODULES))
 124 
 125 GENSRC_MODULES := $(GENSRC_MODULEINFO_MODULES)
 126 GENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \
 127     $(addsuffix -gensrc, $(GENSRC_MODULES)))



 128 
 129 define DeclareModuleInfoRecipe
 130   $1-gensrc-moduleinfo:
 131         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
 132             -f GensrcModuleInfo.gmk MODULE=$1)
 133 
 134   $1-gensrc: $1-gensrc-moduleinfo
 135 endef
 136 
 137 $(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m)))

 138 
 139 ALL_TARGETS += $(GENSRC_TARGETS)
 140 
 141 ################################################################################
 142 # Generate data targets
 143 $(eval $(call DeclareRecipesForPhase, GENDATA, \
 144     TARGET_SUFFIX := gendata, \
 145     FILE_PREFIX := Gendata, \
 146     MAKE_SUBDIR := gendata, \
 147     CHECK_MODULES := $(ALL_MODULES), \
 148     USE_WRAPPER := true))
 149 
 150 ALL_TARGETS += $(GENDATA_TARGETS)
 151 
 152 ################################################################################
 153 # Copy files targets
 154 $(eval $(call DeclareRecipesForPhase, COPY, \
 155     TARGET_SUFFIX := copy, \
 156     FILE_PREFIX := Copy, \
 157     MAKE_SUBDIR := copy, \


 263             GENERATE_COMPILE_COMMANDS_ONLY=true)
 264 
 265   COMPILE_COMMANDS_TARGETS_$2 += $1-compile-commands
 266 endef
 267 
 268 $(foreach t, $(HOTSPOT_VARIANT_LIBS_TARGETS), \
 269   $(eval $(call DeclareCompileCommandsRecipe,$t,HOTSPOT)) \
 270 )
 271 
 272 $(foreach t, $(LIBS_TARGETS) $(LAUNCHER_TARGETS), \
 273   $(eval $(call DeclareCompileCommandsRecipe,$t,JDK)) \
 274 )
 275 
 276 compile-commands compile-commands-hotspot:
 277         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileCommands.gmk)
 278 
 279 ALL_TARGETS += $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
 280 ALL_TARGETS += compile-commands compile-commands-hotspot
 281 
 282 ################################################################################
 283 # VS Code projects
 284 vscode-project:
 285         +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
 286       VSCODE_INDEXER=cpptools)
 287 
 288 vscode-project-clangd:
 289         +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
 290       VSCODE_INDEXER=clangd)
 291 
 292 vscode-project-rtags:
 293         +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
 294       VSCODE_INDEXER=rtags)
 295 
 296 vscode-project-ccls:
 297         +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
 298       VSCODE_INDEXER=ccls)
 299 
 300 ALL_TARGETS += vscode-project vscode-project-clangd vscode-project-rtags \
 301   vscode-project-ccls
 302 
 303 ################################################################################
 304 # Build demos targets
 305 
 306 demos-jdk:
 307         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk)
 308 
 309 test-image-demos-jdk:
 310         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk images)
 311 
 312 ALL_TARGETS += demos-jdk test-image-demos-jdk
 313 
 314 ################################################################################
 315 # Jigsaw specific data and analysis targets.
 316 
 317 generate-summary:
 318         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateModuleSummary.gmk)
 319 
 320 ALL_TARGETS += generate-summary
 321 
 322 ################################################################################
 323 # Jmod targets


 333 
 334 $(foreach m, $(JMOD_MODULES), $(eval $(call DeclareJmodRecipe,$m)))
 335 
 336 ALL_TARGETS += $(JMOD_TARGETS)
 337 
 338 ################################################################################
 339 # Images targets
 340 
 341 store-source-revision:
 342         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk store-source-revision)
 343 
 344 create-source-revision-tracker:
 345         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk create-source-revision-tracker)
 346 
 347 BOOTCYCLE_TARGET := product-images
 348 bootcycle-images:
 349         ifneq ($(COMPILE_TYPE), cross)
 350           $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image)
 351           $(call MakeDir, $(OUTPUTDIR)/bootcycle-build)
 352           +$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
 353               LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
 354         else
 355           $(call LogWarn, Boot cycle build disabled when cross compiling)
 356         endif
 357 
 358 zip-security:
 359         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
 360 
 361 zip-source:
 362         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
 363 
 364 jrtfs-jar:
 365         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
 366 
 367 jdk-image:
 368         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jdk)
 369 
 370 legacy-jre-image:
 371         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jre)
 372 
 373 symbols-image:


 430 update-build-docs:
 431         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk)
 432 
 433 update-x11wrappers:
 434         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateX11Wrappers.gmk)
 435 
 436 ALL_TARGETS += docs-jdk-api-javadoc docs-jdk-api-modulegraph \
 437     docs-javase-api-javadoc docs-javase-api-modulegraph \
 438     docs-reference-api-javadoc docs-reference-api-modulegraph docs-jdk-specs \
 439     docs-jdk-index docs-zip update-build-docs update-x11wrappers
 440 
 441 ################################################################################
 442 # Cross compilation support
 443 
 444 ifeq ($(CREATING_BUILDJDK), true)
 445   # This target is only called by the recursive call below.
 446   create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \
 447       java.base-copy jdk.jdeps-launchers
 448 endif
 449 
 450 BUILDJDK_MODULES := $(sort $(foreach m, jdk.jlink $(INTERIM_IMAGE_MODULES), \
 451     $(call FindTransitiveDepsForModule, $m) $m))
 452 
 453 create-buildjdk-interim-image:
 454         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
 455             $@-helper \
 456             SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
 457             HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
 458             CREATING_BUILDJDK=true \
 459             LOG_PREFIX="[buildjdk] " \
 460             JAVA_MODULES="$(BUILDJDK_MODULES)" \
 461         )
 462 
 463 ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image
 464 
 465 ################################################################################
 466 # The interim-image is a small jlinked image that is used to generate artifacts
 467 # at build time for use when linking the real images.
 468 
 469 INTERIM_JMOD_TARGETS := $(addsuffix -interim-jmod, $(INTERIM_IMAGE_MODULES))
 470 
 471 define DeclareInterimJmodRecipe
 472   $1-interim-jmod:
 473         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
 474             MODULE=$1 \
 475             JMODS_DIR=$(INTERIM_JMODS_DIR) \
 476             JMODS_SUPPORT_DIR=$(INTERIM_JMODS_DIR)/support \
 477             INTERIM_JMOD=true \
 478         )
 479 endef
 480 
 481 $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $(call DeclareInterimJmodRecipe,$m)))


 673 
 674   hotspot-ide-project: hotspot exploded-image
 675 
 676   generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
 677 
 678   # If not already set, set the JVM variant target so that the JVM will be built.
 679   JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
 680 
 681   # Building one JVM variant is enough to start building the other libs
 682   $(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
 683 
 684   $(LAUNCHER_TARGETS): java.base-libs
 685 
 686   ifeq ($(STATIC_BUILD), true)
 687     $(LAUNCHER_TARGETS): generate-exported-symbols
 688   endif
 689 
 690   # The demos are currently linking to libjvm and libjava, just like all other
 691   # jdk libs, even though they don't need to. To avoid warnings, make sure they
 692   # aren't built until after libjava and libjvm are available to link to.
 693   demos-jdk: java.base-libs exploded-image
 694   test-image-demos-jdk: demos-jdk
 695 
 696   # Declare dependency from <module>-java to <module>-gensrc
 697   $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
 698 
 699   # Declare dependencies between java modules
 700   $(foreach m, $(JAVA_MODULES), \
 701       $(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \
 702       $(call FindDepsForModule,$m)))))
 703 
 704   # Declare dependencies between <module>-rmic to <module>-java
 705   $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
 706 
 707   # Declare dependencies from <module>-lib to <module>-java
 708   # Skip modules that do not have java source.
 709   $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))




 710 
 711   # Declare dependencies from all other <module>-lib to java.base-lib
 712   $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
 713       $(eval $t: java.base-libs))
 714 
 715   # jdk.accessibility depends on java.desktop
 716   jdk.accessibility-libs: java.desktop-libs
 717 
 718   # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
 719   # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
 720   # virtual target.
 721   jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
 722 
 723   # The swing beans need to have java base properly generated to avoid errors
 724   # in javadoc. The X11 wrappers need the java.base include files to have been
 725   # copied and processed.
 726   java.desktop-gensrc-src: java.base-gensrc java.base-copy
 727 
 728   # The annotation processing for jdk.internal.vm.compiler
 729   # and jdk.internal.vm.compiler.management needs classes from the current JDK.
 730   jdk.internal.vm.compiler-gensrc-src: $(addsuffix -java, \
 731       $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler))
 732   jdk.internal.vm.compiler.management-gensrc-src: $(addsuffix -java, \
 733       $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler.management))
 734 
 735   # For these modules, the gensrc step is generating a module-info.java.extra
 736   # file to be processed by the gensrc-moduleinfo target.
 737   jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src
 738   jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src
 739 
 740   jdk.jdeps-gendata: java rmic
 741 
 742   # The ct.sym generation uses all the moduleinfos as input
 743   jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS)
 744 
 745   # Declare dependencies between jmod targets.
 746   # java.base jmod needs jrt-fs.jar and access to the other jmods to be built.
 747   # When creating the BUILDJDK, we don't need to add hashes to java.base, thus
 748   # we don't need to depend on all other jmods
 749   ifneq ($(CREATING_BUILDJDK), true)
 750     java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
 751   endif
 752 
 753   # If not already set, set the JVM target so that the JVM will be built.
 754   JVM_MAIN_TARGETS ?= hotspot
 755 
 756   # Building java.base-jmod requires all of VM (ie hotspot) to be built.
 757   java.base-jmod: $(JVM_MAIN_TARGETS)
 758 
 759   # Declare dependencies from <module>-jmod to all other module targets
 760   $(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java))




 761   $(foreach m, $(GENDATA_MODULES), $(eval $m_JMOD_DEPS += $m-gendata))
 762   $(foreach m, $(RMIC_MODULES), $(eval $m_JMOD_DEPS += $m-rmic))
 763   $(foreach m, $(LIBS_MODULES), $(eval $m_JMOD_DEPS += $m-libs))
 764   $(foreach m, $(LAUNCHER_MODULES), $(eval $m_JMOD_DEPS += $m-launchers))
 765   $(foreach m, $(COPY_MODULES), $(eval $m_JMOD_DEPS += $m-copy))
 766   $(foreach m, $(ALL_MODULES), $(eval $m-jmod: $($(m)_JMOD_DEPS)))
 767   $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $m-interim-jmod: $($(m)_JMOD_DEPS)))
 768 
 769   # Setup the minimal set of generated native source dependencies for hotspot
 770   $(foreach v, $(JVM_VARIANTS), \
 771     $(eval hotspot-$v-libs-compile-commands: hotspot-$v-gensrc) \
 772     $(foreach m, $(filter java.desktop jdk.hotspot.agent, $(GENSRC_MODULES)), \
 773       $(eval hotspot-$v-libs-compile-commands: $m-gensrc)) \
 774   )
 775 
 776   # For the full JDK compile commands, create all possible generated sources
 777   $(foreach m, $(GENSRC_MODULES), $(eval $m-libs-compile-commands: $m-gensrc))
 778   $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs-compile-commands: $m-java))
 779 
 780   $(COMPILE_COMMANDS_TARGETS_HOTSPOT): clean-compile-commands
 781   $(COMPILE_COMMANDS_TARGETS_JDK): clean-compile-commands
 782   compile-commands-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT)
 783   compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
 784 
 785   vscode-project: compile-commands
 786   vscode-project-clangd: compile-commands
 787   vscode-project-rtags: compile-commands
 788   vscode-project-ccls: compile-commands
 789 
 790   # Jmods cannot be created until we have the jmod tool ready to run. During
 791   # a normal build we run it from the exploded image, but when cross compiling
 792   # it's run from the buildjdk, which is either created at build time or user
 793   # supplied.










 794   ifeq ($(CREATE_BUILDJDK), true)

 795     ifneq ($(CREATING_BUILDJDK), true)
 796       # When cross compiling and buildjdk is to be created, simply depend on
 797       # creating the buildjdk.
 798       $(JMOD_TARGETS): create-buildjdk
 799       buildtools-modules: create-buildjdk
 800     else
 801       # While actually creating the buildjdk, we need to list the bare
 802       # minimum dependencies needed before running jmod, to avoid building
 803       # more than necessary. This includes:
 804       # * all java modules
 805       # * jdk.jlink-launchers
 806       # * copy jvm.cfg (done in java.base-copy)
 807       # * tzdb.dat (done in java.base-gendata)
 808       # Without all of these jimage, jlink and jmod won't start.
 809       $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): java.base-libs java.base-copy \
 810           java.base-gendata jdk.jlink-launchers java
 811     endif
 812   else
 813     # The normal non cross compilation case uses needs to wait for the full
 814     # exploded-image to avoid a race with the optimize target.
 815     $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): exploded-image

 816   endif
 817 
 818   # All modules include the main license files from java.base.
 819   $(JMOD_TARGETS): java.base-copy
 820 
 821   zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
 822       $(filter jdk.crypto%, $(JAVA_TARGETS))
 823 
 824   zip-source: gensrc rmic
 825 
 826   jrtfs-jar: interim-langtools
 827 
 828   build-microbenchmark: interim-langtools exploded-image
 829 
 830   ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
 831     ifeq ($(CREATE_BUILDJDK), true)
 832       # If creating a buildjdk, the interim image needs to be based on that.
 833       generate-link-opt-data: create-buildjdk
 834     else ifeq ($(EXTERNAL_BUILDJDK), false)
 835       # If an external buildjdk has been provided, we skip generating an


 883   docs-jdk-specs: buildtools-jdk $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
 884       docs-jdk-index
 885 
 886   docs-zip: docs-jdk
 887 
 888   # Tests
 889   test: jdk-image test-image
 890 
 891   exploded-test: exploded-image test-image
 892 
 893   jcov-test: jcov-image test-image
 894 
 895   test-make: clean-test-make compile-commands
 896 
 897   test-make-compile-commands: compile-commands
 898 
 899   # Declare dependency for all generated test targets
 900   $(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
 901   $(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
 902 





 903   interim-image: $(INTERIM_JMOD_TARGETS)
 904 
 905   build-test-lib: exploded-image
 906 
 907   build-test-failure-handler: interim-langtools
 908 
 909   test-image-failure-handler: build-test-failure-handler
 910 
 911   build-test-hotspot-jtreg-native: buildtools-jdk \
 912       hotspot-$(JVM_VARIANT_MAIN)-libs
 913 
 914   build-test-jdk-jtreg-native: buildtools-jdk java.base-libs
 915 
 916   build-test-hotspot-jtreg-graal: exploded-image
 917 
 918   test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
 919 
 920   test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
 921 
 922   test-image-hotspot-jtreg-graal: build-test-hotspot-jtreg-graal
 923 
 924   test-image-hotspot-gtest: hotspot
 925 
 926   install: product-images
 927 
 928   product-bundles: product-images
 929 
 930   legacy-bundles: legacy-images
 931 
 932   test-bundles: test-image
 933 
 934   docs-bundles: docs-image
 935 
 936   jcov-bundles: jcov-image


 988 $(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
 989 $(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
 990 $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
 991 $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
 992 $(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
 993 
 994 # Building java.base includes building all of hotspot.
 995 java.base: $(JVM_MAIN_TARGETS)
 996 
 997 demos: demos-jdk
 998 
 999 # The "exploded image" is a locally runnable JDK in $(OUTPUTDIR)/jdk.
1000 exploded-image-base: $(ALL_MODULES)
1001 exploded-image: exploded-image-base release-file
1002 # When cross compiling, no need to optimize the exploded image since it won't
1003 # be runnable on the host platform anyway.
1004 ifneq ($(COMPILE_TYPE), cross)
1005   exploded-image: exploded-image-optimize
1006 endif
1007 
1008 create-buildjdk: create-buildjdk-interim-image
1009 
1010 docs-jdk-api: docs-jdk-api-javadoc
1011 docs-javase-api: docs-javase-api-javadoc
1012 docs-reference-api: docs-reference-api-javadoc
1013 
1014 # If we're building full docs, we must also generate the module graphs to
1015 # get non-broken api documentation.
1016 ifeq ($(ENABLE_FULL_DOCS), true)
1017   docs-jdk-api: docs-jdk-api-modulegraph
1018   docs-javase-api: docs-javase-api-modulegraph
1019   docs-reference-api: docs-reference-api-modulegraph
1020 endif
1021 
1022 docs-jdk: docs-jdk-api docs-jdk-specs docs-jdk-index
1023 docs-javase: docs-javase-api
1024 docs-reference: docs-reference-api
1025 
1026 # alias for backwards compatibility
1027 docs-javadoc: docs-jdk-api
1028 




  49 # valid top level targets. It's used to declare them all as PHONY and to
  50 # generate the -only targets.
  51 ALL_TARGETS :=
  52 
  53 # Hook to include the corresponding custom file, if present.
  54 $(eval $(call IncludeCustomExtension, Main.gmk))
  55 
  56 # All modules for the current target platform.
  57 ALL_MODULES := $(call FindAllModules)
  58 
  59 ################################################################################
  60 ################################################################################
  61 #
  62 # Recipes for all targets. Only recipes, dependencies are declared later.
  63 #
  64 ################################################################################
  65 
  66 ################################################################################
  67 # Interim/build tools targets, compiling tools used during the build
  68 
  69 # When creating a BUILDJDK, the buildtools and interim targets have already
  70 # been built and should not be built again.
  71 ifneq ($(CREATING_BUILDJDK), true)
  72   buildtools-langtools:
  73         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ToolsLangtools.gmk)
  74 
  75   interim-langtools:
  76         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk)
  77 
  78   interim-rmic:
  79         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
  80 
  81   interim-cldrconverter:
  82         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
  83 
  84   buildtools-jdk:
  85         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsJdk.gmk)
  86 
  87   buildtools-modules:
  88         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileModuleTools.gmk)
  89 
  90   buildtools-hotspot:
  91         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk)
  92 endif
  93 
  94 ALL_TARGETS += buildtools-langtools interim-langtools \
  95     interim-rmic interim-cldrconverter buildtools-jdk buildtools-modules \
  96     buildtools-hotspot
  97 
  98 ################################################################################
  99 # Special targets for certain modules
 100 
 101 generate-exported-symbols:
 102         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildStatic.gmk)
 103 
 104 ALL_TARGETS += generate-exported-symbols
 105 
 106 ################################################################################
 107 # Gensrc targets, generating source before java compilation can be done
 108 #
 109 # When creating a BUILDJDK, the java targets have already been built and copied
 110 # into the buildjdk so no need to generate sources.
 111 ifneq ($(CREATING_BUILDJDK), true)
 112   $(eval $(call DeclareRecipesForPhase, GENSRC, \
 113       TARGET_SUFFIX := gensrc-src, \
 114       FILE_PREFIX := Gensrc, \
 115       MAKE_SUBDIR := gensrc, \
 116       CHECK_MODULES := $(ALL_MODULES), \
 117   ))
 118 
 119   $(foreach m, $(GENSRC_MODULES), $(eval $m-gensrc: $m-gensrc-src))
 120 
 121   LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, $(LANGTOOLS_MODULES)), $(GENSRC_TARGETS))
 122   INTERIM_LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, \
 123       $(INTERIM_LANGTOOLS_BASE_MODULES)), $(GENSRC_TARGETS))
 124   HOTSPOT_GENSRC_TARGETS := $(filter $(addsuffix -%, $(HOTSPOT_MODULES)), $(GENSRC_TARGETS))
 125   JDK_GENSRC_TARGETS := $(filter-out $(LANGTOOLS_GENSRC_TARGETS) \
 126       $(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
 127 
 128   GENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
 129   GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
 130       $(GENSRC_MODULEINFO_MODULES))
 131 
 132   GENSRC_MODULES := $(GENSRC_MODULEINFO_MODULES)
 133   GENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \
 134       $(addsuffix -gensrc, $(GENSRC_MODULES)))
 135 
 136   define DeclareModuleInfoRecipe
 137     $1-gensrc-moduleinfo:
 138         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
 139             -f GensrcModuleInfo.gmk MODULE=$1)
 140 
 141     $1-gensrc: $1-gensrc-moduleinfo
 142   endef
 143 
 144   $(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m)))
 145 endif
 146 
 147 ALL_TARGETS += $(GENSRC_TARGETS)
 148 
 149 ################################################################################
 150 # Generate data targets
 151 $(eval $(call DeclareRecipesForPhase, GENDATA, \
 152     TARGET_SUFFIX := gendata, \
 153     FILE_PREFIX := Gendata, \
 154     MAKE_SUBDIR := gendata, \
 155     CHECK_MODULES := $(ALL_MODULES), \
 156     USE_WRAPPER := true))
 157 
 158 ALL_TARGETS += $(GENDATA_TARGETS)
 159 
 160 ################################################################################
 161 # Copy files targets
 162 $(eval $(call DeclareRecipesForPhase, COPY, \
 163     TARGET_SUFFIX := copy, \
 164     FILE_PREFIX := Copy, \
 165     MAKE_SUBDIR := copy, \


 271             GENERATE_COMPILE_COMMANDS_ONLY=true)
 272 
 273   COMPILE_COMMANDS_TARGETS_$2 += $1-compile-commands
 274 endef
 275 
 276 $(foreach t, $(HOTSPOT_VARIANT_LIBS_TARGETS), \
 277   $(eval $(call DeclareCompileCommandsRecipe,$t,HOTSPOT)) \
 278 )
 279 
 280 $(foreach t, $(LIBS_TARGETS) $(LAUNCHER_TARGETS), \
 281   $(eval $(call DeclareCompileCommandsRecipe,$t,JDK)) \
 282 )
 283 
 284 compile-commands compile-commands-hotspot:
 285         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileCommands.gmk)
 286 
 287 ALL_TARGETS += $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
 288 ALL_TARGETS += compile-commands compile-commands-hotspot
 289 
 290 ################################################################################





















 291 # Build demos targets
 292 
 293 demos-jdk:
 294         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk)
 295 
 296 test-image-demos-jdk:
 297         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk images)
 298 
 299 ALL_TARGETS += demos-jdk test-image-demos-jdk
 300 
 301 ################################################################################
 302 # Jigsaw specific data and analysis targets.
 303 
 304 generate-summary:
 305         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateModuleSummary.gmk)
 306 
 307 ALL_TARGETS += generate-summary
 308 
 309 ################################################################################
 310 # Jmod targets


 320 
 321 $(foreach m, $(JMOD_MODULES), $(eval $(call DeclareJmodRecipe,$m)))
 322 
 323 ALL_TARGETS += $(JMOD_TARGETS)
 324 
 325 ################################################################################
 326 # Images targets
 327 
 328 store-source-revision:
 329         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk store-source-revision)
 330 
 331 create-source-revision-tracker:
 332         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk create-source-revision-tracker)
 333 
 334 BOOTCYCLE_TARGET := product-images
 335 bootcycle-images:
 336         ifneq ($(COMPILE_TYPE), cross)
 337           $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image)
 338           $(call MakeDir, $(OUTPUTDIR)/bootcycle-build)
 339           +$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
 340               JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
 341         else
 342           $(call LogWarn, Boot cycle build disabled when cross compiling)
 343         endif
 344 
 345 zip-security:
 346         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
 347 
 348 zip-source:
 349         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
 350 
 351 jrtfs-jar:
 352         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
 353 
 354 jdk-image:
 355         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jdk)
 356 
 357 legacy-jre-image:
 358         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jre)
 359 
 360 symbols-image:


 417 update-build-docs:
 418         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk)
 419 
 420 update-x11wrappers:
 421         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateX11Wrappers.gmk)
 422 
 423 ALL_TARGETS += docs-jdk-api-javadoc docs-jdk-api-modulegraph \
 424     docs-javase-api-javadoc docs-javase-api-modulegraph \
 425     docs-reference-api-javadoc docs-reference-api-modulegraph docs-jdk-specs \
 426     docs-jdk-index docs-zip update-build-docs update-x11wrappers
 427 
 428 ################################################################################
 429 # Cross compilation support
 430 
 431 ifeq ($(CREATING_BUILDJDK), true)
 432   # This target is only called by the recursive call below.
 433   create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \
 434       java.base-copy jdk.jdeps-launchers
 435 endif
 436 
 437 create-buildjdk-copy:
 438         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk)
 439 
 440 create-buildjdk-interim-image:
 441         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
 442             $@-helper \
 443             SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
 444             HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
 445             CREATING_BUILDJDK=true)



 446 
 447 ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image
 448 
 449 ################################################################################
 450 # The interim-image is a small jlinked image that is used to generate artifacts
 451 # at build time for use when linking the real images.
 452 
 453 INTERIM_JMOD_TARGETS := $(addsuffix -interim-jmod, $(INTERIM_IMAGE_MODULES))
 454 
 455 define DeclareInterimJmodRecipe
 456   $1-interim-jmod:
 457         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
 458             MODULE=$1 \
 459             JMODS_DIR=$(INTERIM_JMODS_DIR) \
 460             JMODS_SUPPORT_DIR=$(INTERIM_JMODS_DIR)/support \
 461             INTERIM_JMOD=true \
 462         )
 463 endef
 464 
 465 $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $(call DeclareInterimJmodRecipe,$m)))


 657 
 658   hotspot-ide-project: hotspot exploded-image
 659 
 660   generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
 661 
 662   # If not already set, set the JVM variant target so that the JVM will be built.
 663   JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
 664 
 665   # Building one JVM variant is enough to start building the other libs
 666   $(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
 667 
 668   $(LAUNCHER_TARGETS): java.base-libs
 669 
 670   ifeq ($(STATIC_BUILD), true)
 671     $(LAUNCHER_TARGETS): generate-exported-symbols
 672   endif
 673 
 674   # The demos are currently linking to libjvm and libjava, just like all other
 675   # jdk libs, even though they don't need to. To avoid warnings, make sure they
 676   # aren't built until after libjava and libjvm are available to link to.
 677   demos-jdk: java.base-libs exploded-image-optimize
 678   test-image-demos-jdk: demos-jdk
 679 
 680   # Declare dependency from <module>-java to <module>-gensrc
 681   $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
 682 
 683   # Declare dependencies between java modules
 684   $(foreach m, $(JAVA_MODULES), \
 685       $(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \
 686       $(call FindDepsForModule,$m)))))
 687 
 688   # Declare dependencies between <module>-rmic to <module>-java
 689   $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
 690 
 691   # Declare dependencies from <module>-lib to <module>-java
 692   # Skip modules that do not have java source.
 693   # When creating a BUILDJDK, the java compilation has already been done by the
 694   # normal build and copied in.
 695   ifneq ($(CREATING_BUILDJDK), true)
 696     $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
 697   endif
 698 
 699   # Declare dependencies from all other <module>-lib to java.base-lib
 700   $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
 701       $(eval $t: java.base-libs))
 702 
 703   # jdk.accessibility depends on java.desktop
 704   jdk.accessibility-libs: java.desktop-libs
 705 
 706   # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
 707   # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
 708   # virtual target.
 709   jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
 710 
 711   # The swing beans need to have java base properly generated to avoid errors
 712   # in javadoc. The X11 wrappers need the java.base include files to have been
 713   # copied and processed.
 714   java.desktop-gensrc-src: java.base-gensrc java.base-copy
 715 
 716   # The annotation processing for jdk.internal.vm.compiler
 717   # and jdk.internal.vm.compiler.management needs classes from the current JDK.
 718   jdk.internal.vm.compiler-gensrc-src: $(addsuffix -java, \
 719       $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler))
 720   jdk.internal.vm.compiler.management-gensrc-src: $(addsuffix -java, \
 721       $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler.management))
 722 
 723   # For these modules, the gensrc step is generating a module-info.java.extra
 724   # file to be processed by the gensrc-moduleinfo target.
 725   jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src
 726   jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src
 727 
 728   jdk.jdeps-gendata: java rmic
 729 
 730   # The ct.sym generation uses all the moduleinfos as input
 731   jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS)
 732 
 733   # Declare dependencies between jmod targets.
 734   # java.base jmod needs jrt-fs.jar and access to the other jmods to be built.
 735   # When creating a BUILDJDK, we don't need to add hashes to java.base, thus
 736   # we don't need to depend on all other jmods
 737   ifneq ($(CREATING_BUILDJDK), true)
 738     java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
 739   endif
 740 
 741   # If not already set, set the JVM target so that the JVM will be built.
 742   JVM_MAIN_TARGETS ?= hotspot
 743 
 744   # Building java.base-jmod requires all of VM (ie hotspot) to be built.
 745   java.base-jmod: $(JVM_MAIN_TARGETS)
 746 
 747   # Declare dependencies from <module>-jmod to all other module targets
 748   # When creating a BUILDJDK, the java compilation has already been done by the
 749   # normal build and copied in.
 750   ifneq ($(CREATING_BUILDJDK), true)
 751     $(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java))
 752   endif
 753   $(foreach m, $(GENDATA_MODULES), $(eval $m_JMOD_DEPS += $m-gendata))
 754   $(foreach m, $(RMIC_MODULES), $(eval $m_JMOD_DEPS += $m-rmic))
 755   $(foreach m, $(LIBS_MODULES), $(eval $m_JMOD_DEPS += $m-libs))
 756   $(foreach m, $(LAUNCHER_MODULES), $(eval $m_JMOD_DEPS += $m-launchers))
 757   $(foreach m, $(COPY_MODULES), $(eval $m_JMOD_DEPS += $m-copy))
 758   $(foreach m, $(ALL_MODULES), $(eval $m-jmod: $($(m)_JMOD_DEPS)))
 759   $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $m-interim-jmod: $($(m)_JMOD_DEPS)))
 760 
 761   # Setup the minimal set of generated native source dependencies for hotspot
 762   $(foreach v, $(JVM_VARIANTS), \
 763     $(eval hotspot-$v-libs-compile-commands: hotspot-$v-gensrc) \
 764     $(foreach m, $(filter java.desktop jdk.hotspot.agent, $(GENSRC_MODULES)), \
 765       $(eval hotspot-$v-libs-compile-commands: $m-gensrc)) \
 766   )
 767 
 768   # For the full JDK compile commands, create all possible generated sources
 769   $(foreach m, $(GENSRC_MODULES), $(eval $m-libs-compile-commands: $m-gensrc))
 770   $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs-compile-commands: $m-java))
 771 
 772   $(COMPILE_COMMANDS_TARGETS_HOTSPOT): clean-compile-commands
 773   $(COMPILE_COMMANDS_TARGETS_JDK): clean-compile-commands
 774   compile-commands-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT)
 775   compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
 776 





 777   # Jmods cannot be created until we have the jmod tool ready to run. During
 778   # a normal build we run it from the exploded image, but when cross compiling
 779   # it's run from the buildjdk, which is either created at build time or user
 780   # supplied.
 781   #
 782   # For the exploded image to be runnable, all java modules and
 783   # jdk.jlink-launchers need to be built. We also need to copy jvm.cfg (done
 784   # in java.base-copy) and tzdb.dat (done in java.base-gendata) to the
 785   # appropriate location otherwise jimage, jlink and jmod won't start. This
 786   # also applies when creating the buildjdk.
 787   DEFAULT_JMOD_DEPS += java.base-libs java.base-copy java.base-gendata \
 788       jdk.jlink-launchers
 789   # When cross compiling and buildjdk is to be created, depend on creating the
 790   # buildjdk instead of the default dependencies.
 791   ifeq ($(CREATE_BUILDJDK), true)
 792     # Avoid calling create-buildjdk from within a create-buildjdk call.
 793     ifneq ($(CREATING_BUILDJDK), true)


 794       $(JMOD_TARGETS): create-buildjdk
 795       buildtools-modules: create-buildjdk
 796     else
 797       # While actually creating the buildjdk, the default deps applies.
 798       $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS)








 799     endif
 800   else
 801     # The normal non cross compilation case uses the default deps.
 802     # To avoid races with the optimize target, that also needs to happen first.
 803     $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS) \
 804         exploded-image-optimize
 805   endif
 806 
 807   # All modules include the main license files from java.base.
 808   $(JMOD_TARGETS): java.base-copy
 809 
 810   zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
 811       $(filter jdk.crypto%, $(JAVA_TARGETS))
 812 
 813   zip-source: gensrc rmic
 814 
 815   jrtfs-jar: interim-langtools
 816 
 817   build-microbenchmark: interim-langtools exploded-image
 818 
 819   ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
 820     ifeq ($(CREATE_BUILDJDK), true)
 821       # If creating a buildjdk, the interim image needs to be based on that.
 822       generate-link-opt-data: create-buildjdk
 823     else ifeq ($(EXTERNAL_BUILDJDK), false)
 824       # If an external buildjdk has been provided, we skip generating an


 872   docs-jdk-specs: buildtools-jdk $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
 873       docs-jdk-index
 874 
 875   docs-zip: docs-jdk
 876 
 877   # Tests
 878   test: jdk-image test-image
 879 
 880   exploded-test: exploded-image test-image
 881 
 882   jcov-test: jcov-image test-image
 883 
 884   test-make: clean-test-make compile-commands
 885 
 886   test-make-compile-commands: compile-commands
 887 
 888   # Declare dependency for all generated test targets
 889   $(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
 890   $(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
 891 
 892   create-buildjdk-copy: jdk.jlink-java java.base-gendata \
 893       $(addsuffix -java, $(INTERIM_IMAGE_MODULES))
 894 
 895   create-buildjdk-interim-image: create-buildjdk-copy
 896 
 897   interim-image: $(INTERIM_JMOD_TARGETS)
 898 
 899   build-test-lib: exploded-image-optimize
 900 
 901   build-test-failure-handler: interim-langtools
 902 
 903   test-image-failure-handler: build-test-failure-handler
 904 
 905   build-test-hotspot-jtreg-native: buildtools-jdk \
 906       hotspot-$(JVM_VARIANT_MAIN)-libs
 907 
 908   build-test-jdk-jtreg-native: buildtools-jdk java.base-libs
 909 
 910   build-test-hotspot-jtreg-graal: exploded-image-optimize
 911 
 912   test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
 913 
 914   test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
 915 
 916   test-image-hotspot-jtreg-graal: build-test-hotspot-jtreg-graal
 917 
 918   test-image-hotspot-gtest: hotspot
 919 
 920   install: product-images
 921 
 922   product-bundles: product-images
 923 
 924   legacy-bundles: legacy-images
 925 
 926   test-bundles: test-image
 927 
 928   docs-bundles: docs-image
 929 
 930   jcov-bundles: jcov-image


 982 $(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
 983 $(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
 984 $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
 985 $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
 986 $(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
 987 
 988 # Building java.base includes building all of hotspot.
 989 java.base: $(JVM_MAIN_TARGETS)
 990 
 991 demos: demos-jdk
 992 
 993 # The "exploded image" is a locally runnable JDK in $(OUTPUTDIR)/jdk.
 994 exploded-image-base: $(ALL_MODULES)
 995 exploded-image: exploded-image-base release-file
 996 # When cross compiling, no need to optimize the exploded image since it won't
 997 # be runnable on the host platform anyway.
 998 ifneq ($(COMPILE_TYPE), cross)
 999   exploded-image: exploded-image-optimize
1000 endif
1001 
1002 create-buildjdk: create-buildjdk-copy create-buildjdk-interim-image
1003 
1004 docs-jdk-api: docs-jdk-api-javadoc
1005 docs-javase-api: docs-javase-api-javadoc
1006 docs-reference-api: docs-reference-api-javadoc
1007 
1008 # If we're building full docs, we must also generate the module graphs to
1009 # get non-broken api documentation.
1010 ifeq ($(ENABLE_FULL_DOCS), true)
1011   docs-jdk-api: docs-jdk-api-modulegraph
1012   docs-javase-api: docs-javase-api-modulegraph
1013   docs-reference-api: docs-reference-api-modulegraph
1014 endif
1015 
1016 docs-jdk: docs-jdk-api docs-jdk-specs docs-jdk-index
1017 docs-javase: docs-javase-api
1018 docs-reference: docs-reference-api
1019 
1020 # alias for backwards compatibility
1021 docs-javadoc: docs-jdk-api
1022 


< prev index next >