< prev index next >

make/Main.gmk

Print this page

        

*** 1,7 **** # ! # Copyright (c) 2011, 2019, 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 --- 1,7 ---- # ! # 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,93 **** ################################################################################ ################################################################################ # Interim/build tools targets, compiling tools used during the build ! buildtools-langtools: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ToolsLangtools.gmk) ! interim-langtools: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk) ! interim-rmic: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk) ! interim-cldrconverter: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk) ! buildtools-jdk: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsJdk.gmk) ! buildtools-modules: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileModuleTools.gmk) ! buildtools-hotspot: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk) ALL_TARGETS += buildtools-langtools interim-langtools \ interim-rmic interim-cldrconverter buildtools-jdk buildtools-modules \ buildtools-hotspot --- 64,97 ---- ################################################################################ ################################################################################ # Interim/build tools targets, compiling tools used during the build ! # 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: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk) ! interim-rmic: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk) ! interim-cldrconverter: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk) ! buildtools-jdk: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsJdk.gmk) ! buildtools-modules: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileModuleTools.gmk) ! 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,142 **** 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))) ! define DeclareModuleInfoRecipe ! $1-gensrc-moduleinfo: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \ -f GensrcModuleInfo.gmk MODULE=$1) ! $1-gensrc: $1-gensrc-moduleinfo ! endef ! $(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m))) ALL_TARGETS += $(GENSRC_TARGETS) ################################################################################ # Generate data targets --- 104,150 ---- ALL_TARGETS += generate-exported-symbols ################################################################################ # Gensrc targets, generating source before java compilation can be done # ! # 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: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \ -f GensrcModuleInfo.gmk MODULE=$1) ! $1-gensrc: $1-gensrc-moduleinfo ! endef ! $(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m))) ! endif ALL_TARGETS += $(GENSRC_TARGETS) ################################################################################ # Generate data targets
*** 278,308 **** 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) --- 286,295 ----
*** 346,358 **** 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 else $(call LogWarn, Boot cycle build disabled when cross compiling) endif zip-security: --- 333,344 ---- 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) +$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \ ! JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main else $(call LogWarn, Boot cycle build disabled when cross compiling) endif zip-security:
*** 383,401 **** +($(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 ################################################################################ # Docs targets # If building full docs, to complete docs-*-api we need both the javadoc and --- 369,382 ---- +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ReleaseFile.gmk) exploded-image-optimize: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk) 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 ################################################################################ # Docs targets # If building full docs, to complete docs-*-api we need both the javadoc and
*** 445,466 **** # 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-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)" \ ! ) ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image ################################################################################ # The interim-image is a small jlinked image that is used to generate artifacts --- 426,444 ---- # 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 ! 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) ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image ################################################################################ # The interim-image is a small jlinked image that is used to generate artifacts
*** 471,481 **** 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 \ INTERIM_JMOD=true \ ) endef $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $(call DeclareInterimJmodRecipe,$m))) --- 449,459 ---- define DeclareInterimJmodRecipe $1-interim-jmod: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \ MODULE=$1 \ JMODS_DIR=$(INTERIM_JMODS_DIR) \ ! JMODS_TEMPDIR=$(INTERIM_JMODS_DIR)/temp \ INTERIM_JMOD=true \ ) endef $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $(call DeclareInterimJmodRecipe,$m)))
*** 494,509 **** # Generate test names for all JTReg test groups # define DeclareRunTestRecipe test-$1: ! +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \ ! TEST="$1") exploded-test-$1: ! +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \ 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)) --- 472,487 ---- # Generate test names for all JTReg test groups # define DeclareRunTestRecipe 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 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,620 **** ################################################################################ # Run tests test: ! +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \ ! TEST="$(TEST)") exploded-test: ! +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \ 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 ################################################################################ # 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 ################################################################################ # Install targets install: --- 555,585 ---- ################################################################################ # Run tests 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 run-test \ TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR)) ! ALL_TARGETS += test exploded-test ################################################################################ # Bundles product-bundles: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-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) ! ALL_TARGETS += product-bundles test-bundles docs-bundles ################################################################################ # Install targets install:
*** 665,675 **** $(JAVA_TARGETS): interim-langtools # Declare dependencies between hotspot-<variant>* targets $(foreach v, $(JVM_VARIANTS), \ ! $(eval hotspot-$v-gensrc: java.base-copy) \ $(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \ ) hotspot-ide-project: hotspot exploded-image --- 630,640 ---- $(JAVA_TARGETS): interim-langtools # Declare dependencies between hotspot-<variant>* targets $(foreach v, $(JVM_VARIANTS), \ ! $(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,698 **** 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 test-image-demos-jdk: demos-jdk # Declare dependency from <module>-java to <module>-gensrc $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc)) --- 653,663 ---- 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-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,714 **** # 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)) # 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)) --- 669,683 ---- # 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. ! # 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,752 **** # 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 # 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 --- 711,721 ---- # 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 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,765 **** # 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)) $(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)) --- 724,738 ---- # 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 ! # 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,820 **** # 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. ifeq ($(CREATE_BUILDJDK), true) 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 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 endif # All modules include the main license files from java.base. $(JMOD_TARGETS): java.base-copy --- 748,788 ---- # 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-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK) # 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) $(JMOD_TARGETS): create-buildjdk buildtools-modules: create-buildjdk else ! # 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 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,863 **** 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 --- 818,827 ----
*** 878,921 **** # 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-index 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)) interim-image: $(INTERIM_JMOD_TARGETS) ! build-test-lib: exploded-image 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 test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native test-image-jdk-jtreg-native: build-test-jdk-jtreg-native --- 842,890 ---- # 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: $(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 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-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-optimize test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
*** 925,942 **** 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 --- 894,907 ----
*** 947,960 **** # 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) \ --- 912,921 ----
*** 1003,1013 **** # be runnable on the host platform anyway. ifneq ($(COMPILE_TYPE), cross) exploded-image: exploded-image-optimize endif ! create-buildjdk: 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 --- 964,974 ---- # be runnable on the host platform anyway. ifneq ($(COMPILE_TYPE), cross) exploded-image: exploded-image-optimize endif ! 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,1045 **** # 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: --- 994,1003 ----
*** 1050,1063 **** ifeq ($(EXTERNAL_BUILDJDK), false) product-images: generate-summary endif endif ! ifeq ($(call isTargetOs, macosx), true) product-images: mac-jdk-bundle - - legacy-images: mac-legacy-jre-bundle endif # This target builds the documentation image docs-image: docs-jdk --- 1008,1019 ---- ifeq ($(EXTERNAL_BUILDJDK), false) product-images: generate-summary endif endif ! ifeq ($(OPENJDK_TARGET_OS), macosx) product-images: mac-jdk-bundle endif # This target builds the documentation image docs-image: docs-jdk
*** 1088,1098 **** 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-image test-image all-images \ all-bundles ################################################################################ --- 1044,1054 ---- 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 \ docs-image test-image all-images \ all-bundles ################################################################################
*** 1138,1149 **** ################################################################################ # 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 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)) --- 1094,1104 ---- ################################################################################ # 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 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,1172 **** $(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-%, %, $@)) --- 1115,1124 ----
*** 1189,1201 **** # 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 \ --- 1141,1150 ----
*** 1208,1220 **** && $(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) ################################################################################ # Declare *-only targets for each normal target $(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t))) --- 1157,1169 ---- && $(RM) -r $(OUTPUTDIR)) \ fi \ ) $(ECHO) Cleaned everything, you will have to re-run configure. ! 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 >