2012-10-26 21:29:57 +00:00
|
|
|
#
|
2023-04-21 13:31:45 +00:00
|
|
|
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
2012-10-26 21:29:57 +00:00
|
|
|
# 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
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
# This is the main makefile containing most actual top level targets. It needs
|
|
|
|
# to be called with a SPEC file defined.
|
2015-03-26 15:17:30 +00:00
|
|
|
################################################################################
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
# Declare default target
|
|
|
|
default:
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2015-03-26 15:17:30 +00:00
|
|
|
ifeq ($(wildcard $(SPEC)),)
|
|
|
|
$(error Main.gmk needs SPEC set to a proper spec.gmk)
|
|
|
|
endif
|
|
|
|
|
2012-10-26 21:29:57 +00:00
|
|
|
# Now load the spec
|
|
|
|
include $(SPEC)
|
|
|
|
|
2013-10-10 12:58:19 +00:00
|
|
|
# Load the vital tools for all the makefiles.
|
2017-09-12 17:03:56 +00:00
|
|
|
include $(TOPDIR)/make/common/MakeBase.gmk
|
|
|
|
include $(TOPDIR)/make/common/Modules.gmk
|
|
|
|
include $(TOPDIR)/make/common/FindTests.gmk
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
include $(TOPDIR)/make/MainSupport.gmk
|
|
|
|
|
|
|
|
# Are we requested to ignore dependencies?
|
|
|
|
ifneq ($(findstring -only, $(MAKECMDGOALS)), )
|
|
|
|
DEPS := none
|
|
|
|
endif
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
|
2014-11-27 14:41:56 +00:00
|
|
|
# valid top level targets. It's used to declare them all as PHONY and to
|
2014-08-17 14:51:37 +00:00
|
|
|
# generate the -only targets.
|
|
|
|
ALL_TARGETS :=
|
|
|
|
|
2014-02-12 23:00:20 +00:00
|
|
|
# Hook to include the corresponding custom file, if present.
|
2017-10-05 10:41:06 +00:00
|
|
|
$(eval $(call IncludeCustomExtension, Main.gmk))
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
# All modules for the current target platform.
|
2015-11-24 11:18:24 +00:00
|
|
|
ALL_MODULES := $(call FindAllModules)
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# Recipes for all targets. Only recipes, dependencies are declared later.
|
|
|
|
#
|
|
|
|
################################################################################
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
# Interim/build tools targets, compiling tools used during the build
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, buildtools-langtools, \
|
|
|
|
MAKEFILE := ToolsLangtools, \
|
|
|
|
))
|
2019-07-26 15:56:28 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, interim-langtools, \
|
|
|
|
MAKEFILE := CompileInterimLangtools, \
|
|
|
|
))
|
2015-08-04 04:49:23 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, interim-tzdb, \
|
|
|
|
MAKEFILE := CopyInterimTZDB, \
|
|
|
|
))
|
2016-10-04 11:34:34 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, buildtools-jdk, \
|
|
|
|
MAKEFILE := CompileToolsJdk, \
|
|
|
|
DEPS := interim-langtools interim-tzdb, \
|
|
|
|
))
|
2016-12-11 20:09:13 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, buildtools-modules, \
|
|
|
|
MAKEFILE := CompileModuleTools, \
|
|
|
|
))
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, buildtools-hotspot, \
|
|
|
|
MAKEFILE := CompileToolsHotspot, \
|
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Special targets for certain modules
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, generate-exported-symbols, \
|
|
|
|
MAKEFILE := BuildStatic, \
|
|
|
|
DEPS := java.base-libs jdk.jdwp.agent-libs, \
|
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Gensrc targets, generating source before java compilation can be done
|
2016-06-09 08:40:19 +00:00
|
|
|
#
|
2019-06-07 16:16:11 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, GENSRC, \
|
|
|
|
TARGET_SUFFIX := gensrc-src, \
|
|
|
|
FILE_PREFIX := 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:
|
2017-09-12 17:03:56 +00:00
|
|
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
|
2020-04-29 06:55:01 +00:00
|
|
|
-f common/modules/GensrcModuleInfo.gmk MODULE=$1)
|
2016-03-17 19:03:53 +00:00
|
|
|
|
2019-06-07 16:16:11 +00:00
|
|
|
$1-gensrc: $1-gensrc-moduleinfo
|
|
|
|
endef
|
2016-03-17 19:03:53 +00:00
|
|
|
|
2019-06-07 16:16:11 +00:00
|
|
|
$(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m)))
|
2016-03-17 19:03:53 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
ALL_TARGETS += $(GENSRC_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Generate data targets
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, GENDATA, \
|
|
|
|
TARGET_SUFFIX := gendata, \
|
|
|
|
FILE_PREFIX := Gendata, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
2020-05-19 13:59:51 +00:00
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
ALL_TARGETS += $(GENDATA_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Copy files targets
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, COPY, \
|
|
|
|
TARGET_SUFFIX := copy, \
|
|
|
|
FILE_PREFIX := Copy, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
2017-09-12 17:03:56 +00:00
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
ALL_COPY_MODULES += $(COPY_MODULES)
|
|
|
|
ALL_COPY_TARGETS += $(COPY_TARGETS)
|
|
|
|
|
|
|
|
IMPORT_COPY_MODULES := $(call FindImportedModules)
|
|
|
|
IMPORT_COPY_TARGETS := $(addsuffix -copy, $(IMPORT_COPY_MODULES))
|
|
|
|
ALL_COPY_MODULES += $(IMPORT_COPY_MODULES)
|
|
|
|
ALL_COPY_TARGETS += $(IMPORT_COPY_TARGETS)
|
|
|
|
|
|
|
|
define DeclareImportCopyRecipe
|
|
|
|
$1-copy:
|
2017-09-12 17:03:56 +00:00
|
|
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
|
2016-03-17 19:03:53 +00:00
|
|
|
-f CopyImportModules.gmk MODULE=$1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach m, $(IMPORT_COPY_MODULES), $(eval $(call DeclareImportCopyRecipe,$m)))
|
|
|
|
|
|
|
|
ALL_TARGETS += $(ALL_COPY_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
2018-05-30 17:23:45 +00:00
|
|
|
# Targets for compiling all java modules.
|
2016-03-17 19:03:53 +00:00
|
|
|
JAVA_MODULES := $(ALL_MODULES)
|
2014-08-17 14:51:37 +00:00
|
|
|
JAVA_TARGETS := $(addsuffix -java, $(JAVA_MODULES))
|
|
|
|
|
|
|
|
define DeclareCompileJavaRecipe
|
|
|
|
$1-java:
|
2017-09-12 17:03:56 +00:00
|
|
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
|
2021-02-22 17:16:29 +00:00
|
|
|
$(patsubst %,-I%/modules/$1,$(PHASE_MAKEDIRS)) \
|
2015-11-24 14:46:04 +00:00
|
|
|
-f CompileJavaModules.gmk MODULE=$1)
|
2014-08-17 14:51:37 +00:00
|
|
|
endef
|
|
|
|
|
2018-05-30 17:23:45 +00:00
|
|
|
$(foreach m, $(JAVA_MODULES), $(eval $(call DeclareCompileJavaRecipe,$m)))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
ALL_TARGETS += $(JAVA_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Targets for compiling native libraries
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, LIBS, \
|
|
|
|
TARGET_SUFFIX := libs, \
|
|
|
|
FILE_PREFIX := Lib, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
2020-05-19 13:59:51 +00:00
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
ALL_TARGETS += $(LIBS_TARGETS)
|
2013-02-04 09:53:38 +00:00
|
|
|
|
2019-10-29 19:01:14 +00:00
|
|
|
################################################################################
|
|
|
|
# Targets for compiling static versions of certain native libraries. These do
|
|
|
|
# not end up in the jmods or the normal JDK image, but are instead bundled into
|
|
|
|
# a special deliverable.
|
|
|
|
$(eval $(call DeclareRecipesForPhase, STATIC_LIBS, \
|
|
|
|
TARGET_SUFFIX := static-libs, \
|
|
|
|
FILE_PREFIX := Lib, \
|
2020-05-29 19:18:23 +00:00
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
2019-10-29 19:01:14 +00:00
|
|
|
EXTRA_ARGS := STATIC_LIBS=true, \
|
|
|
|
))
|
|
|
|
|
|
|
|
ALL_TARGETS += $(STATIC_LIBS_TARGETS)
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
# Targets for compiling native executables
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, LAUNCHER, \
|
|
|
|
TARGET_SUFFIX := launchers, \
|
|
|
|
FILE_PREFIX := Launcher, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
2020-05-19 13:59:51 +00:00
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
ALL_TARGETS += $(LAUNCHER_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Build hotspot target
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2016-11-24 14:27:33 +00:00
|
|
|
HOTSPOT_VARIANT_TARGETS := $(addprefix hotspot-, $(JVM_VARIANTS))
|
|
|
|
HOTSPOT_VARIANT_GENSRC_TARGETS := $(addsuffix -gensrc, $(HOTSPOT_VARIANT_TARGETS))
|
|
|
|
HOTSPOT_VARIANT_LIBS_TARGETS := $(addsuffix -libs, $(HOTSPOT_VARIANT_TARGETS))
|
2023-06-12 16:22:24 +00:00
|
|
|
HOTSPOT_VARIANT_STATIC_LIBS_TARGETS := $(addsuffix -static-libs, $(HOTSPOT_VARIANT_TARGETS))
|
2016-11-24 14:27:33 +00:00
|
|
|
|
|
|
|
define DeclareHotspotGensrcRecipe
|
|
|
|
hotspot-$1-gensrc:
|
|
|
|
$$(call LogInfo, Building JVM variant '$1' with features '$(JVM_FEATURES_$1)')
|
2017-09-12 17:03:56 +00:00
|
|
|
+($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f gensrc/GenerateSources.gmk \
|
2016-11-24 14:27:33 +00:00
|
|
|
JVM_VARIANT=$1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotGensrcRecipe,$v)))
|
|
|
|
|
|
|
|
define DeclareHotspotLibsRecipe
|
|
|
|
hotspot-$1-libs:
|
2017-09-12 17:03:56 +00:00
|
|
|
+($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f lib/CompileLibraries.gmk \
|
2016-11-24 14:27:33 +00:00
|
|
|
JVM_VARIANT=$1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotLibsRecipe,$v)))
|
|
|
|
|
2023-06-12 16:22:24 +00:00
|
|
|
define DeclareHotspotStaticLibsRecipe
|
|
|
|
hotspot-$1-static-libs:
|
|
|
|
+($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f lib/CompileLibraries.gmk \
|
|
|
|
JVM_VARIANT=$1 STATIC_LIBS=true)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotStaticLibsRecipe,$v)))
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, hotspot-ide-project, \
|
2020-05-19 13:49:46 +00:00
|
|
|
MAKEFILE := ide/visualstudio/hotspot/CreateVSProject, \
|
2020-05-12 14:35:58 +00:00
|
|
|
DEPS := hotspot exploded-image, \
|
2020-05-15 16:58:17 +00:00
|
|
|
ARGS := -I$(TOPDIR)/make/hotspot, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2016-04-08 11:14:23 +00:00
|
|
|
|
2023-03-14 17:32:25 +00:00
|
|
|
$(eval $(call SetupTarget, eclipse-java-env, \
|
|
|
|
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
|
|
|
ARGS := --always-make WORKSPACE=java SHARED=false, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, eclipse-hotspot-env, \
|
|
|
|
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
|
|
|
ARGS := --always-make WORKSPACE=hotspot SHARED=false, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, eclipse-native-env, \
|
|
|
|
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
|
|
|
ARGS := --always-make WORKSPACE=native SHARED=false, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, eclipse-mixed-env, \
|
|
|
|
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
|
|
|
ARGS := --always-make SHARED=false, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, eclipse-shared-java-env, \
|
|
|
|
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
|
|
|
ARGS := --always-make WORKSPACE=java SHARED=true, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, eclipse-shared-hotspot-env, \
|
|
|
|
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
|
|
|
ARGS := --always-make WORKSPACE=hotspot SHARED=true, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, eclipse-shared-native-env, \
|
|
|
|
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
|
|
|
ARGS := --always-make WORKSPACE=native SHARED=true, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, eclipse-shared-mixed-env, \
|
|
|
|
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
|
|
|
ARGS := --always-make SHARED=true, \
|
|
|
|
))
|
|
|
|
|
2016-11-24 14:27:33 +00:00
|
|
|
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
|
2023-06-12 16:22:24 +00:00
|
|
|
$(HOTSPOT_VARIANT_LIBS_TARGETS) $(HOTSPOT_VARIANT_STATIC_LIBS_TARGETS)
|
2013-01-21 06:50:40 +00:00
|
|
|
|
2022-03-31 13:30:16 +00:00
|
|
|
################################################################################
|
|
|
|
# Help and user support
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, doctor, \
|
|
|
|
MAKEFILE := Doctor, \
|
|
|
|
))
|
|
|
|
|
2018-10-05 05:54:28 +00:00
|
|
|
################################################################################
|
|
|
|
# Generate libs and launcher targets for creating compile_commands.json fragments
|
|
|
|
define DeclareCompileCommandsRecipe
|
|
|
|
$1-compile-commands:
|
|
|
|
$$(call LogInfo, Generating compile_commands.json fragments for $1)
|
|
|
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk $1-only \
|
|
|
|
GENERATE_COMPILE_COMMANDS_ONLY=true)
|
|
|
|
|
|
|
|
COMPILE_COMMANDS_TARGETS_$2 += $1-compile-commands
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach t, $(HOTSPOT_VARIANT_LIBS_TARGETS), \
|
|
|
|
$(eval $(call DeclareCompileCommandsRecipe,$t,HOTSPOT)) \
|
|
|
|
)
|
|
|
|
|
|
|
|
$(foreach t, $(LIBS_TARGETS) $(LAUNCHER_TARGETS), \
|
|
|
|
$(eval $(call DeclareCompileCommandsRecipe,$t,JDK)) \
|
|
|
|
)
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, compile-commands, \
|
|
|
|
MAKEFILE := CompileCommands, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, compile-commands-hotspot, \
|
|
|
|
MAKEFILE := CompileCommands, \
|
|
|
|
))
|
2018-10-05 05:54:28 +00:00
|
|
|
|
|
|
|
ALL_TARGETS += $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
|
|
|
|
|
2019-06-03 08:28:03 +00:00
|
|
|
################################################################################
|
|
|
|
# VS Code projects
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, vscode-project, \
|
2020-05-19 13:49:46 +00:00
|
|
|
MAKEFILE := ide/vscode/hotspot/CreateVSCodeProject, \
|
2020-05-12 14:35:58 +00:00
|
|
|
ARGS := VSCODE_INDEXER=cpptools, \
|
|
|
|
DEPS := compile-commands, \
|
|
|
|
))
|
2019-06-03 08:28:03 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, vscode-project-clangd, \
|
2020-05-19 13:49:46 +00:00
|
|
|
MAKEFILE := ide/vscode/hotspot/CreateVSCodeProject, \
|
2020-05-12 14:35:58 +00:00
|
|
|
ARGS := VSCODE_INDEXER=clangd, \
|
|
|
|
DEPS := compile-commands, \
|
|
|
|
))
|
2019-06-03 08:28:03 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, vscode-project-rtags, \
|
2020-05-19 13:49:46 +00:00
|
|
|
MAKEFILE := ide/vscode/hotspot/CreateVSCodeProject, \
|
2020-05-12 14:35:58 +00:00
|
|
|
ARGS := VSCODE_INDEXER=rtags, \
|
|
|
|
DEPS := compile-commands, \
|
|
|
|
))
|
2019-06-03 08:28:03 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, vscode-project-ccls, \
|
2020-05-19 13:49:46 +00:00
|
|
|
MAKEFILE := ide/vscode/hotspot/CreateVSCodeProject, \
|
2020-05-12 14:35:58 +00:00
|
|
|
ARGS := VSCODE_INDEXER=ccls, \
|
|
|
|
DEPS := compile-commands, \
|
|
|
|
))
|
2019-06-03 08:28:03 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
2017-04-18 02:23:42 +00:00
|
|
|
# Build demos targets
|
2013-01-21 06:50:40 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
# 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.
|
|
|
|
$(eval $(call SetupTarget, demos-jdk, \
|
|
|
|
MAKEFILE := CompileDemos, \
|
2021-12-02 21:31:13 +00:00
|
|
|
DEPS := java.base-libs exploded-image buildtools-jdk, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2017-05-10 16:27:31 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, test-image-demos-jdk, \
|
|
|
|
MAKEFILE := CompileDemos, \
|
|
|
|
TARGET := images, \
|
|
|
|
DEPS := demos-jdk, \
|
|
|
|
))
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
2016-03-17 19:03:53 +00:00
|
|
|
# Jigsaw specific data and analysis targets.
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, generate-summary, \
|
|
|
|
MAKEFILE := GenerateModuleSummary, \
|
2020-10-30 13:55:31 +00:00
|
|
|
DEPS := jmods buildtools-modules runnable-buildjdk, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2016-03-17 19:03:53 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Jmod targets
|
|
|
|
|
|
|
|
JMOD_MODULES := $(ALL_MODULES)
|
|
|
|
JMOD_TARGETS := $(addsuffix -jmod, $(JMOD_MODULES))
|
|
|
|
|
|
|
|
define DeclareJmodRecipe
|
|
|
|
$1-jmod:
|
2017-09-12 17:03:56 +00:00
|
|
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
|
2016-03-17 19:03:53 +00:00
|
|
|
MODULE=$1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach m, $(JMOD_MODULES), $(eval $(call DeclareJmodRecipe,$m)))
|
|
|
|
|
|
|
|
ALL_TARGETS += $(JMOD_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Images targets
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, store-source-revision, \
|
|
|
|
MAKEFILE := SourceRevision, \
|
|
|
|
TARGET := store-source-revision, \
|
|
|
|
))
|
2016-06-08 13:13:19 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, create-source-revision-tracker, \
|
|
|
|
MAKEFILE := SourceRevision, \
|
|
|
|
TARGET := create-source-revision-tracker, \
|
|
|
|
))
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2015-02-06 11:46:59 +00:00
|
|
|
BOOTCYCLE_TARGET := product-images
|
2014-12-03 14:20:21 +00:00
|
|
|
bootcycle-images:
|
2016-05-21 16:23:28 +00:00
|
|
|
ifneq ($(COMPILE_TYPE), cross)
|
|
|
|
$(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image)
|
2019-04-04 20:56:04 +00:00
|
|
|
$(call MakeDir, $(OUTPUTDIR)/bootcycle-build)
|
2017-09-12 17:03:56 +00:00
|
|
|
+$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
|
2019-06-07 16:16:11 +00:00
|
|
|
LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
|
2016-05-21 16:23:28 +00:00
|
|
|
else
|
|
|
|
$(call LogWarn, Boot cycle build disabled when cross compiling)
|
|
|
|
endif
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, zip-security, \
|
|
|
|
MAKEFILE := ZipSecurity, \
|
2021-12-02 21:31:13 +00:00
|
|
|
DEPS := buildtools-jdk java.base-java java.security.jgss-java java.security.jgss-libs, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, zip-source, \
|
|
|
|
MAKEFILE := ZipSource, \
|
2021-12-02 21:31:13 +00:00
|
|
|
DEPS := buildtools-jdk gensrc, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, jrtfs-jar, \
|
|
|
|
MAKEFILE := JrtfsJar, \
|
|
|
|
DEPS := interim-langtools, \
|
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, jdk-image, \
|
|
|
|
MAKEFILE := Images, \
|
|
|
|
TARGET := jdk, \
|
|
|
|
DEPS := jmods zip-source demos release-file, \
|
|
|
|
))
|
2016-10-05 08:49:21 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, legacy-jre-image, \
|
|
|
|
MAKEFILE := Images, \
|
|
|
|
TARGET := jre, \
|
|
|
|
DEPS := jmods release-file, \
|
|
|
|
))
|
2016-10-05 08:49:21 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, symbols-image, \
|
|
|
|
MAKEFILE := Images, \
|
|
|
|
TARGET := symbols, \
|
|
|
|
))
|
2014-12-03 14:20:21 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, static-libs-image, \
|
|
|
|
MAKEFILE := StaticLibsImage, \
|
2023-06-12 16:22:24 +00:00
|
|
|
TARGET := static-libs-image, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, static-libs-graal-image, \
|
|
|
|
MAKEFILE := StaticLibsImage, \
|
|
|
|
TARGET := static-libs-graal-image, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2019-10-29 19:01:14 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, mac-jdk-bundle, \
|
|
|
|
MAKEFILE := MacBundles, \
|
|
|
|
TARGET := jdk-bundle, \
|
|
|
|
DEPS := jdk-image, \
|
|
|
|
))
|
2018-06-06 20:16:12 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, mac-legacy-jre-bundle, \
|
|
|
|
MAKEFILE := MacBundles, \
|
|
|
|
TARGET := jre-bundle, \
|
|
|
|
DEPS := legacy-jre-image, \
|
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, release-file, \
|
|
|
|
MAKEFILE := ReleaseFile, \
|
|
|
|
DEPS := create-source-revision-tracker, \
|
|
|
|
))
|
2016-12-01 13:40:06 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, exploded-image-optimize, \
|
|
|
|
MAKEFILE := ExplodedImageOptimize, \
|
|
|
|
DEPS := java copy gendata java.base-libs java.base-launchers \
|
|
|
|
buildtools-modules, \
|
|
|
|
))
|
2016-10-04 11:34:34 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, graal-builder-image, \
|
|
|
|
MAKEFILE := GraalBuilderImage, \
|
2023-06-12 16:22:24 +00:00
|
|
|
DEPS := jdk-image static-libs-graal-image, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2019-12-16 10:06:01 +00:00
|
|
|
|
2018-11-29 14:34:46 +00:00
|
|
|
ifeq ($(JCOV_ENABLED), true)
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, jcov-image, \
|
|
|
|
MAKEFILE := Coverage, \
|
|
|
|
TARGET := jcov-image, \
|
|
|
|
DEPS := jdk-image, \
|
|
|
|
))
|
2018-11-29 14:34:46 +00:00
|
|
|
endif
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
ALL_TARGETS += bootcycle-images
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Docs targets
|
|
|
|
|
2017-04-19 08:44:40 +00:00
|
|
|
# If building full docs, to complete docs-*-api we need both the javadoc and
|
2022-11-03 14:51:24 +00:00
|
|
|
# graphs targets.
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, docs-jdk-api-javadoc, \
|
|
|
|
MAKEFILE := Docs, \
|
|
|
|
TARGET := docs-jdk-api-javadoc, \
|
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2022-11-03 14:51:24 +00:00
|
|
|
$(eval $(call SetupTarget, docs-jdk-api-graphs, \
|
2020-05-12 14:35:58 +00:00
|
|
|
MAKEFILE := Docs, \
|
2022-11-03 14:51:24 +00:00
|
|
|
TARGET := docs-jdk-api-graphs, \
|
2020-10-30 13:55:31 +00:00
|
|
|
DEPS := buildtools-modules runnable-buildjdk, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2017-04-19 08:44:40 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, docs-javase-api-javadoc, \
|
|
|
|
MAKEFILE := Docs, \
|
|
|
|
TARGET := docs-javase-api-javadoc, \
|
|
|
|
))
|
2017-04-19 08:24:42 +00:00
|
|
|
|
2022-11-03 14:51:24 +00:00
|
|
|
$(eval $(call SetupTarget, docs-javase-api-graphs, \
|
2020-05-12 14:35:58 +00:00
|
|
|
MAKEFILE := Docs, \
|
2022-11-03 14:51:24 +00:00
|
|
|
TARGET := docs-javase-api-graphs, \
|
2020-10-30 13:55:31 +00:00
|
|
|
DEPS := buildtools-modules runnable-buildjdk, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2017-10-23 08:21:13 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, docs-reference-api-javadoc, \
|
|
|
|
MAKEFILE := Docs, \
|
|
|
|
TARGET := docs-reference-api-javadoc, \
|
|
|
|
))
|
2017-10-23 08:21:13 +00:00
|
|
|
|
2022-11-03 14:51:24 +00:00
|
|
|
$(eval $(call SetupTarget, docs-reference-api-graphs, \
|
2020-05-12 14:35:58 +00:00
|
|
|
MAKEFILE := Docs, \
|
2022-11-03 14:51:24 +00:00
|
|
|
TARGET := docs-reference-api-graphs, \
|
2020-10-30 13:55:31 +00:00
|
|
|
DEPS := buildtools-modules runnable-buildjdk, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
# The gensrc steps for jdk.jdi create html spec files.
|
|
|
|
$(eval $(call SetupTarget, docs-jdk-specs, \
|
|
|
|
MAKEFILE := Docs, \
|
|
|
|
TARGET := docs-jdk-specs, \
|
|
|
|
DEPS := buildtools-jdk jdk.jdi-gensrc docs-jdk-index, \
|
|
|
|
))
|
2017-05-12 20:29:22 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, docs-jdk-index, \
|
|
|
|
MAKEFILE := Docs, \
|
|
|
|
TARGET := docs-jdk-index, \
|
|
|
|
))
|
2016-04-15 12:57:53 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, docs-zip, \
|
|
|
|
MAKEFILE := Docs, \
|
|
|
|
TARGET := docs-zip, \
|
2021-12-02 21:31:13 +00:00
|
|
|
DEPS := docs-jdk buildtools-jdk, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2019-06-20 20:03:10 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, docs-specs-zip, \
|
|
|
|
MAKEFILE := Docs, \
|
|
|
|
TARGET := docs-specs-zip, \
|
2021-12-02 21:31:13 +00:00
|
|
|
DEPS := docs-jdk-specs buildtools-jdk, \
|
2020-05-12 14:35:58 +00:00
|
|
|
))
|
2017-03-13 13:01:24 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, update-build-docs, \
|
|
|
|
MAKEFILE := UpdateBuildDocs, \
|
|
|
|
))
|
2018-03-05 23:59:49 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, update-x11wrappers, \
|
|
|
|
MAKEFILE := UpdateX11Wrappers, \
|
|
|
|
DEPS := java.base-copy buildtools-jdk, \
|
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2021-10-12 23:28:53 +00:00
|
|
|
ifneq ($(HSDIS_BACKEND), none)
|
|
|
|
$(eval $(call SetupTarget, build-hsdis, \
|
|
|
|
MAKEFILE := Hsdis, \
|
|
|
|
TARGET := build, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, install-hsdis, \
|
|
|
|
MAKEFILE := Hsdis, \
|
|
|
|
TARGET := install, \
|
2022-03-02 18:17:47 +00:00
|
|
|
DEPS := jdk-image, \
|
2021-10-12 23:28:53 +00:00
|
|
|
))
|
|
|
|
endif
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
################################################################################
|
|
|
|
# Cross compilation support
|
|
|
|
|
2016-05-06 23:21:08 +00:00
|
|
|
ifeq ($(CREATING_BUILDJDK), true)
|
2016-03-17 19:03:53 +00:00
|
|
|
# This target is only called by the recursive call below.
|
2016-05-06 23:21:08 +00:00
|
|
|
create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \
|
|
|
|
java.base-copy jdk.jdeps-launchers
|
2016-03-17 19:03:53 +00:00
|
|
|
endif
|
|
|
|
|
2019-06-07 16:16:11 +00:00
|
|
|
BUILDJDK_MODULES := $(sort $(foreach m, jdk.jlink $(INTERIM_IMAGE_MODULES), \
|
|
|
|
$(call FindTransitiveDepsForModule, $m) $m))
|
2016-03-17 19:03:53 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, create-buildjdk-interim-image, \
|
|
|
|
MAKEFILE := Main, \
|
|
|
|
TARGET := create-buildjdk-interim-image-helper, \
|
|
|
|
ARGS := SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
|
|
|
|
HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
|
|
|
|
CREATING_BUILDJDK=true \
|
|
|
|
LOG_PREFIX="[buildjdk] " \
|
|
|
|
JAVA_MODULES="$(BUILDJDK_MODULES)", \
|
|
|
|
))
|
2016-05-06 23:21:08 +00:00
|
|
|
|
|
|
|
################################################################################
|
2016-10-07 07:11:42 +00:00
|
|
|
# The interim-image is a small jlinked image that is used to generate artifacts
|
2016-05-06 23:21:08 +00:00
|
|
|
# at build time for use when linking the real images.
|
|
|
|
|
2016-11-07 12:25:18 +00:00
|
|
|
INTERIM_JMOD_TARGETS := $(addsuffix -interim-jmod, $(INTERIM_IMAGE_MODULES))
|
|
|
|
|
|
|
|
define DeclareInterimJmodRecipe
|
|
|
|
$1-interim-jmod:
|
2017-09-12 17:03:56 +00:00
|
|
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
|
2016-11-07 12:25:18 +00:00
|
|
|
MODULE=$1 \
|
|
|
|
JMODS_DIR=$(INTERIM_JMODS_DIR) \
|
2019-03-05 10:07:19 +00:00
|
|
|
JMODS_SUPPORT_DIR=$(INTERIM_JMODS_DIR)/support \
|
2016-11-07 12:25:18 +00:00
|
|
|
INTERIM_JMOD=true \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $(call DeclareInterimJmodRecipe,$m)))
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, interim-image, \
|
|
|
|
MAKEFILE := InterimImage, \
|
|
|
|
))
|
2016-05-06 23:21:08 +00:00
|
|
|
|
2016-05-25 10:53:26 +00:00
|
|
|
ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, generate-link-opt-data, \
|
|
|
|
MAKEFILE := GenerateLinkOptData, \
|
|
|
|
))
|
2016-05-25 10:53:26 +00:00
|
|
|
endif
|
2016-05-06 23:21:08 +00:00
|
|
|
|
2017-03-03 11:57:57 +00:00
|
|
|
################################################################################
|
|
|
|
# Generate test names for all JTReg test groups
|
|
|
|
#
|
|
|
|
|
|
|
|
define DeclareRunTestRecipe
|
2018-10-31 08:30:24 +00:00
|
|
|
test-$1:
|
2019-01-24 10:19:40 +00:00
|
|
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
|
|
|
|
TEST="$1")
|
2017-03-03 11:57:57 +00:00
|
|
|
|
2018-10-31 08:30:24 +00:00
|
|
|
exploded-test-$1:
|
2019-01-24 10:19:40 +00:00
|
|
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
|
2017-05-29 12:06:24 +00:00
|
|
|
TEST="$1" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
|
2017-03-03 11:57:57 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
# ALL_NAMED_TESTS is defined in FindTests.gmk
|
|
|
|
$(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t)))
|
2018-10-31 08:30:24 +00:00
|
|
|
ALL_TEST_TARGETS := $(addprefix test-, $(ALL_NAMED_TESTS))
|
2018-11-08 11:03:18 +00:00
|
|
|
|
|
|
|
# We only support the "exploded-test-gtest" shortcut
|
|
|
|
ALL_EXPLODED_TESTS := gtest
|
|
|
|
ALL_EXPLODED_TEST_TARGETS := $(addprefix exploded-test-, $(ALL_EXPLODED_TESTS))
|
2017-03-03 11:57:57 +00:00
|
|
|
|
2019-01-24 10:19:40 +00:00
|
|
|
ALL_TARGETS += $(ALL_TEST_TARGETS) $(ALL_EXPLODED_TEST_TARGETS)
|
2017-03-03 11:57:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
2018-11-16 22:39:51 +00:00
|
|
|
# Build tests and microbenchmarks
|
2015-02-27 10:56:57 +00:00
|
|
|
#
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, prepare-test-image, \
|
|
|
|
MAKEFILE := TestImage, \
|
|
|
|
TARGET := prepare-test-image, \
|
|
|
|
))
|
2015-02-27 10:56:57 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, build-test-hotspot-jtreg-native, \
|
|
|
|
MAKEFILE := test/JtregNativeHotspot, \
|
|
|
|
TARGET := build-test-hotspot-jtreg-native, \
|
|
|
|
DEPS := buildtools-jdk, \
|
|
|
|
))
|
2015-02-27 10:56:57 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, test-image-hotspot-jtreg-native, \
|
|
|
|
MAKEFILE := test/JtregNativeHotspot, \
|
|
|
|
TARGET := test-image-hotspot-jtreg-native, \
|
|
|
|
DEPS := build-test-hotspot-jtreg-native, \
|
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, build-test-jdk-jtreg-native, \
|
|
|
|
MAKEFILE := test/JtregNativeJdk, \
|
|
|
|
TARGET := build-test-jdk-jtreg-native, \
|
|
|
|
DEPS := buildtools-jdk java.base-libs, \
|
|
|
|
))
|
2015-02-27 10:56:57 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, test-image-jdk-jtreg-native, \
|
|
|
|
MAKEFILE := test/JtregNativeJdk, \
|
|
|
|
TARGET := test-image-jdk-jtreg-native, \
|
|
|
|
DEPS := build-test-jdk-jtreg-native, \
|
|
|
|
))
|
2015-02-27 10:56:57 +00:00
|
|
|
|
2020-07-02 15:35:03 +00:00
|
|
|
# Native files needed by the testlib
|
|
|
|
$(eval $(call SetupTarget, build-test-lib-native, \
|
|
|
|
MAKEFILE := test/BuildTestLibNative, \
|
|
|
|
TARGET := build-test-lib-native, \
|
|
|
|
DEPS := buildtools-jdk java.base-libs, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, test-image-lib-native, \
|
|
|
|
MAKEFILE := test/BuildTestLibNative, \
|
|
|
|
TARGET := test-image-lib-native, \
|
|
|
|
DEPS := build-test-lib-native, \
|
|
|
|
))
|
|
|
|
|
|
|
|
# Native files needed when testing the testlib itself
|
2020-06-16 16:50:45 +00:00
|
|
|
$(eval $(call SetupTarget, build-test-libtest-jtreg-native, \
|
|
|
|
MAKEFILE := test/JtregNativeLibTest, \
|
|
|
|
TARGET := build-test-libtest-jtreg-native, \
|
|
|
|
DEPS := buildtools-jdk, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, test-image-libtest-jtreg-native, \
|
|
|
|
MAKEFILE := test/JtregNativeLibTest, \
|
|
|
|
TARGET := test-image-libtest-jtreg-native, \
|
|
|
|
DEPS := build-test-libtest-jtreg-native, \
|
|
|
|
))
|
|
|
|
|
2020-07-28 16:05:06 +00:00
|
|
|
ifneq ($(GTEST_FRAMEWORK_SRC), )
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, test-image-hotspot-gtest, \
|
|
|
|
MAKEFILE := hotspot/test/GtestImage, \
|
|
|
|
DEPS := hotspot, \
|
|
|
|
))
|
2016-05-03 20:49:27 +00:00
|
|
|
endif
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, build-test-lib, \
|
|
|
|
MAKEFILE := test/BuildTestLib, \
|
|
|
|
DEPS := exploded-image, \
|
|
|
|
))
|
2015-09-16 07:49:36 +00:00
|
|
|
|
2016-04-15 16:07:34 +00:00
|
|
|
ifeq ($(BUILD_FAILURE_HANDLER), true)
|
|
|
|
# Builds the failure handler jtreg extension
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, build-test-failure-handler, \
|
|
|
|
MAKEFILE := test/BuildFailureHandler, \
|
|
|
|
TARGET := build, \
|
|
|
|
DEPS := interim-langtools, \
|
|
|
|
))
|
2016-04-14 13:13:42 +00:00
|
|
|
|
2016-04-15 16:07:34 +00:00
|
|
|
# Copies the failure handler jtreg extension into the test image
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, test-image-failure-handler, \
|
|
|
|
MAKEFILE := test/BuildFailureHandler, \
|
|
|
|
TARGET := images, \
|
|
|
|
DEPS := build-test-failure-handler, \
|
|
|
|
))
|
2016-04-15 16:07:34 +00:00
|
|
|
endif
|
2016-04-14 13:13:42 +00:00
|
|
|
|
2023-04-21 13:31:45 +00:00
|
|
|
ifeq ($(BUILD_JTREG_TEST_THREAD_FACTORY), true)
|
|
|
|
# Builds the test thread factory jtreg extension
|
|
|
|
$(eval $(call SetupTarget, build-test-test-thread-factory, \
|
|
|
|
MAKEFILE := test/BuildJtregTestThreadFactory, \
|
|
|
|
TARGET := build, \
|
|
|
|
DEPS := interim-langtools exploded-image, \
|
|
|
|
))
|
|
|
|
|
|
|
|
# Copies the jtreg test thread factory into the test image
|
|
|
|
$(eval $(call SetupTarget, test-image-test-thread-factory, \
|
|
|
|
MAKEFILE := test/BuildJtregTestThreadFactory, \
|
|
|
|
TARGET := images, \
|
|
|
|
DEPS := build-test-test-thread-factory, \
|
|
|
|
))
|
|
|
|
endif
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, build-microbenchmark, \
|
|
|
|
MAKEFILE := test/BuildMicrobenchmark, \
|
|
|
|
DEPS := interim-langtools exploded-image, \
|
|
|
|
))
|
2015-02-27 10:56:57 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Run tests
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, test, \
|
|
|
|
MAKEFILE := RunTests, \
|
|
|
|
ARGS := TEST="$(TEST)", \
|
|
|
|
DEPS := jdk-image test-image, \
|
|
|
|
))
|
2018-10-05 05:54:28 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, exploded-test, \
|
|
|
|
MAKEFILE := RunTests, \
|
|
|
|
ARGS := TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR), \
|
|
|
|
DEPS := exploded-image test-image, \
|
|
|
|
))
|
2019-01-14 16:22:49 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
ifeq ($(JCOV_ENABLED), true)
|
|
|
|
$(eval $(call SetupTarget, jcov-test, \
|
|
|
|
MAKEFILE := RunTests, \
|
|
|
|
ARGS := TEST="$(TEST)" TEST_OPTS_JCOV=true, \
|
|
|
|
DEPS := jcov-image test-image, \
|
|
|
|
))
|
|
|
|
endif
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2016-05-04 13:29:01 +00:00
|
|
|
################################################################################
|
|
|
|
# Bundles
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, product-bundles, \
|
|
|
|
MAKEFILE := Bundles, \
|
|
|
|
TARGET := product-bundles, \
|
|
|
|
DEPS := product-images, \
|
|
|
|
))
|
2016-05-04 13:29:01 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, legacy-bundles, \
|
|
|
|
MAKEFILE := Bundles, \
|
|
|
|
TARGET := legacy-bundles, \
|
|
|
|
DEPS := legacy-images, \
|
|
|
|
))
|
2019-03-30 20:29:37 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, test-bundles, \
|
|
|
|
MAKEFILE := Bundles, \
|
|
|
|
TARGET := test-bundles, \
|
|
|
|
DEPS := test-image, \
|
|
|
|
))
|
2016-05-04 13:29:01 +00:00
|
|
|
|
2020-10-21 22:04:37 +00:00
|
|
|
$(eval $(call SetupTarget, docs-jdk-bundles, \
|
2020-05-12 14:35:58 +00:00
|
|
|
MAKEFILE := Bundles, \
|
2020-10-21 22:04:37 +00:00
|
|
|
TARGET := docs-jdk-bundles, \
|
2020-05-12 14:35:58 +00:00
|
|
|
DEPS := docs-image, \
|
|
|
|
))
|
2016-05-04 13:29:01 +00:00
|
|
|
|
2020-10-21 22:04:37 +00:00
|
|
|
$(eval $(call SetupTarget, docs-javase-bundles, \
|
|
|
|
MAKEFILE := Bundles, \
|
|
|
|
TARGET := docs-javase-bundles, \
|
|
|
|
DEPS := docs-javase-image, \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(eval $(call SetupTarget, docs-reference-bundles, \
|
|
|
|
MAKEFILE := Bundles, \
|
|
|
|
TARGET := docs-reference-bundles, \
|
|
|
|
DEPS := docs-reference-image, \
|
|
|
|
))
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, static-libs-bundles, \
|
|
|
|
MAKEFILE := Bundles, \
|
|
|
|
TARGET := static-libs-bundles, \
|
|
|
|
DEPS := static-libs-image, \
|
|
|
|
))
|
2019-10-29 19:01:14 +00:00
|
|
|
|
2018-11-29 14:34:46 +00:00
|
|
|
ifeq ($(JCOV_ENABLED), true)
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, jcov-bundles, \
|
|
|
|
MAKEFILE := Bundles, \
|
|
|
|
TARGET := jcov-bundles, \
|
|
|
|
DEPS := jcov-image, \
|
|
|
|
))
|
2018-11-29 14:34:46 +00:00
|
|
|
endif
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
# Install targets
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
$(eval $(call SetupTarget, install, \
|
|
|
|
MAKEFILE := Install, \
|
|
|
|
DEPS := product-images, \
|
|
|
|
))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
#
|
2014-11-27 14:41:56 +00:00
|
|
|
# Dependency declarations between targets.
|
2014-08-17 14:51:37 +00:00
|
|
|
#
|
2014-11-27 14:41:56 +00:00
|
|
|
# These are declared in two groups. First all dependencies between targets that
|
2014-08-17 14:51:37 +00:00
|
|
|
# have recipes above as these dependencies may be disabled. Then the aggregator
|
|
|
|
# targets that do not have recipes of their own, which will never have their
|
|
|
|
# dependencies disabled.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
# Targets with recipes above
|
|
|
|
|
2014-11-27 14:41:56 +00:00
|
|
|
# If running an *-only target, parallel execution and dependencies between
|
|
|
|
# recipe targets are disabled. This makes it possible to run a select set of
|
2014-08-17 14:51:37 +00:00
|
|
|
# recipe targets in order. It's the responsibility of the user to make sure
|
2014-11-27 14:41:56 +00:00
|
|
|
# all prerequisites are fulfilled.
|
2020-05-12 14:35:58 +00:00
|
|
|
ifeq ($(DEPS), none)
|
2014-08-17 14:51:37 +00:00
|
|
|
.NOTPARALLEL:
|
|
|
|
else
|
2014-12-03 14:20:21 +00:00
|
|
|
$(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools
|
|
|
|
|
2017-10-19 12:16:45 +00:00
|
|
|
interim-langtools: $(INTERIM_LANGTOOLS_GENSRC_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2016-12-11 20:09:13 +00:00
|
|
|
$(HOTSPOT_GENSRC_TARGETS): interim-langtools buildtools-hotspot
|
2015-10-08 21:31:14 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
$(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
$(GENSRC_MODULEINFO_TARGETS): buildtools-jdk
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
$(GENDATA_TARGETS): interim-langtools buildtools-jdk
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2015-06-04 16:27:42 +00:00
|
|
|
$(JAVA_TARGETS): interim-langtools
|
|
|
|
|
2016-11-24 14:27:33 +00:00
|
|
|
# Declare dependencies between hotspot-<variant>* targets
|
|
|
|
$(foreach v, $(JVM_VARIANTS), \
|
2020-06-22 06:09:23 +00:00
|
|
|
$(eval hotspot-$v-gensrc: java.base-copy buildtools-hotspot) \
|
2017-12-20 17:14:06 +00:00
|
|
|
$(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
|
2023-06-12 16:22:24 +00:00
|
|
|
$(eval hotspot-$v-static-libs: hotspot-$v-gensrc java.base-copy) \
|
2016-11-24 14:27:33 +00:00
|
|
|
)
|
|
|
|
|
2018-02-20 15:04:51 +00:00
|
|
|
# If not already set, set the JVM variant target so that the JVM will be built.
|
|
|
|
JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
|
2020-05-29 19:18:23 +00:00
|
|
|
JVM_MAIN_GENSRC_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
|
2018-02-20 15:04:51 +00:00
|
|
|
|
2016-11-24 14:27:33 +00:00
|
|
|
# Building one JVM variant is enough to start building the other libs
|
2018-02-20 15:04:51 +00:00
|
|
|
$(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-29 19:18:23 +00:00
|
|
|
# Static libs depend on hotspot gensrc
|
|
|
|
$(STATIC_LIBS_TARGETS): $(JVM_MAIN_GENSRC_TARGETS)
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
$(LAUNCHER_TARGETS): java.base-libs
|
|
|
|
|
2015-10-19 17:21:27 +00:00
|
|
|
ifeq ($(STATIC_BUILD), true)
|
|
|
|
$(LAUNCHER_TARGETS): generate-exported-symbols
|
|
|
|
endif
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
# Declare dependency from <module>-java to <module>-gensrc
|
|
|
|
$(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
|
|
|
|
|
|
|
|
# Declare dependencies between java modules
|
|
|
|
$(foreach m, $(JAVA_MODULES), \
|
|
|
|
$(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \
|
|
|
|
$(call FindDepsForModule,$m)))))
|
2019-09-23 16:00:28 +00:00
|
|
|
# Declare dependencies between the module meta targets
|
|
|
|
$(foreach m, $(ALL_MODULES), $(eval $m: $(call FindDepsForModule,$m)))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
# Declare dependencies from <module>-lib to <module>-java
|
2016-05-06 23:21:08 +00:00
|
|
|
# Skip modules that do not have java source.
|
2019-06-07 16:16:11 +00:00
|
|
|
$(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
# Declare dependencies from all other <module>-lib to java.base-lib
|
2014-12-03 14:20:21 +00:00
|
|
|
$(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
|
2014-08-17 14:51:37 +00:00
|
|
|
$(eval $t: java.base-libs))
|
|
|
|
|
2022-03-02 18:17:47 +00:00
|
|
|
ifeq ($(ENABLE_HSDIS_BUNDLING), true)
|
|
|
|
java.base-copy: build-hsdis
|
|
|
|
endif
|
|
|
|
|
2015-03-27 20:48:08 +00:00
|
|
|
# jdk.accessibility depends on java.desktop
|
|
|
|
jdk.accessibility-libs: java.desktop-libs
|
|
|
|
|
2014-11-27 14:41:56 +00:00
|
|
|
# This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
|
2014-12-03 14:20:21 +00:00
|
|
|
# header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
|
|
|
|
# virtual target.
|
|
|
|
jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
|
|
|
|
|
2021-07-13 05:55:04 +00:00
|
|
|
# jdk.jfr-gendata uses TOOL_JFR_GEN from buildtools-hotspot
|
|
|
|
jdk.jfr-gendata: buildtools-hotspot
|
|
|
|
|
2014-09-23 14:23:25 +00:00
|
|
|
# The swing beans need to have java base properly generated to avoid errors
|
2017-12-20 17:14:06 +00:00
|
|
|
# in javadoc. The X11 wrappers need the java.base include files to have been
|
|
|
|
# copied and processed.
|
|
|
|
java.desktop-gensrc-src: java.base-gensrc java.base-copy
|
2014-09-23 14:23:25 +00:00
|
|
|
|
2020-03-19 19:34:34 +00:00
|
|
|
jdk.jdeps-gendata: java
|
2014-08-29 17:46:21 +00:00
|
|
|
|
2017-07-13 06:49:11 +00:00
|
|
|
# The ct.sym generation uses all the moduleinfos as input
|
|
|
|
jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS)
|
|
|
|
|
2016-11-28 19:36:15 +00:00
|
|
|
# Declare dependencies between jmod targets.
|
|
|
|
# java.base jmod needs jrt-fs.jar and access to the other jmods to be built.
|
2019-06-07 16:16:11 +00:00
|
|
|
# When creating the BUILDJDK, we don't need to add hashes to java.base, thus
|
2016-05-06 23:21:08 +00:00
|
|
|
# we don't need to depend on all other jmods
|
|
|
|
ifneq ($(CREATING_BUILDJDK), true)
|
2017-02-09 08:51:24 +00:00
|
|
|
java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
|
2016-05-06 23:21:08 +00:00
|
|
|
endif
|
2016-03-17 19:03:53 +00:00
|
|
|
|
2018-02-20 15:04:51 +00:00
|
|
|
# If not already set, set the JVM target so that the JVM will be built.
|
|
|
|
JVM_MAIN_TARGETS ?= hotspot
|
2018-03-05 23:59:49 +00:00
|
|
|
|
2018-02-20 15:04:51 +00:00
|
|
|
# Building java.base-jmod requires all of VM (ie hotspot) to be built.
|
2018-03-05 23:59:49 +00:00
|
|
|
java.base-jmod: $(JVM_MAIN_TARGETS)
|
2016-11-24 14:27:33 +00:00
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
# Declare dependencies from <module>-jmod to all other module targets
|
2019-06-07 16:16:11 +00:00
|
|
|
$(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java))
|
2016-11-07 12:25:18 +00:00
|
|
|
$(foreach m, $(GENDATA_MODULES), $(eval $m_JMOD_DEPS += $m-gendata))
|
|
|
|
$(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))
|
|
|
|
$(foreach m, $(ALL_MODULES), $(eval $m-jmod: $($(m)_JMOD_DEPS)))
|
|
|
|
$(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $m-interim-jmod: $($(m)_JMOD_DEPS)))
|
2016-03-17 19:03:53 +00:00
|
|
|
|
2018-10-05 05:54:28 +00:00
|
|
|
# Setup the minimal set of generated native source dependencies for hotspot
|
|
|
|
$(foreach v, $(JVM_VARIANTS), \
|
|
|
|
$(eval hotspot-$v-libs-compile-commands: hotspot-$v-gensrc) \
|
|
|
|
$(foreach m, $(filter java.desktop jdk.hotspot.agent, $(GENSRC_MODULES)), \
|
|
|
|
$(eval hotspot-$v-libs-compile-commands: $m-gensrc)) \
|
|
|
|
)
|
|
|
|
|
|
|
|
# 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))
|
|
|
|
|
2019-02-12 07:40:43 +00:00
|
|
|
$(COMPILE_COMMANDS_TARGETS_HOTSPOT): clean-compile-commands
|
|
|
|
$(COMPILE_COMMANDS_TARGETS_JDK): clean-compile-commands
|
2018-10-05 05:54:28 +00:00
|
|
|
compile-commands-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT)
|
|
|
|
compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
|
|
|
|
|
2019-10-29 19:01:14 +00:00
|
|
|
# The -static-libs targets depend on -java as well as java.base-copy.
|
|
|
|
$(foreach m, $(filter $(JAVA_MODULES), $(STATIC_LIBS_MODULES)), \
|
|
|
|
$(eval $m-static-libs: $m-java java.base-copy))
|
|
|
|
|
2016-10-07 07:11:42 +00:00
|
|
|
# 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.
|
2016-03-17 19:03:53 +00:00
|
|
|
ifeq ($(CREATE_BUILDJDK), true)
|
2016-05-06 23:21:08 +00:00
|
|
|
ifneq ($(CREATING_BUILDJDK), true)
|
2019-06-07 16:16:11 +00:00
|
|
|
# When cross compiling and buildjdk is to be created, simply depend on
|
|
|
|
# creating the buildjdk.
|
2016-05-06 23:21:08 +00:00
|
|
|
$(JMOD_TARGETS): create-buildjdk
|
2016-10-04 11:34:34 +00:00
|
|
|
buildtools-modules: create-buildjdk
|
2016-10-07 07:11:42 +00:00
|
|
|
else
|
2019-06-07 16:16:11 +00:00
|
|
|
# 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
|
2016-05-06 23:21:08 +00:00
|
|
|
endif
|
2020-10-21 22:04:37 +00:00
|
|
|
else ifeq ($(EXTERNAL_BUILDJDK), false)
|
|
|
|
# The normal non cross compilation usecase needs to wait for the full
|
2019-06-07 16:16:11 +00:00
|
|
|
# exploded-image to avoid a race with the optimize target.
|
|
|
|
$(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): exploded-image
|
2020-10-21 22:04:37 +00:00
|
|
|
# The buildtools-modules are used for the exploded-image-optimize target,
|
|
|
|
# but can be built either using the exploded-image or an external BUILDJDK.
|
|
|
|
buildtools-modules: exploded-image-base
|
2016-03-17 19:03:53 +00:00
|
|
|
endif
|
|
|
|
|
2016-12-13 02:56:32 +00:00
|
|
|
# All modules include the main license files from java.base.
|
|
|
|
$(JMOD_TARGETS): java.base-copy
|
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
zip-security: $(filter jdk.crypto%, $(JAVA_TARGETS))
|
2018-11-16 22:39:51 +00:00
|
|
|
|
2016-05-25 10:53:26 +00:00
|
|
|
ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
|
|
|
|
ifeq ($(CREATE_BUILDJDK), true)
|
|
|
|
# If creating a buildjdk, the interim image needs to be based on that.
|
2016-11-07 12:25:18 +00:00
|
|
|
generate-link-opt-data: create-buildjdk
|
2016-05-25 10:53:26 +00:00
|
|
|
else ifeq ($(EXTERNAL_BUILDJDK), false)
|
|
|
|
# If an external buildjdk has been provided, we skip generating an
|
|
|
|
# interim-image and just use the external buildjdk for generating
|
|
|
|
# classlist.
|
2016-11-07 12:25:18 +00:00
|
|
|
generate-link-opt-data: interim-image
|
2016-05-25 10:53:26 +00:00
|
|
|
endif
|
2016-11-07 12:25:18 +00:00
|
|
|
generate-link-opt-data: buildtools-jdk
|
2016-05-25 10:53:26 +00:00
|
|
|
|
2016-11-07 12:25:18 +00:00
|
|
|
# The generated classlist needs to go into java.base-jmod.
|
2018-06-06 20:16:12 +00:00
|
|
|
java.base-jmod jdk.jlink-jmod jdk-image legacy-jre-image: generate-link-opt-data
|
2016-05-06 23:21:08 +00:00
|
|
|
endif
|
|
|
|
|
2016-12-13 11:31:43 +00:00
|
|
|
symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2023-06-12 16:22:24 +00:00
|
|
|
static-libs-image: hotspot-static-libs $(STATIC_LIBS_TARGETS)
|
|
|
|
|
|
|
|
static-libs-graal-image: $(STATIC_LIBS_TARGETS)
|
2019-10-29 19:01:14 +00:00
|
|
|
|
2016-10-05 08:49:21 +00:00
|
|
|
bootcycle-images: jdk-image
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-03-19 19:34:34 +00:00
|
|
|
docs-jdk-api-javadoc: $(GENSRC_TARGETS)
|
2017-04-19 08:44:40 +00:00
|
|
|
|
2020-03-19 19:34:34 +00:00
|
|
|
docs-javase-api-javadoc: $(GENSRC_TARGETS)
|
2017-03-29 16:41:55 +00:00
|
|
|
|
2020-03-19 19:34:34 +00:00
|
|
|
docs-reference-api-javadoc: $(GENSRC_TARGETS)
|
2017-10-23 08:21:13 +00:00
|
|
|
|
2018-02-20 15:04:51 +00:00
|
|
|
# If not already set, then set the JVM specific docs targets
|
|
|
|
JVM_DOCS_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
|
2018-03-05 23:59:49 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
# The gensrc steps for hotspot create html spec files.
|
|
|
|
docs-jdk-specs: $(JVM_DOCS_TARGETS)
|
2019-06-20 20:03:10 +00:00
|
|
|
|
2018-10-31 08:30:24 +00:00
|
|
|
# Tests
|
|
|
|
test-make: clean-test-make compile-commands
|
|
|
|
|
|
|
|
test-make-compile-commands: compile-commands
|
2017-03-03 11:57:57 +00:00
|
|
|
|
|
|
|
# Declare dependency for all generated test targets
|
2018-10-31 08:30:24 +00:00
|
|
|
$(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
|
2018-11-08 11:03:18 +00:00
|
|
|
$(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
|
2017-03-03 11:57:57 +00:00
|
|
|
|
2016-11-07 12:25:18 +00:00
|
|
|
interim-image: $(INTERIM_JMOD_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-12 14:35:58 +00:00
|
|
|
build-test-hotspot-jtreg-native: hotspot-$(JVM_VARIANT_MAIN)-libs
|
2020-06-16 16:50:45 +00:00
|
|
|
build-test-libtest-jtreg-native: hotspot-$(JVM_VARIANT_MAIN)-libs
|
2018-03-05 23:59:49 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Virtual targets without recipes
|
|
|
|
|
2018-02-20 15:04:51 +00:00
|
|
|
# If not already set, set the JVM specific tools targets
|
|
|
|
JVM_TOOLS_TARGETS ?= buildtools-hotspot
|
2020-03-19 19:34:34 +00:00
|
|
|
buildtools: buildtools-langtools interim-langtools \
|
2018-02-20 15:04:51 +00:00
|
|
|
buildtools-jdk $(JVM_TOOLS_TARGETS)
|
2014-12-03 14:20:21 +00:00
|
|
|
|
2019-04-04 14:43:44 +00:00
|
|
|
# Declare dependencies from hotspot-<variant> targets
|
|
|
|
$(foreach v, $(JVM_VARIANTS), \
|
|
|
|
$(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
|
|
|
|
)
|
2018-03-26 18:44:32 +00:00
|
|
|
hotspot: $(HOTSPOT_VARIANT_TARGETS)
|
2016-11-24 14:27:33 +00:00
|
|
|
|
|
|
|
# Create targets hotspot-libs and hotspot-gensrc.
|
|
|
|
$(foreach v, $(JVM_VARIANTS), \
|
|
|
|
$(eval hotspot-libs: hotspot-$v-libs) \
|
|
|
|
$(eval hotspot-gensrc: hotspot-$v-gensrc) \
|
2023-06-12 16:22:24 +00:00
|
|
|
$(eval hotspot-static-libs: hotspot-$v-static-libs) \
|
2016-11-24 14:27:33 +00:00
|
|
|
)
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
gensrc: $(GENSRC_TARGETS)
|
|
|
|
|
|
|
|
gendata: $(GENDATA_TARGETS)
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
copy: $(ALL_COPY_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
java: $(JAVA_TARGETS)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
libs: $(LIBS_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2019-10-29 19:01:14 +00:00
|
|
|
static-libs: $(STATIC_LIBS_TARGETS)
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
launchers: $(LAUNCHER_TARGETS)
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
jmods: $(JMOD_TARGETS)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
# Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
|
|
|
|
# is actually handled by jdk.jdi-gensrc
|
|
|
|
jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
# Declare dependencies from <module> to all the individual targets specific
|
2015-11-24 14:46:04 +00:00
|
|
|
# to that module <module>-*, that are needed for the exploded image.
|
2014-08-17 14:51:37 +00:00
|
|
|
$(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
|
|
|
|
$(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
|
|
|
|
$(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
|
2014-08-17 14:51:37 +00:00
|
|
|
$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
|
2016-03-17 19:03:53 +00:00
|
|
|
$(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
|
2016-11-24 14:27:33 +00:00
|
|
|
|
|
|
|
# Building java.base includes building all of hotspot.
|
2018-02-20 15:04:51 +00:00
|
|
|
java.base: $(JVM_MAIN_TARGETS)
|
2016-11-24 14:27:33 +00:00
|
|
|
|
2015-06-04 16:27:42 +00:00
|
|
|
demos: demos-jdk
|
|
|
|
|
2017-09-25 08:32:00 +00:00
|
|
|
# The "exploded image" is a locally runnable JDK in $(OUTPUTDIR)/jdk.
|
2016-10-04 11:34:34 +00:00
|
|
|
exploded-image-base: $(ALL_MODULES)
|
2016-12-01 13:40:06 +00:00
|
|
|
exploded-image: exploded-image-base release-file
|
2016-10-07 07:11:42 +00:00
|
|
|
# When cross compiling, no need to optimize the exploded image since it won't
|
|
|
|
# be runnable on the host platform anyway.
|
|
|
|
ifneq ($(COMPILE_TYPE), cross)
|
|
|
|
exploded-image: exploded-image-optimize
|
|
|
|
endif
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-10-30 13:55:31 +00:00
|
|
|
# The runnable-buildjdk target guarantees that the buildjdk is done
|
|
|
|
# building and ready to be used. The exact set of dependencies it needs
|
|
|
|
# depends on what kind of buildjdk is used for the current configuration.
|
|
|
|
runnable-buildjdk:
|
|
|
|
ifeq ($(CREATE_BUILDJDK), true)
|
|
|
|
ifneq ($(CREATING_BUILDJDK), true)
|
|
|
|
runnable-buildjdk: create-buildjdk
|
|
|
|
endif
|
|
|
|
else ifeq ($(EXTERNAL_BUILDJDK), false)
|
|
|
|
runnable-buildjdk: exploded-image
|
|
|
|
endif
|
|
|
|
|
2019-06-07 16:16:11 +00:00
|
|
|
create-buildjdk: create-buildjdk-interim-image
|
2016-03-17 19:03:53 +00:00
|
|
|
|
2017-04-19 08:44:40 +00:00
|
|
|
docs-jdk-api: docs-jdk-api-javadoc
|
|
|
|
docs-javase-api: docs-javase-api-javadoc
|
2017-10-23 08:21:13 +00:00
|
|
|
docs-reference-api: docs-reference-api-javadoc
|
2017-04-19 08:44:40 +00:00
|
|
|
|
|
|
|
# If we're building full docs, we must also generate the module graphs to
|
|
|
|
# get non-broken api documentation.
|
|
|
|
ifeq ($(ENABLE_FULL_DOCS), true)
|
2022-11-03 14:51:24 +00:00
|
|
|
docs-jdk-api: docs-jdk-api-graphs
|
|
|
|
docs-javase-api: docs-javase-api-graphs
|
|
|
|
docs-reference-api: docs-reference-api-graphs
|
|
|
|
|
|
|
|
# We must generate javadoc first so we know what graphs are needed
|
|
|
|
docs-jdk-api-graphs: docs-jdk-api-javadoc
|
|
|
|
docs-javase-api-graphs: docs-javase-api-javadoc
|
|
|
|
docs-reference-api-graphs: docs-reference-api-javadoc
|
2017-04-19 08:44:40 +00:00
|
|
|
endif
|
|
|
|
|
2017-05-12 20:29:22 +00:00
|
|
|
docs-jdk: docs-jdk-api docs-jdk-specs docs-jdk-index
|
2017-04-19 08:44:40 +00:00
|
|
|
docs-javase: docs-javase-api
|
2017-10-23 08:21:13 +00:00
|
|
|
docs-reference: docs-reference-api
|
2017-04-19 08:44:40 +00:00
|
|
|
|
|
|
|
# alias for backwards compatibility
|
|
|
|
docs-javadoc: docs-jdk-api
|
|
|
|
|
2018-06-06 20:16:12 +00:00
|
|
|
mac-bundles: mac-jdk-bundle
|
2015-06-04 16:27:42 +00:00
|
|
|
|
2017-09-25 08:32:00 +00:00
|
|
|
# The $(OUTPUTDIR)/images directory contain the resulting deliverables,
|
2015-02-06 11:46:59 +00:00
|
|
|
# and in line with this, our targets for creating these are named *-image[s].
|
|
|
|
|
2018-06-06 20:16:12 +00:00
|
|
|
# This target builds the product images, e.g. the JDK image
|
2015-02-06 11:46:59 +00:00
|
|
|
# (and possibly other, more specific versions)
|
2018-06-06 20:16:12 +00:00
|
|
|
product-images: jdk-image symbols-image exploded-image
|
2016-10-05 08:49:21 +00:00
|
|
|
|
2019-03-30 20:29:37 +00:00
|
|
|
# This target builds the legacy images, e.g. the legacy JRE image
|
|
|
|
legacy-images: legacy-jre-image
|
|
|
|
|
2016-10-05 08:49:21 +00:00
|
|
|
# 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
|
2016-03-17 19:03:53 +00:00
|
|
|
|
2016-05-06 23:21:08 +00:00
|
|
|
# The module summary cannot be run when:
|
|
|
|
# * Cross compiling and building a partial BUILDJDK for the build host
|
|
|
|
# * An external buildjdk has been supplied since it may not match the
|
|
|
|
# module selection of the target jdk
|
2016-03-17 19:03:53 +00:00
|
|
|
ifneq ($(CREATE_BUILDJDK), true)
|
2016-05-06 23:21:08 +00:00
|
|
|
ifeq ($(EXTERNAL_BUILDJDK), false)
|
|
|
|
product-images: generate-summary
|
|
|
|
endif
|
2016-03-17 19:03:53 +00:00
|
|
|
endif
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2019-02-07 11:35:45 +00:00
|
|
|
ifeq ($(call isTargetOs, macosx), true)
|
2018-06-06 20:16:12 +00:00
|
|
|
product-images: mac-jdk-bundle
|
2019-03-30 20:29:37 +00:00
|
|
|
|
|
|
|
legacy-images: mac-legacy-jre-bundle
|
2014-12-03 14:20:21 +00:00
|
|
|
endif
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-10-21 22:04:37 +00:00
|
|
|
# These targets build the various documentation images
|
|
|
|
docs-jdk-image: docs-jdk
|
|
|
|
docs-javase-image: docs-javase
|
|
|
|
docs-reference-image: docs-reference
|
|
|
|
# The docs-jdk-image is what most users expect to be built
|
|
|
|
docs-image: docs-jdk-image
|
|
|
|
all-docs-images: docs-jdk-image docs-javase-image docs-reference-image
|
|
|
|
|
|
|
|
docs-bundles: docs-jdk-bundles
|
|
|
|
all-docs-bundles: docs-jdk-bundles docs-javase-bundles docs-reference-bundles
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2020-05-20 12:09:18 +00:00
|
|
|
# This target builds the test image
|
2020-07-02 15:35:03 +00:00
|
|
|
test-image: prepare-test-image test-image-jdk-jtreg-native \
|
|
|
|
test-image-demos-jdk test-image-libtest-jtreg-native \
|
|
|
|
test-image-lib-native
|
2018-02-20 15:04:51 +00:00
|
|
|
|
2020-05-20 12:09:18 +00:00
|
|
|
ifneq ($(JVM_TEST_IMAGE_TARGETS), )
|
|
|
|
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the
|
|
|
|
# standard hotspot set of tests.
|
|
|
|
test-image: $(JVM_TEST_IMAGE_TARGETS)
|
|
|
|
else
|
|
|
|
test-image: test-image-hotspot-jtreg-native
|
2020-05-26 20:33:00 +00:00
|
|
|
ifneq ($(GTEST_FRAMEWORK_SRC), )
|
2020-05-20 12:09:18 +00:00
|
|
|
test-image: test-image-hotspot-gtest
|
|
|
|
endif
|
|
|
|
endif
|
2018-02-20 15:04:51 +00:00
|
|
|
|
2020-05-13 13:03:24 +00:00
|
|
|
ifeq ($(BUILD_FAILURE_HANDLER), true)
|
|
|
|
test-image: test-image-failure-handler
|
|
|
|
endif
|
|
|
|
|
2023-04-21 13:31:45 +00:00
|
|
|
ifeq ($(BUILD_JTREG_TEST_THREAD_FACTORY), true)
|
|
|
|
test-image: test-image-test-thread-factory
|
|
|
|
endif
|
|
|
|
|
2018-11-16 22:39:51 +00:00
|
|
|
ifneq ($(JMH_CORE_JAR), )
|
|
|
|
test-image: build-microbenchmark
|
|
|
|
endif
|
|
|
|
|
2018-02-20 15:04:51 +00:00
|
|
|
################################################################################
|
2015-01-09 15:45:39 +00:00
|
|
|
|
2016-05-04 13:29:01 +00:00
|
|
|
# all-images builds all our deliverables as images.
|
2020-10-21 22:04:37 +00:00
|
|
|
all-images: product-images test-image all-docs-images
|
2015-02-06 11:46:59 +00:00
|
|
|
|
2016-05-04 13:29:01 +00:00
|
|
|
# all-bundles packages all our deliverables as tar.gz bundles.
|
2019-10-29 19:01:14 +00:00
|
|
|
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
|
2016-05-04 13:29:01 +00:00
|
|
|
|
2023-06-12 16:22:24 +00:00
|
|
|
ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-static-libs \
|
|
|
|
hotspot-gensrc gensrc gendata \
|
2020-03-19 19:34:34 +00:00
|
|
|
copy java libs static-libs launchers jmods \
|
2017-04-18 02:23:42 +00:00
|
|
|
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
|
2020-10-30 13:55:31 +00:00
|
|
|
exploded-image-base exploded-image runnable-buildjdk \
|
2017-10-23 08:21:13 +00:00
|
|
|
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
|
2019-03-30 20:29:37 +00:00
|
|
|
docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \
|
2020-10-21 22:04:37 +00:00
|
|
|
docs-image docs-javase-image docs-reference-image all-docs-images \
|
|
|
|
docs-bundles all-docs-bundles test-image all-images \
|
2016-05-04 13:29:01 +00:00
|
|
|
all-bundles
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2015-02-06 11:46:59 +00:00
|
|
|
# Traditional targets typically run by users.
|
|
|
|
# These can be considered aliases for the targets now named by a more
|
|
|
|
# "modern" naming scheme.
|
2015-12-09 10:44:40 +00:00
|
|
|
default: $(DEFAULT_MAKE_TARGET)
|
2015-02-06 11:46:59 +00:00
|
|
|
jdk: exploded-image
|
|
|
|
images: product-images
|
|
|
|
docs: docs-image
|
2016-05-04 13:29:01 +00:00
|
|
|
bundles: all-bundles
|
2015-02-06 11:46:59 +00:00
|
|
|
all: all-images
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2016-05-04 13:29:01 +00:00
|
|
|
ALL_TARGETS += default jdk images docs bundles all
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2018-10-31 08:30:24 +00:00
|
|
|
# Aliases used for running tests.
|
|
|
|
|
|
|
|
# Let "run-test" be an alias for "test"
|
|
|
|
$(foreach t, $(ALL_NAMED_TESTS), $(eval run-test-$t: test-$t))
|
2018-11-08 11:03:18 +00:00
|
|
|
RUN_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS))
|
2018-10-31 08:30:24 +00:00
|
|
|
|
|
|
|
run-test: test
|
|
|
|
exploded-run-test: exploded-test
|
|
|
|
|
|
|
|
# "make check" is a common idiom for running basic testing
|
|
|
|
check: test-tier1
|
|
|
|
|
|
|
|
# Keep some old names as aliases
|
|
|
|
test-hotspot-jtreg: test-hotspot_all
|
|
|
|
test-hotspot-jtreg-native: test-hotspot_native_sanity
|
|
|
|
test-hotspot-gtest: exploded-test-gtest
|
|
|
|
test-jdk-jtreg-native: test-jdk_native_sanity
|
|
|
|
|
|
|
|
ALL_TARGETS += $(RUN_TEST_TARGETS) run-test exploded-run-test check \
|
|
|
|
test-hotspot-jtreg test-hotspot-jtreg-native test-hotspot-gtest \
|
|
|
|
test-jdk-jtreg-native
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# Clean targets
|
|
|
|
#
|
|
|
|
################################################################################
|
2014-11-27 14:41:56 +00:00
|
|
|
# Clean targets are automatically run serially by the Makefile calling this
|
2014-09-05 10:42:41 +00:00
|
|
|
# file.
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
|
2019-03-05 10:07:19 +00:00
|
|
|
images make-support test-make bundles buildjdk test-results test-support \
|
|
|
|
support/images
|
2014-12-03 14:20:21 +00:00
|
|
|
CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
|
2015-11-03 16:48:01 +00:00
|
|
|
CLEAN_SUPPORT_DIRS += demos
|
|
|
|
CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
|
2015-09-16 07:49:36 +00:00
|
|
|
CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
|
2015-02-27 10:56:57 +00:00
|
|
|
CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
|
2016-10-26 14:00:26 +00:00
|
|
|
CLEAN_PHASES := gensrc java native include
|
2014-12-03 14:20:21 +00:00
|
|
|
CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
|
|
|
|
CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
|
|
|
|
# Construct targets of the form clean-$module-$phase
|
|
|
|
CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \
|
|
|
|
$(addprefix $m-, $(CLEAN_PHASES))))
|
2012-10-26 21:29:57 +00:00
|
|
|
|
|
|
|
# Remove everything, except the output from configure.
|
2014-12-03 14:20:21 +00:00
|
|
|
clean: $(CLEAN_DIR_TARGETS)
|
2018-10-05 05:54:28 +00:00
|
|
|
($(CD) $(OUTPUTDIR) && $(RM) -r build*.log* compile_commands.json)
|
2014-08-17 14:51:37 +00:00
|
|
|
$(ECHO) Cleaned all build artifacts.
|
|
|
|
|
2016-10-26 14:00:26 +00:00
|
|
|
clean-docs:
|
|
|
|
$(call CleanDocs)
|
|
|
|
|
2019-02-12 07:40:43 +00:00
|
|
|
clean-compile-commands:
|
|
|
|
$(call CleanMakeSupportDir,compile-commands)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
$(CLEAN_DIR_TARGETS):
|
|
|
|
$(call CleanDir,$(patsubst clean-%, %, $@))
|
|
|
|
|
2015-11-03 16:48:01 +00:00
|
|
|
$(CLEAN_SUPPORT_DIR_TARGETS):
|
|
|
|
$(call CleanSupportDir,$(patsubst clean-%, %, $@))
|
|
|
|
|
2015-02-27 10:56:57 +00:00
|
|
|
$(CLEAN_TEST_TARGETS):
|
|
|
|
$(call CleanTest,$(patsubst clean-test-%, %, $@))
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
$(CLEAN_PHASE_TARGETS):
|
|
|
|
$(call Clean-$(patsubst clean-%,%, $@))
|
|
|
|
|
|
|
|
$(CLEAN_MODULE_TARGETS):
|
|
|
|
$(call CleanModule,$(patsubst clean-%, %, $@))
|
|
|
|
|
|
|
|
$(CLEAN_MODULE_PHASE_TARGETS):
|
|
|
|
$(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \
|
|
|
|
$(word 2, $(subst -,$(SPACE),$@)))
|
|
|
|
|
|
|
|
# When removing the support dir, we must also remove jdk. Building classes has
|
|
|
|
# the side effect of generating native headers. The headers end up in support
|
|
|
|
# while classes and touch files end up in jdk.
|
|
|
|
clean-support: clean-jdk
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2017-11-27 18:15:24 +00:00
|
|
|
clean-test: clean-test-results clean-test-support
|
|
|
|
|
2019-03-05 10:07:19 +00:00
|
|
|
# When cleaning images, also clean the support/images directory.
|
|
|
|
clean-images: clean-support/images
|
|
|
|
|
2015-04-10 14:32:00 +00:00
|
|
|
# Remove everything, including configure configuration. If the output
|
|
|
|
# directory was created by configure and now becomes empty, remove it as well.
|
2012-10-26 21:29:57 +00:00
|
|
|
dist-clean: clean
|
2017-09-25 08:32:00 +00:00
|
|
|
($(CD) $(OUTPUTDIR) && \
|
2018-09-10 07:59:27 +00:00
|
|
|
$(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide \
|
|
|
|
configure.log* build.log*)
|
2017-09-25 08:32:00 +00:00
|
|
|
$(if $(filter $(CONF_NAME),$(notdir $(OUTPUTDIR))), \
|
|
|
|
if test "x`$(LS) $(OUTPUTDIR)`" != x; then \
|
2013-10-10 12:58:19 +00:00
|
|
|
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
|
|
|
|
else \
|
2017-09-12 17:03:56 +00:00
|
|
|
($(CD) $(TOPDIR) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \
|
2017-09-25 08:32:00 +00:00
|
|
|
&& $(RM) -r $(OUTPUTDIR)) \
|
2013-10-10 12:58:19 +00:00
|
|
|
fi \
|
|
|
|
)
|
2014-08-17 14:51:37 +00:00
|
|
|
$(ECHO) Cleaned everything, you will have to re-run configure.
|
|
|
|
|
2019-02-12 07:40:43 +00:00
|
|
|
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)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
2015-03-26 15:17:30 +00:00
|
|
|
# Declare *-only targets for each normal target
|
|
|
|
$(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2015-03-26 15:17:30 +00:00
|
|
|
ALL_TARGETS += $(addsuffix -only, $(filter-out dist-clean clean%, $(ALL_TARGETS)))
|
2014-09-05 10:42:41 +00:00
|
|
|
|
2015-03-26 15:17:30 +00:00
|
|
|
################################################################################
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2015-04-07 07:06:24 +00:00
|
|
|
# The following targets are intentionally not added to ALL_TARGETS since they
|
|
|
|
# are internal only, to support Init.gmk.
|
|
|
|
|
2015-03-26 15:17:30 +00:00
|
|
|
print-targets:
|
|
|
|
@$(ECHO) $(sort $(ALL_TARGETS))
|
|
|
|
|
|
|
|
print-modules:
|
|
|
|
@$(ECHO) $(sort $(ALL_MODULES))
|
|
|
|
|
2017-03-03 11:57:57 +00:00
|
|
|
print-tests:
|
|
|
|
@$(ECHO) $(sort $(ALL_NAMED_TESTS))
|
|
|
|
|
2015-04-07 07:06:24 +00:00
|
|
|
create-main-targets-include:
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Generating main target list)
|
2015-04-07 07:06:24 +00:00
|
|
|
@$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
|
|
|
|
$(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
2018-02-20 15:04:51 +00:00
|
|
|
# Hook to include the corresponding custom file, if present.
|
|
|
|
$(eval $(call IncludeCustomExtension, Main-post.gmk))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
.PHONY: $(ALL_TARGETS)
|
2012-10-26 21:29:57 +00:00
|
|
|
|
|
|
|
FRC: # Force target
|