annotate make/Main.gmk @ 58689:4e41f62dfddb

include records in list of nested classes
author jjg
date Wed, 13 Nov 2019 15:42:59 -0800
parents 7a8de392f9e1
children 66f7d2494d4e
rev   line source
ohair@14111 1 #
shurailine@54359 2 # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
ohair@14111 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@14111 4 #
ohair@14111 5 # This code is free software; you can redistribute it and/or modify it
ohair@14111 6 # under the terms of the GNU General Public License version 2 only, as
ohair@14111 7 # published by the Free Software Foundation. Oracle designates this
ohair@14111 8 # particular file as subject to the "Classpath" exception as provided
ohair@14111 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@14111 10 #
ohair@14111 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@14111 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@14111 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@14111 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@14111 15 # accompanied this code).
ohair@14111 16 #
ohair@14111 17 # You should have received a copy of the GNU General Public License version
ohair@14111 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@14111 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@14111 20 #
ohair@14111 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@14111 22 # or visit www.oracle.com if you need additional information or have any
ohair@14111 23 # questions.
ohair@14111 24 #
ohair@14111 25
chegar@25854 26 ################################################################################
chegar@25854 27 # This is the main makefile containing most actual top level targets. It needs
chegar@25854 28 # to be called with a SPEC file defined.
ihse@29662 29 ################################################################################
chegar@25854 30
chegar@25854 31 # Declare default target
chegar@25854 32 default:
ohair@14111 33
ihse@29662 34 ifeq ($(wildcard $(SPEC)),)
ihse@29662 35 $(error Main.gmk needs SPEC set to a proper spec.gmk)
ihse@29662 36 endif
ihse@29662 37
ohair@14111 38 # Now load the spec
ohair@14111 39 include $(SPEC)
ohair@14111 40
erikj@47217 41 include $(TOPDIR)/make/MainSupport.gmk
chegar@25854 42
ihse@20363 43 # Load the vital tools for all the makefiles.
erikj@47217 44 include $(TOPDIR)/make/common/MakeBase.gmk
erikj@47217 45 include $(TOPDIR)/make/common/Modules.gmk
erikj@47217 46 include $(TOPDIR)/make/common/FindTests.gmk
ohair@14111 47
chegar@25854 48 # Declare ALL_TARGETS as an immediate variable. This variable is a list of all
ihse@27595 49 # valid top level targets. It's used to declare them all as PHONY and to
chegar@25854 50 # generate the -only targets.
chegar@25854 51 ALL_TARGETS :=
chegar@25854 52
ihse@22714 53 # Hook to include the corresponding custom file, if present.
ihse@47396 54 $(eval $(call IncludeCustomExtension, Main.gmk))
ohair@14111 55
chegar@25854 56 # All modules for the current target platform.
erikj@34116 57 ALL_MODULES := $(call FindAllModules)
ohair@14111 58
chegar@25854 59 ################################################################################
chegar@25854 60 ################################################################################
chegar@25854 61 #
chegar@25854 62 # Recipes for all targets. Only recipes, dependencies are declared later.
chegar@25854 63 #
chegar@25854 64 ################################################################################
chegar@25854 65
chegar@25854 66 ################################################################################
chegar@25854 67 # Interim/build tools targets, compiling tools used during the build
chegar@25854 68
erikj@56685 69 buildtools-langtools:
erikj@47217 70 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ToolsLangtools.gmk)
chegar@27560 71
erikj@56685 72 interim-langtools:
erikj@47217 73 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk)
chegar@25854 74
erikj@56685 75 interim-rmic:
erikj@47217 76 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
chegar@25854 77
erikj@56685 78 interim-cldrconverter:
erikj@47217 79 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
naoto@57445 80
naoto@57445 81 interim-tzdb:
naoto@57445 82 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimTZDB.gmk)
naoto@57445 83
naoto@31948 84
erikj@56685 85 buildtools-jdk:
erikj@47217 86 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsJdk.gmk)
erikj@41171 87
erikj@56685 88 buildtools-modules:
erikj@47217 89 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileModuleTools.gmk)
kvn@42531 90
erikj@56685 91 buildtools-hotspot:
erikj@47217 92 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk)
chegar@25854 93
erikj@32806 94 ALL_TARGETS += buildtools-langtools interim-langtools \
naoto@57445 95 interim-rmic interim-cldrconverter interim-tzdb buildtools-jdk buildtools-modules \
kvn@42531 96 buildtools-hotspot
chegar@25854 97
chegar@25854 98 ################################################################################
chegar@25854 99 # Special targets for certain modules
chegar@25854 100
bobv@33562 101 generate-exported-symbols:
bobv@33562 102 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildStatic.gmk)
bobv@33562 103
erikj@50896 104 ALL_TARGETS += generate-exported-symbols
chegar@25854 105
chegar@25854 106 ################################################################################
chegar@25854 107 # Gensrc targets, generating source before java compilation can be done
erikj@38844 108 #
erikj@56685 109 $(eval $(call DeclareRecipesForPhase, GENSRC, \
erikj@56685 110 TARGET_SUFFIX := gensrc-src, \
erikj@56685 111 FILE_PREFIX := Gensrc, \
erikj@56685 112 MAKE_SUBDIR := gensrc, \
erikj@56685 113 CHECK_MODULES := $(ALL_MODULES), \
erikj@56685 114 ))
chegar@25854 115
erikj@56685 116 $(foreach m, $(GENSRC_MODULES), $(eval $m-gensrc: $m-gensrc-src))
erikj@47217 117
erikj@56685 118 LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, $(LANGTOOLS_MODULES)), $(GENSRC_TARGETS))
erikj@56685 119 INTERIM_LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, \
erikj@56685 120 $(INTERIM_LANGTOOLS_BASE_MODULES)), $(GENSRC_TARGETS))
erikj@56685 121 HOTSPOT_GENSRC_TARGETS := $(filter $(addsuffix -%, $(HOTSPOT_MODULES)), $(GENSRC_TARGETS))
erikj@56685 122 JDK_GENSRC_TARGETS := $(filter-out $(LANGTOOLS_GENSRC_TARGETS) \
erikj@56685 123 $(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
chegar@25854 124
erikj@56685 125 GENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
erikj@56685 126 GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
erikj@56685 127 $(GENSRC_MODULEINFO_MODULES))
alanb@36506 128
erikj@56685 129 GENSRC_MODULES := $(GENSRC_MODULEINFO_MODULES)
erikj@56685 130 GENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \
erikj@56685 131 $(addsuffix -gensrc, $(GENSRC_MODULES)))
alanb@36506 132
erikj@56685 133 define DeclareModuleInfoRecipe
erikj@56685 134 $1-gensrc-moduleinfo:
erikj@47217 135 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
alanb@36506 136 -f GensrcModuleInfo.gmk MODULE=$1)
alanb@36506 137
erikj@56685 138 $1-gensrc: $1-gensrc-moduleinfo
erikj@56685 139 endef
alanb@36506 140
erikj@56685 141 $(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m)))
alanb@36506 142
chegar@25854 143 ALL_TARGETS += $(GENSRC_TARGETS)
chegar@25854 144
chegar@25854 145 ################################################################################
chegar@25854 146 # Generate data targets
chegar@27560 147 $(eval $(call DeclareRecipesForPhase, GENDATA, \
chegar@27560 148 TARGET_SUFFIX := gendata, \
chegar@27560 149 FILE_PREFIX := Gendata, \
chegar@27560 150 MAKE_SUBDIR := gendata, \
chegar@27560 151 CHECK_MODULES := $(ALL_MODULES), \
chegar@27560 152 USE_WRAPPER := true))
chegar@25854 153
chegar@25854 154 ALL_TARGETS += $(GENDATA_TARGETS)
chegar@25854 155
chegar@25854 156 ################################################################################
chegar@25854 157 # Copy files targets
chegar@27560 158 $(eval $(call DeclareRecipesForPhase, COPY, \
chegar@27560 159 TARGET_SUFFIX := copy, \
chegar@27560 160 FILE_PREFIX := Copy, \
chegar@27560 161 MAKE_SUBDIR := copy, \
chegar@27560 162 CHECK_MODULES := $(ALL_MODULES), \
twisti@33045 163 USE_WRAPPER := true, \
erikj@47217 164 ))
chegar@25854 165
alanb@36506 166 ALL_COPY_MODULES += $(COPY_MODULES)
alanb@36506 167 ALL_COPY_TARGETS += $(COPY_TARGETS)
alanb@36506 168
alanb@36506 169 IMPORT_COPY_MODULES := $(call FindImportedModules)
alanb@36506 170 IMPORT_COPY_TARGETS := $(addsuffix -copy, $(IMPORT_COPY_MODULES))
alanb@36506 171 ALL_COPY_MODULES += $(IMPORT_COPY_MODULES)
alanb@36506 172 ALL_COPY_TARGETS += $(IMPORT_COPY_TARGETS)
alanb@36506 173
alanb@36506 174 define DeclareImportCopyRecipe
alanb@36506 175 $1-copy:
erikj@47217 176 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
alanb@36506 177 -f CopyImportModules.gmk MODULE=$1)
alanb@36506 178 endef
alanb@36506 179
alanb@36506 180 $(foreach m, $(IMPORT_COPY_MODULES), $(eval $(call DeclareImportCopyRecipe,$m)))
alanb@36506 181
alanb@36506 182 ALL_TARGETS += $(ALL_COPY_TARGETS)
chegar@25854 183
chegar@25854 184 ################################################################################
erikj@50897 185 # Targets for compiling all java modules.
alanb@36506 186 JAVA_MODULES := $(ALL_MODULES)
chegar@25854 187 JAVA_TARGETS := $(addsuffix -java, $(JAVA_MODULES))
chegar@25854 188
chegar@25854 189 define DeclareCompileJavaRecipe
chegar@25854 190 $1-java:
erikj@47217 191 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
erikj@34102 192 -f CompileJavaModules.gmk MODULE=$1)
chegar@25854 193 endef
chegar@25854 194
erikj@50897 195 $(foreach m, $(JAVA_MODULES), $(eval $(call DeclareCompileJavaRecipe,$m)))
chegar@25854 196
chegar@25854 197 ALL_TARGETS += $(JAVA_TARGETS)
chegar@25854 198
chegar@25854 199 ################################################################################
chegar@25854 200 # Targets for running rmic.
chegar@27560 201 $(eval $(call DeclareRecipesForPhase, RMIC, \
chegar@27560 202 TARGET_SUFFIX := rmic, \
chegar@27560 203 FILE_PREFIX := Rmic, \
chegar@27560 204 MAKE_SUBDIR := rmic, \
chegar@27560 205 CHECK_MODULES := $(ALL_MODULES)))
chegar@25854 206
chegar@25854 207 ALL_TARGETS += $(RMIC_TARGETS)
chegar@25854 208
chegar@25854 209 ################################################################################
chegar@25854 210 # Targets for compiling native libraries
chegar@27560 211 $(eval $(call DeclareRecipesForPhase, LIBS, \
chegar@27560 212 TARGET_SUFFIX := libs, \
chegar@27560 213 FILE_PREFIX := Lib, \
chegar@27560 214 MAKE_SUBDIR := lib, \
chegar@27560 215 CHECK_MODULES := $(ALL_MODULES), \
chegar@27560 216 USE_WRAPPER := true))
chegar@25854 217
chegar@27560 218 ALL_TARGETS += $(LIBS_TARGETS)
chegar@25854 219
chegar@25854 220 ################################################################################
erikj@58633 221 # Targets for compiling static versions of certain native libraries. These do
erikj@58633 222 # not end up in the jmods or the normal JDK image, but are instead bundled into
erikj@58633 223 # a special deliverable.
erikj@58633 224 $(eval $(call DeclareRecipesForPhase, STATIC_LIBS, \
erikj@58633 225 TARGET_SUFFIX := static-libs, \
erikj@58633 226 FILE_PREFIX := Lib, \
erikj@58633 227 MAKE_SUBDIR := lib, \
erikj@58633 228 CHECK_MODULES := $(STATIC_LIBS_MODULES), \
erikj@58633 229 USE_WRAPPER := true, \
erikj@58633 230 EXTRA_ARGS := STATIC_LIBS=true, \
erikj@58633 231 ))
erikj@58633 232
erikj@58633 233 ALL_TARGETS += $(STATIC_LIBS_TARGETS)
erikj@58633 234
erikj@58633 235 ################################################################################
chegar@25854 236 # Targets for compiling native executables
chegar@27560 237 $(eval $(call DeclareRecipesForPhase, LAUNCHER, \
chegar@27560 238 TARGET_SUFFIX := launchers, \
chegar@27560 239 FILE_PREFIX := Launcher, \
chegar@27560 240 MAKE_SUBDIR := launcher, \
chegar@27560 241 CHECK_MODULES := $(ALL_MODULES), \
chegar@27560 242 USE_WRAPPER := true))
chegar@25854 243
chegar@25854 244 ALL_TARGETS += $(LAUNCHER_TARGETS)
chegar@25854 245
chegar@25854 246 ################################################################################
chegar@25854 247 # Build hotspot target
chegar@25854 248
erikj@42510 249 HOTSPOT_VARIANT_TARGETS := $(addprefix hotspot-, $(JVM_VARIANTS))
erikj@42510 250 HOTSPOT_VARIANT_GENSRC_TARGETS := $(addsuffix -gensrc, $(HOTSPOT_VARIANT_TARGETS))
erikj@42510 251 HOTSPOT_VARIANT_LIBS_TARGETS := $(addsuffix -libs, $(HOTSPOT_VARIANT_TARGETS))
erikj@42510 252
erikj@42510 253 define DeclareHotspotGensrcRecipe
erikj@42510 254 hotspot-$1-gensrc:
erikj@42510 255 $$(call LogInfo, Building JVM variant '$1' with features '$(JVM_FEATURES_$1)')
erikj@47217 256 +($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f gensrc/GenerateSources.gmk \
erikj@42510 257 JVM_VARIANT=$1)
erikj@42510 258 endef
erikj@42510 259
erikj@42510 260 $(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotGensrcRecipe,$v)))
erikj@42510 261
erikj@42510 262 define DeclareHotspotLibsRecipe
erikj@42510 263 hotspot-$1-libs:
erikj@47217 264 +($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f lib/CompileLibraries.gmk \
erikj@42510 265 JVM_VARIANT=$1)
erikj@42510 266 endef
erikj@42510 267
erikj@42510 268 $(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotLibsRecipe,$v)))
erikj@42510 269
erikj@37402 270 hotspot-ide-project:
erikj@47217 271 +($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk)
erikj@37402 272
erikj@42510 273 ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
ihse@49888 274 $(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-ide-project
ohair@14111 275
chegar@25854 276 ################################################################################
rwestberg@52851 277 # Generate libs and launcher targets for creating compile_commands.json fragments
rwestberg@52851 278 define DeclareCompileCommandsRecipe
rwestberg@52851 279 $1-compile-commands:
rwestberg@52851 280 $$(call LogInfo, Generating compile_commands.json fragments for $1)
rwestberg@52851 281 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk $1-only \
rwestberg@52851 282 GENERATE_COMPILE_COMMANDS_ONLY=true)
rwestberg@52851 283
rwestberg@52851 284 COMPILE_COMMANDS_TARGETS_$2 += $1-compile-commands
rwestberg@52851 285 endef
rwestberg@52851 286
rwestberg@52851 287 $(foreach t, $(HOTSPOT_VARIANT_LIBS_TARGETS), \
rwestberg@52851 288 $(eval $(call DeclareCompileCommandsRecipe,$t,HOTSPOT)) \
rwestberg@52851 289 )
rwestberg@52851 290
rwestberg@52851 291 $(foreach t, $(LIBS_TARGETS) $(LAUNCHER_TARGETS), \
rwestberg@52851 292 $(eval $(call DeclareCompileCommandsRecipe,$t,JDK)) \
rwestberg@52851 293 )
rwestberg@52851 294
rwestberg@52851 295 compile-commands compile-commands-hotspot:
rwestberg@52851 296 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileCommands.gmk)
rwestberg@52851 297
rwestberg@52851 298 ALL_TARGETS += $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
rwestberg@52851 299 ALL_TARGETS += compile-commands compile-commands-hotspot
rwestberg@52851 300
rwestberg@52851 301 ################################################################################
rwestberg@56548 302 # VS Code projects
rwestberg@56548 303 vscode-project:
rwestberg@56548 304 +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
rwestberg@56548 305 VSCODE_INDEXER=cpptools)
rwestberg@56548 306
rwestberg@56548 307 vscode-project-clangd:
rwestberg@56548 308 +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
rwestberg@56548 309 VSCODE_INDEXER=clangd)
rwestberg@56548 310
rwestberg@56548 311 vscode-project-rtags:
rwestberg@56548 312 +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
rwestberg@56548 313 VSCODE_INDEXER=rtags)
rwestberg@56548 314
rwestberg@56548 315 vscode-project-ccls:
rwestberg@56548 316 +($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
rwestberg@56548 317 VSCODE_INDEXER=ccls)
rwestberg@56548 318
rwestberg@56548 319 ALL_TARGETS += vscode-project vscode-project-clangd vscode-project-rtags \
rwestberg@56548 320 vscode-project-ccls
rwestberg@56548 321
rwestberg@56548 322 ################################################################################
shurailine@44724 323 # Build demos targets
ohair@14111 324
erikj@31310 325 demos-jdk:
erikj@47217 326 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk)
ohair@14111 327
erikj@45096 328 test-image-demos-jdk:
erikj@47217 329 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk images)
erikj@45096 330
erikj@45096 331 ALL_TARGETS += demos-jdk test-image-demos-jdk
ohair@14111 332
chegar@25854 333 ################################################################################
alanb@36506 334 # Jigsaw specific data and analysis targets.
alanb@36506 335
alanb@36506 336 generate-summary:
erikj@47217 337 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateModuleSummary.gmk)
alanb@36506 338
alanb@36506 339 ALL_TARGETS += generate-summary
alanb@36506 340
alanb@36506 341 ################################################################################
alanb@36506 342 # Jmod targets
alanb@36506 343
alanb@36506 344 JMOD_MODULES := $(ALL_MODULES)
alanb@36506 345 JMOD_TARGETS := $(addsuffix -jmod, $(JMOD_MODULES))
alanb@36506 346
alanb@36506 347 define DeclareJmodRecipe
alanb@36506 348 $1-jmod:
erikj@47217 349 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
alanb@36506 350 MODULE=$1)
alanb@36506 351 endef
alanb@36506 352
alanb@36506 353 $(foreach m, $(JMOD_MODULES), $(eval $(call DeclareJmodRecipe,$m)))
alanb@36506 354
alanb@36506 355 ALL_TARGETS += $(JMOD_TARGETS)
alanb@36506 356
alanb@36506 357 ################################################################################
alanb@36506 358 # Images targets
ohair@14111 359
ihse@42282 360 store-source-revision:
erikj@47217 361 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk store-source-revision)
erikj@39110 362
ihse@42282 363 create-source-revision-tracker:
erikj@47217 364 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk create-source-revision-tracker)
ohair@14111 365
ihse@28811 366 BOOTCYCLE_TARGET := product-images
chegar@25854 367 bootcycle-images:
erikj@37980 368 ifneq ($(COMPILE_TYPE), cross)
erikj@37980 369 $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image)
erikj@55729 370 $(call MakeDir, $(OUTPUTDIR)/bootcycle-build)
erikj@47217 371 +$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
erikj@56685 372 LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
erikj@37980 373 else
erikj@37980 374 $(call LogWarn, Boot cycle build disabled when cross compiling)
erikj@37980 375 endif
chegar@25854 376
chegar@27560 377 zip-security:
erikj@47217 378 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
chegar@27560 379
chegar@27560 380 zip-source:
erikj@47217 381 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
chegar@27560 382
chegar@27560 383 jrtfs-jar:
erikj@47217 384 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
chegar@27560 385
erikj@41260 386 jdk-image:
erikj@47217 387 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jdk)
erikj@41260 388
erikj@51103 389 legacy-jre-image:
erikj@47217 390 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jre)
erikj@41260 391
erikj@41260 392 symbols-image:
erikj@47217 393 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk symbols)
chegar@27560 394
erikj@58633 395 static-libs-image:
erikj@58633 396 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f StaticLibsImage.gmk)
erikj@58633 397
erikj@51103 398 mac-jdk-bundle:
erikj@51103 399 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk jdk-bundle)
erikj@51103 400
erikj@51103 401 mac-legacy-jre-bundle:
erikj@51103 402 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk jre-bundle)
chegar@27560 403
erikj@42292 404 release-file:
erikj@47217 405 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ReleaseFile.gmk)
erikj@42292 406
erikj@41171 407 exploded-image-optimize:
erikj@47217 408 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
erikj@41171 409
shurailine@53811 410 ifeq ($(JCOV_ENABLED), true)
shurailine@53811 411 jcov-image:
shurailine@53811 412 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Coverage.gmk jcov-image)
shurailine@53811 413 endif
shurailine@53811 414
ihse@42282 415 ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-images zip-security \
erikj@51103 416 zip-source jrtfs-jar jdk-image legacy-jre-image \
erikj@58633 417 symbols-image static-libs-image mac-jdk-bundle mac-legacy-jre-bundle \
shurailine@53811 418 release-file exploded-image-optimize jcov-image
chegar@25854 419
chegar@25854 420 ################################################################################
chegar@25854 421 # Docs targets
chegar@25854 422
ihse@44726 423 # If building full docs, to complete docs-*-api we need both the javadoc and
ihse@44726 424 # modulegraph targets.
ihse@44726 425 docs-jdk-api-javadoc:
erikj@47217 426 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-api-javadoc)
mchung@44397 427
ihse@44726 428 docs-jdk-api-modulegraph:
erikj@47217 429 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-api-modulegraph)
chegar@25854 430
ihse@44726 431 docs-javase-api-javadoc:
erikj@47217 432 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-javase-api-javadoc)
ihse@44726 433
ihse@44726 434 docs-javase-api-modulegraph:
erikj@47217 435 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-javase-api-modulegraph)
ihse@44725 436
ihse@47563 437 docs-reference-api-javadoc:
ihse@47563 438 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-reference-api-javadoc)
ihse@47563 439
ihse@47563 440 docs-reference-api-modulegraph:
ihse@47563 441 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-reference-api-modulegraph)
ihse@47563 442
ihse@44733 443 docs-jdk-specs:
erikj@47217 444 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-specs)
chegar@25854 445
mchung@45105 446 docs-jdk-index:
erikj@47217 447 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-index)
mchung@45105 448
ihse@41652 449 docs-zip:
erikj@47217 450 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-zip)
neugens@37034 451
dlsmith@57071 452 docs-specs-zip:
dlsmith@57071 453 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-specs-zip)
dlsmith@57071 454
ihse@44078 455 update-build-docs:
erikj@47217 456 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk)
ihse@44078 457
ihse@49564 458 update-x11wrappers:
ihse@49564 459 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateX11Wrappers.gmk)
ihse@49564 460
ihse@44726 461 ALL_TARGETS += docs-jdk-api-javadoc docs-jdk-api-modulegraph \
ihse@47563 462 docs-javase-api-javadoc docs-javase-api-modulegraph \
ihse@47563 463 docs-reference-api-javadoc docs-reference-api-modulegraph docs-jdk-specs \
dlsmith@57071 464 docs-jdk-index docs-zip docs-specs-zip update-build-docs update-x11wrappers
chegar@25854 465
chegar@25854 466 ################################################################################
alanb@36506 467 # Cross compilation support
alanb@36506 468
redestad@37770 469 ifeq ($(CREATING_BUILDJDK), true)
alanb@36506 470 # This target is only called by the recursive call below.
redestad@37770 471 create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \
redestad@37770 472 java.base-copy jdk.jdeps-launchers
alanb@36506 473 endif
alanb@36506 474
erikj@56685 475 BUILDJDK_MODULES := $(sort $(foreach m, jdk.jlink $(INTERIM_IMAGE_MODULES), \
erikj@56685 476 $(call FindTransitiveDepsForModule, $m) $m))
alanb@36506 477
redestad@37770 478 create-buildjdk-interim-image:
erikj@47217 479 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
alanb@36506 480 $@-helper \
alanb@36506 481 SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
alanb@36506 482 HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
erikj@56685 483 CREATING_BUILDJDK=true \
erikj@56685 484 LOG_PREFIX="[buildjdk] " \
erikj@56685 485 JAVA_MODULES="$(BUILDJDK_MODULES)" \
erikj@56685 486 )
alanb@36506 487
redestad@37770 488 ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image
redestad@37770 489
redestad@37770 490 ################################################################################
erikj@41275 491 # The interim-image is a small jlinked image that is used to generate artifacts
redestad@37770 492 # at build time for use when linking the real images.
redestad@37770 493
erikj@41874 494 INTERIM_JMOD_TARGETS := $(addsuffix -interim-jmod, $(INTERIM_IMAGE_MODULES))
erikj@41874 495
erikj@41874 496 define DeclareInterimJmodRecipe
erikj@41874 497 $1-interim-jmod:
erikj@47217 498 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
erikj@41874 499 MODULE=$1 \
erikj@41874 500 JMODS_DIR=$(INTERIM_JMODS_DIR) \
ihse@55232 501 JMODS_SUPPORT_DIR=$(INTERIM_JMODS_DIR)/support \
erikj@41874 502 INTERIM_JMOD=true \
erikj@41874 503 )
erikj@41874 504 endef
erikj@41874 505
erikj@41874 506 $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $(call DeclareInterimJmodRecipe,$m)))
erikj@41874 507
redestad@37770 508 interim-image:
erikj@47217 509 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f InterimImage.gmk)
redestad@37770 510
erikj@38546 511 ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
erikj@41874 512 generate-link-opt-data:
erikj@47217 513 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateLinkOptData.gmk)
erikj@38546 514 endif
redestad@37770 515
erikj@41874 516 ALL_TARGETS += $(INTERIM_JMOD_TARGETS) interim-image generate-link-opt-data
alanb@36506 517
alanb@36506 518 ################################################################################
ihse@44027 519 # Generate test names for all JTReg test groups
ihse@44027 520 #
ihse@44027 521
ihse@44027 522 define DeclareRunTestRecipe
ihse@53271 523 test-$1:
ihse@54546 524 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
ihse@54546 525 TEST="$1")
ihse@44027 526
ihse@53271 527 exploded-test-$1:
ihse@54546 528 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
erikj@45266 529 TEST="$1" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
ihse@44027 530 endef
ihse@44027 531
ihse@44027 532 # ALL_NAMED_TESTS is defined in FindTests.gmk
ihse@44027 533 $(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t)))
ihse@53271 534 ALL_TEST_TARGETS := $(addprefix test-, $(ALL_NAMED_TESTS))
ihse@53375 535
ihse@53375 536 # We only support the "exploded-test-gtest" shortcut
ihse@53375 537 ALL_EXPLODED_TESTS := gtest
ihse@53375 538 ALL_EXPLODED_TEST_TARGETS := $(addprefix exploded-test-, $(ALL_EXPLODED_TESTS))
ihse@44027 539
ihse@54546 540 ALL_TARGETS += $(ALL_TEST_TARGETS) $(ALL_EXPLODED_TEST_TARGETS)
ihse@44027 541
ihse@44027 542 ################################################################################
redestad@53563 543 # Build tests and microbenchmarks
ihse@29156 544 #
chegar@25854 545
ihse@29156 546 prepare-test-image:
ihse@48181 547 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f TestImage.gmk prepare-test-image)
ihse@29156 548
ihse@29156 549 build-test-hotspot-jtreg-native:
erikj@47217 550 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeHotspot.gmk \
ihse@29156 551 build-test-hotspot-jtreg-native)
ihse@29156 552
ihse@29156 553 test-image-hotspot-jtreg-native:
erikj@47217 554 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeHotspot.gmk \
ihse@29156 555 test-image-hotspot-jtreg-native)
ihse@29156 556
ihse@29156 557 build-test-jdk-jtreg-native:
erikj@47217 558 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeJdk.gmk \
ihse@29156 559 build-test-jdk-jtreg-native)
ihse@29156 560
ihse@29156 561 test-image-jdk-jtreg-native:
erikj@47217 562 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeJdk.gmk \
ihse@29156 563 test-image-jdk-jtreg-native)
ihse@29156 564
epavlova@51569 565 build-test-hotspot-jtreg-graal:
epavlova@51569 566 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregGraalUnit.gmk \
epavlova@51569 567 build-test-hotspot-jtreg-graal)
epavlova@51569 568
epavlova@51569 569 test-image-hotspot-jtreg-graal:
epavlova@51569 570 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregGraalUnit.gmk \
epavlova@51569 571 test-image-hotspot-jtreg-graal)
epavlova@51569 572
iignatyev@37967 573 ifeq ($(BUILD_GTEST), true)
iignatyev@37967 574 test-image-hotspot-gtest:
erikj@47217 575 +($(CD) $(TOPDIR)/make/hotspot/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk)
iignatyev@37967 576 endif
iignatyev@37967 577
ihse@32562 578 build-test-lib:
ihse@32562 579 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk)
ihse@32562 580
erikj@37035 581 ifeq ($(BUILD_FAILURE_HANDLER), true)
erikj@37035 582 # Builds the failure handler jtreg extension
erikj@37035 583 build-test-failure-handler:
erikj@37031 584 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
erikj@37031 585 -f BuildFailureHandler.gmk build)
erikj@37031 586
erikj@37035 587 # Copies the failure handler jtreg extension into the test image
erikj@37035 588 test-image-failure-handler:
erikj@37031 589 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
erikj@37031 590 -f BuildFailureHandler.gmk images)
erikj@37035 591 endif
erikj@37031 592
redestad@53563 593 build-microbenchmark:
redestad@53563 594 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f test/BuildMicrobenchmark.gmk)
redestad@53563 595
ihse@29156 596 ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
ihse@29156 597 test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
erikj@37031 598 test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \
ihse@44027 599 test-failure-handler test-image-failure-handler test-image-hotspot-gtest \
redestad@53563 600 test-image-hotspot-jtreg-graal build-test-hotspot-jtreg-graal \
redestad@53563 601 build-microbenchmark
ihse@29156 602
ihse@29156 603 ################################################################################
ihse@29156 604 # Run tests
ihse@29156 605
chegar@25854 606 test:
ihse@54546 607 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
ihse@54546 608 TEST="$(TEST)")
ihse@29156 609
ihse@53271 610 exploded-test:
ihse@54546 611 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
ihse@53271 612 TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
ehelin@33566 613
shurailine@54359 614 jcov-test:
shurailine@54359 615 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
shurailine@54359 616 TEST="$(TEST)" TEST_OPTS_JCOV=true)
shurailine@54359 617
shurailine@54359 618 ALL_TARGETS += test exploded-test jcov-test
chegar@25854 619
chegar@25854 620 ################################################################################
erikj@37972 621 # Bundles
erikj@37972 622
erikj@37972 623 product-bundles:
erikj@37972 624 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles)
erikj@37972 625
clanger@55622 626 legacy-bundles:
clanger@55622 627 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk legacy-bundles)
clanger@55622 628
erikj@37972 629 test-bundles:
erikj@37972 630 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk test-bundles)
erikj@37972 631
erikj@37972 632 docs-bundles:
erikj@37972 633 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles)
erikj@37972 634
erikj@58633 635 static-libs-bundles:
erikj@58633 636 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk static-libs-bundles)
erikj@58633 637
shurailine@53811 638 ifeq ($(JCOV_ENABLED), true)
shurailine@53811 639 jcov-bundles:
shurailine@53811 640 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk jcov-bundles)
shurailine@53811 641 endif
shurailine@53811 642
erikj@58633 643 ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles \
erikj@58633 644 static-libs-bundles jcov-bundles
erikj@37972 645
erikj@37972 646 ################################################################################
chegar@25854 647 # Install targets
chegar@25854 648
chegar@25854 649 install:
erikj@47217 650 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Install.gmk)
chegar@25854 651
chegar@25854 652 ALL_TARGETS += install
chegar@25854 653
chegar@25854 654 ################################################################################
chegar@25854 655 #
ihse@27595 656 # Dependency declarations between targets.
chegar@25854 657 #
ihse@27595 658 # These are declared in two groups. First all dependencies between targets that
chegar@25854 659 # have recipes above as these dependencies may be disabled. Then the aggregator
chegar@25854 660 # targets that do not have recipes of their own, which will never have their
chegar@25854 661 # dependencies disabled.
chegar@25854 662 #
chegar@25854 663 ################################################################################
chegar@25854 664 # Targets with recipes above
chegar@25854 665
ihse@27595 666 # If running an *-only target, parallel execution and dependencies between
ihse@27595 667 # recipe targets are disabled. This makes it possible to run a select set of
chegar@25854 668 # recipe targets in order. It's the responsibility of the user to make sure
ihse@27595 669 # all prerequisites are fulfilled.
chegar@25854 670 ifneq ($(findstring -only, $(MAKECMDGOALS)), )
chegar@25854 671 .NOTPARALLEL:
chegar@25854 672 else
chegar@27560 673 $(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools
chegar@27560 674
erikj@47474 675 interim-langtools: $(INTERIM_LANGTOOLS_GENSRC_TARGETS)
chegar@25854 676
naoto@57445 677 buildtools-jdk: interim-langtools interim-cldrconverter interim-tzdb
chegar@25854 678
kvn@42531 679 buildtools-hotspot: interim-langtools
kvn@42531 680
erikj@41171 681 buildtools-modules: exploded-image-base
erikj@41171 682
kvn@42531 683 $(HOTSPOT_GENSRC_TARGETS): interim-langtools buildtools-hotspot
twisti@33045 684
chegar@27560 685 $(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
chegar@25854 686
alanb@36506 687 $(GENSRC_MODULEINFO_TARGETS): buildtools-jdk
alanb@36506 688
chegar@27560 689 $(GENDATA_TARGETS): interim-langtools buildtools-jdk
chegar@25854 690
chegar@25854 691 interim-rmic: interim-langtools
chegar@25854 692
erikj@32806 693 $(RMIC_TARGETS): interim-langtools interim-rmic
chegar@25854 694
erikj@31310 695 $(JAVA_TARGETS): interim-langtools
erikj@31310 696
erikj@42510 697 # Declare dependencies between hotspot-<variant>* targets
erikj@42510 698 $(foreach v, $(JVM_VARIANTS), \
ihse@53839 699 $(eval hotspot-$v-gensrc: java.base-copy) \
psandoz@48610 700 $(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
erikj@42510 701 )
erikj@42510 702
erikj@37402 703 hotspot-ide-project: hotspot exploded-image
erikj@37402 704
bobv@33562 705 generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
bobv@33562 706
erikj@49349 707 # If not already set, set the JVM variant target so that the JVM will be built.
erikj@49349 708 JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
erikj@49349 709
erikj@42510 710 # Building one JVM variant is enough to start building the other libs
erikj@49349 711 $(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
chegar@25854 712
chegar@25854 713 $(LAUNCHER_TARGETS): java.base-libs
chegar@25854 714
bobv@33562 715 ifeq ($(STATIC_BUILD), true)
bobv@33562 716 $(LAUNCHER_TARGETS): generate-exported-symbols
bobv@33562 717 endif
bobv@33562 718
erikj@26115 719 # The demos are currently linking to libjvm and libjava, just like all other
erikj@26115 720 # jdk libs, even though they don't need to. To avoid warnings, make sure they
erikj@26115 721 # aren't built until after libjava and libjvm are available to link to.
erikj@56685 722 demos-jdk: java.base-libs exploded-image
erikj@45096 723 test-image-demos-jdk: demos-jdk
chegar@25854 724
chegar@25854 725 # Declare dependency from <module>-java to <module>-gensrc
chegar@25854 726 $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
chegar@25854 727
chegar@25854 728 # Declare dependencies between java modules
chegar@25854 729 $(foreach m, $(JAVA_MODULES), \
chegar@25854 730 $(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \
chegar@25854 731 $(call FindDepsForModule,$m)))))
erikj@58077 732 # Declare dependencies between the module meta targets
erikj@58077 733 $(foreach m, $(ALL_MODULES), $(eval $m: $(call FindDepsForModule,$m)))
chegar@25854 734
chegar@25854 735 # Declare dependencies between <module>-rmic to <module>-java
chegar@25854 736 $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
chegar@25854 737
chegar@25854 738 # Declare dependencies from <module>-lib to <module>-java
redestad@37770 739 # Skip modules that do not have java source.
erikj@56685 740 $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
chegar@25854 741
chegar@25854 742 # Declare dependencies from all other <module>-lib to java.base-lib
chegar@27560 743 $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
chegar@25854 744 $(eval $t: java.base-libs))
chegar@25854 745
ptbrunet@29851 746 # jdk.accessibility depends on java.desktop
ptbrunet@29851 747 jdk.accessibility-libs: java.desktop-libs
ptbrunet@29851 748
ihse@27595 749 # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
chegar@27560 750 # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
chegar@27560 751 # virtual target.
chegar@27560 752 jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
chegar@27560 753
erikj@26672 754 # The swing beans need to have java base properly generated to avoid errors
psandoz@48610 755 # in javadoc. The X11 wrappers need the java.base include files to have been
psandoz@48610 756 # copied and processed.
psandoz@48610 757 java.desktop-gensrc-src: java.base-gensrc java.base-copy
erikj@26672 758
dlong@53412 759 # The annotation processing for jdk.internal.vm.compiler
dlong@53412 760 # and jdk.internal.vm.compiler.management needs classes from the current JDK.
erikj@47217 761 jdk.internal.vm.compiler-gensrc-src: $(addsuffix -java, \
kvn@43925 762 $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler))
dlong@53412 763 jdk.internal.vm.compiler.management-gensrc-src: $(addsuffix -java, \
dlong@53412 764 $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler.management))
kvn@42531 765
dlong@53412 766 # For these modules, the gensrc step is generating a module-info.java.extra
kvn@42531 767 # file to be processed by the gensrc-moduleinfo target.
erikj@47217 768 jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src
dlong@53412 769 jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src
kvn@42531 770
mchung@30742 771 jdk.jdeps-gendata: java rmic
mchung@26132 772
jlahoda@45873 773 # The ct.sym generation uses all the moduleinfos as input
jlahoda@45873 774 jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS)
jlahoda@45873 775
mchung@42285 776 # Declare dependencies between jmod targets.
mchung@42285 777 # java.base jmod needs jrt-fs.jar and access to the other jmods to be built.
erikj@56685 778 # When creating the BUILDJDK, we don't need to add hashes to java.base, thus
redestad@37770 779 # we don't need to depend on all other jmods
redestad@37770 780 ifneq ($(CREATING_BUILDJDK), true)
erikj@43655 781 java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
redestad@37770 782 endif
alanb@36506 783
erikj@49349 784 # If not already set, set the JVM target so that the JVM will be built.
erikj@49349 785 JVM_MAIN_TARGETS ?= hotspot
ihse@49564 786
erikj@49349 787 # Building java.base-jmod requires all of VM (ie hotspot) to be built.
ihse@49564 788 java.base-jmod: $(JVM_MAIN_TARGETS)
erikj@42510 789
alanb@36506 790 # Declare dependencies from <module>-jmod to all other module targets
erikj@56685 791 $(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java))
erikj@41874 792 $(foreach m, $(GENDATA_MODULES), $(eval $m_JMOD_DEPS += $m-gendata))
erikj@41874 793 $(foreach m, $(RMIC_MODULES), $(eval $m_JMOD_DEPS += $m-rmic))
erikj@41874 794 $(foreach m, $(LIBS_MODULES), $(eval $m_JMOD_DEPS += $m-libs))
erikj@41874 795 $(foreach m, $(LAUNCHER_MODULES), $(eval $m_JMOD_DEPS += $m-launchers))
erikj@41874 796 $(foreach m, $(COPY_MODULES), $(eval $m_JMOD_DEPS += $m-copy))
erikj@41874 797 $(foreach m, $(ALL_MODULES), $(eval $m-jmod: $($(m)_JMOD_DEPS)))
erikj@41874 798 $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $m-interim-jmod: $($(m)_JMOD_DEPS)))
alanb@36506 799
rwestberg@52851 800 # Setup the minimal set of generated native source dependencies for hotspot
rwestberg@52851 801 $(foreach v, $(JVM_VARIANTS), \
rwestberg@52851 802 $(eval hotspot-$v-libs-compile-commands: hotspot-$v-gensrc) \
rwestberg@52851 803 $(foreach m, $(filter java.desktop jdk.hotspot.agent, $(GENSRC_MODULES)), \
rwestberg@52851 804 $(eval hotspot-$v-libs-compile-commands: $m-gensrc)) \
rwestberg@52851 805 )
rwestberg@52851 806
rwestberg@52851 807 # For the full JDK compile commands, create all possible generated sources
rwestberg@52851 808 $(foreach m, $(GENSRC_MODULES), $(eval $m-libs-compile-commands: $m-gensrc))
rwestberg@52851 809 $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs-compile-commands: $m-java))
rwestberg@52851 810
rwestberg@54886 811 $(COMPILE_COMMANDS_TARGETS_HOTSPOT): clean-compile-commands
rwestberg@54886 812 $(COMPILE_COMMANDS_TARGETS_JDK): clean-compile-commands
rwestberg@52851 813 compile-commands-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT)
rwestberg@52851 814 compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
rwestberg@52851 815
rwestberg@56548 816 vscode-project: compile-commands
rwestberg@56548 817 vscode-project-clangd: compile-commands
rwestberg@56548 818 vscode-project-rtags: compile-commands
rwestberg@56548 819 vscode-project-ccls: compile-commands
rwestberg@56548 820
erikj@58633 821 # The -static-libs targets depend on -java as well as java.base-copy.
erikj@58633 822 $(foreach m, $(filter $(JAVA_MODULES), $(STATIC_LIBS_MODULES)), \
erikj@58633 823 $(eval $m-static-libs: $m-java java.base-copy))
erikj@58633 824
erikj@41275 825 # Jmods cannot be created until we have the jmod tool ready to run. During
erikj@41275 826 # a normal build we run it from the exploded image, but when cross compiling
erikj@41275 827 # it's run from the buildjdk, which is either created at build time or user
erikj@41275 828 # supplied.
alanb@36506 829 ifeq ($(CREATE_BUILDJDK), true)
redestad@37770 830 ifneq ($(CREATING_BUILDJDK), true)
erikj@56685 831 # When cross compiling and buildjdk is to be created, simply depend on
erikj@56685 832 # creating the buildjdk.
redestad@37770 833 $(JMOD_TARGETS): create-buildjdk
erikj@41171 834 buildtools-modules: create-buildjdk
erikj@41275 835 else
erikj@56685 836 # While actually creating the buildjdk, we need to list the bare
erikj@56685 837 # minimum dependencies needed before running jmod, to avoid building
erikj@56685 838 # more than necessary. This includes:
erikj@56685 839 # * all java modules
erikj@56685 840 # * jdk.jlink-launchers
erikj@56685 841 # * copy jvm.cfg (done in java.base-copy)
erikj@56685 842 # * tzdb.dat (done in java.base-gendata)
erikj@56685 843 # Without all of these jimage, jlink and jmod won't start.
erikj@56685 844 $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): java.base-libs java.base-copy \
erikj@56685 845 java.base-gendata jdk.jlink-launchers java
redestad@37770 846 endif
erikj@41275 847 else
erikj@56685 848 # The normal non cross compilation case uses needs to wait for the full
erikj@56685 849 # exploded-image to avoid a race with the optimize target.
erikj@56685 850 $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): exploded-image
alanb@36506 851 endif
alanb@36506 852
mchung@42505 853 # All modules include the main license files from java.base.
mchung@42505 854 $(JMOD_TARGETS): java.base-copy
mchung@42505 855
chegar@27560 856 zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
chegar@27560 857 $(filter jdk.crypto%, $(JAVA_TARGETS))
chegar@25854 858
chegar@27560 859 zip-source: gensrc rmic
chegar@25854 860
alanb@36506 861 jrtfs-jar: interim-langtools
chegar@25854 862
redestad@53575 863 build-microbenchmark: interim-langtools exploded-image
redestad@53563 864
erikj@38546 865 ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
erikj@38546 866 ifeq ($(CREATE_BUILDJDK), true)
erikj@38546 867 # If creating a buildjdk, the interim image needs to be based on that.
erikj@41874 868 generate-link-opt-data: create-buildjdk
erikj@38546 869 else ifeq ($(EXTERNAL_BUILDJDK), false)
erikj@38546 870 # If an external buildjdk has been provided, we skip generating an
erikj@38546 871 # interim-image and just use the external buildjdk for generating
erikj@38546 872 # classlist.
erikj@41874 873 generate-link-opt-data: interim-image
erikj@38546 874 endif
erikj@41874 875 generate-link-opt-data: buildtools-jdk
erikj@38546 876
erikj@41874 877 # The generated classlist needs to go into java.base-jmod.
erikj@51103 878 java.base-jmod jdk.jlink-jmod jdk-image legacy-jre-image: generate-link-opt-data
redestad@37770 879 endif
redestad@37770 880
erikj@42292 881 release-file: create-source-revision-tracker
chegar@25854 882
shurailine@44724 883 jdk-image: jmods zip-source demos release-file
erikj@51103 884 legacy-jre-image: jmods release-file
erikj@42506 885 symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS)
erikj@42292 886
erikj@58633 887 static-libs-image: $(STATIC_LIBS_TARGETS)
erikj@58633 888
erikj@51103 889 mac-jdk-bundle: jdk-image
erikj@51103 890 mac-legacy-jre-bundle: legacy-jre-image
chegar@25854 891
shurailine@53811 892 ifeq ($(JCOV_INPUT_JDK), )
shurailine@53811 893 jcov-image: jdk-image
shurailine@53811 894 endif
shurailine@53811 895
erikj@41275 896 # The optimize target can run as soon as the modules dir has been completely
erikj@41275 897 # populated (java, copy and gendata targets) and the basic libs and launchers
erikj@41275 898 # have been built.
erikj@41275 899 exploded-image-optimize: java copy gendata java.base-libs java.base-launchers \
erikj@41275 900 buildtools-modules
erikj@41171 901
erikj@41260 902 bootcycle-images: jdk-image
chegar@25854 903
ihse@44726 904 docs-jdk-api-javadoc: $(GENSRC_TARGETS) rmic
mchung@44397 905
ihse@44726 906 docs-javase-api-javadoc: $(GENSRC_TARGETS) rmic
chegar@25854 907
ihse@47563 908 docs-reference-api-javadoc: $(GENSRC_TARGETS) rmic
ihse@47563 909
ihse@44726 910 docs-jdk-api-modulegraph: exploded-image buildtools-modules
ihse@44726 911
ihse@44726 912 docs-javase-api-modulegraph: exploded-image buildtools-modules
ihse@44725 913
ihse@47563 914 docs-reference-api-modulegraph: exploded-image buildtools-modules
ihse@47563 915
erikj@49349 916 # If not already set, then set the JVM specific docs targets
erikj@49349 917 JVM_DOCS_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
ihse@49564 918
ihse@44733 919 # The gensrc steps for hotspot and jdk.jdi create html spec files.
jjg@56473 920 docs-jdk-specs: buildtools-jdk $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
ihse@45229 921 docs-jdk-index
chegar@25854 922
ihse@44733 923 docs-zip: docs-jdk
erikj@37649 924
dlsmith@57071 925 docs-specs-zip: docs-jdk-specs
dlsmith@57071 926
ihse@53271 927 # Tests
erikj@41260 928 test: jdk-image test-image
chegar@25854 929
ihse@53271 930 exploded-test: exploded-image test-image
ihse@53271 931
shurailine@54359 932 jcov-test: jcov-image test-image
shurailine@54359 933
ihse@53271 934 test-make: clean-test-make compile-commands
ihse@53271 935
ihse@53271 936 test-make-compile-commands: compile-commands
ihse@44027 937
ihse@44027 938 # Declare dependency for all generated test targets
ihse@53271 939 $(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
ihse@53375 940 $(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
ihse@44027 941
erikj@41874 942 interim-image: $(INTERIM_JMOD_TARGETS)
chegar@25854 943
erikj@56685 944 build-test-lib: exploded-image
erikj@33436 945
erikj@37031 946 build-test-failure-handler: interim-langtools
erikj@37031 947
erikj@37031 948 test-image-failure-handler: build-test-failure-handler
erikj@37031 949
erikj@42510 950 build-test-hotspot-jtreg-native: buildtools-jdk \
erikj@42510 951 hotspot-$(JVM_VARIANT_MAIN)-libs
erikj@29159 952
redestad@45555 953 build-test-jdk-jtreg-native: buildtools-jdk java.base-libs
erikj@29159 954
erikj@56685 955 build-test-hotspot-jtreg-graal: exploded-image
epavlova@51569 956
ihse@29156 957 test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
ihse@29156 958
ihse@29156 959 test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
ihse@29156 960
epavlova@51569 961 test-image-hotspot-jtreg-graal: build-test-hotspot-jtreg-graal
epavlova@51569 962
iignatyev@37967 963 test-image-hotspot-gtest: hotspot
iignatyev@37967 964
erikj@33722 965 install: product-images
erikj@33722 966
erikj@37972 967 product-bundles: product-images
erikj@37972 968
clanger@55622 969 legacy-bundles: legacy-images
clanger@55622 970
erikj@37972 971 test-bundles: test-image
erikj@37972 972
erikj@37972 973 docs-bundles: docs-image
erikj@37972 974
shurailine@53811 975 jcov-bundles: jcov-image
shurailine@53811 976
erikj@58633 977 static-libs-bundles: static-libs-image
erikj@58633 978
erikj@41171 979 generate-summary: jmods buildtools-modules
alanb@36506 980
ihse@49564 981 update-x11wrappers: java.base-copy buildtools-jdk
ihse@49564 982
chegar@25854 983 endif
chegar@25854 984
chegar@25854 985 ################################################################################
chegar@25854 986 # Virtual targets without recipes
chegar@25854 987
erikj@49349 988 # If not already set, set the JVM specific tools targets
erikj@49349 989 JVM_TOOLS_TARGETS ?= buildtools-hotspot
erikj@32806 990 buildtools: buildtools-langtools interim-langtools interim-rmic \
erikj@49349 991 buildtools-jdk $(JVM_TOOLS_TARGETS)
chegar@27560 992
erikj@55696 993 # Declare dependencies from hotspot-<variant> targets
erikj@55696 994 $(foreach v, $(JVM_VARIANTS), \
erikj@55696 995 $(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
erikj@55696 996 )
ihse@49888 997 hotspot: $(HOTSPOT_VARIANT_TARGETS)
erikj@42510 998
erikj@42510 999 # Create targets hotspot-libs and hotspot-gensrc.
erikj@42510 1000 $(foreach v, $(JVM_VARIANTS), \
erikj@42510 1001 $(eval hotspot-libs: hotspot-$v-libs) \
erikj@42510 1002 $(eval hotspot-gensrc: hotspot-$v-gensrc) \
erikj@42510 1003 )
erikj@42510 1004
chegar@25854 1005 gensrc: $(GENSRC_TARGETS)
chegar@25854 1006
chegar@25854 1007 gendata: $(GENDATA_TARGETS)
chegar@25854 1008
alanb@36506 1009 copy: $(ALL_COPY_TARGETS)
chegar@25854 1010
chegar@25854 1011 java: $(JAVA_TARGETS)
chegar@25854 1012
chegar@25854 1013 rmic: $(RMIC_TARGETS)
chegar@25854 1014
chegar@27560 1015 libs: $(LIBS_TARGETS)
chegar@25854 1016
erikj@58633 1017 static-libs: $(STATIC_LIBS_TARGETS)
erikj@58633 1018
chegar@25854 1019 launchers: $(LAUNCHER_TARGETS)
chegar@25854 1020
alanb@36506 1021 jmods: $(JMOD_TARGETS)
alanb@36506 1022
chegar@27560 1023 # Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
chegar@27560 1024 # is actually handled by jdk.jdi-gensrc
chegar@27560 1025 jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
chegar@25854 1026
chegar@25854 1027 # Declare dependencies from <module> to all the individual targets specific
erikj@34102 1028 # to that module <module>-*, that are needed for the exploded image.
chegar@25854 1029 $(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
chegar@25854 1030 $(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
chegar@25854 1031 $(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
chegar@25854 1032 $(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
chegar@27560 1033 $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
chegar@25854 1034 $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
alanb@36506 1035 $(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
erikj@42510 1036
erikj@42510 1037 # Building java.base includes building all of hotspot.
erikj@49349 1038 java.base: $(JVM_MAIN_TARGETS)
erikj@42510 1039
erikj@31310 1040 demos: demos-jdk
erikj@31310 1041
ihse@47275 1042 # The "exploded image" is a locally runnable JDK in $(OUTPUTDIR)/jdk.
erikj@41171 1043 exploded-image-base: $(ALL_MODULES)
erikj@42292 1044 exploded-image: exploded-image-base release-file
erikj@41275 1045 # When cross compiling, no need to optimize the exploded image since it won't
erikj@41275 1046 # be runnable on the host platform anyway.
erikj@41275 1047 ifneq ($(COMPILE_TYPE), cross)
erikj@41275 1048 exploded-image: exploded-image-optimize
erikj@41275 1049 endif
chegar@25854 1050
erikj@56685 1051 create-buildjdk: create-buildjdk-interim-image
alanb@36506 1052
ihse@44726 1053 docs-jdk-api: docs-jdk-api-javadoc
ihse@44726 1054 docs-javase-api: docs-javase-api-javadoc
ihse@47563 1055 docs-reference-api: docs-reference-api-javadoc
ihse@44726 1056
ihse@44726 1057 # If we're building full docs, we must also generate the module graphs to
ihse@44726 1058 # get non-broken api documentation.
ihse@44726 1059 ifeq ($(ENABLE_FULL_DOCS), true)
ihse@44726 1060 docs-jdk-api: docs-jdk-api-modulegraph
ihse@44726 1061 docs-javase-api: docs-javase-api-modulegraph
ihse@47563 1062 docs-reference-api: docs-reference-api-modulegraph
ihse@44726 1063 endif
ihse@44726 1064
mchung@45105 1065 docs-jdk: docs-jdk-api docs-jdk-specs docs-jdk-index
ihse@44726 1066 docs-javase: docs-javase-api
ihse@47563 1067 docs-reference: docs-reference-api
ihse@44726 1068
ihse@44726 1069 # alias for backwards compatibility
ihse@44726 1070 docs-javadoc: docs-jdk-api
ihse@44726 1071
erikj@51103 1072 mac-bundles: mac-jdk-bundle
erikj@31310 1073
ihse@47275 1074 # The $(OUTPUTDIR)/images directory contain the resulting deliverables,
ihse@28811 1075 # and in line with this, our targets for creating these are named *-image[s].
ihse@28811 1076
erikj@51103 1077 # This target builds the product images, e.g. the JDK image
ihse@28811 1078 # (and possibly other, more specific versions)
erikj@51103 1079 product-images: jdk-image symbols-image exploded-image
erikj@41260 1080
clanger@55622 1081 # This target builds the legacy images, e.g. the legacy JRE image
clanger@55622 1082 legacy-images: legacy-jre-image
clanger@55622 1083
erikj@41260 1084 # zip-security is actually a bundle, but for now it needs to be considered
erikj@41260 1085 # an image until this can be cleaned up properly.
erikj@41260 1086 product-images: zip-security
alanb@36506 1087
redestad@37770 1088 # The module summary cannot be run when:
redestad@37770 1089 # * Cross compiling and building a partial BUILDJDK for the build host
redestad@37770 1090 # * An external buildjdk has been supplied since it may not match the
redestad@37770 1091 # module selection of the target jdk
alanb@36506 1092 ifneq ($(CREATE_BUILDJDK), true)
redestad@37770 1093 ifeq ($(EXTERNAL_BUILDJDK), false)
redestad@37770 1094 product-images: generate-summary
redestad@37770 1095 endif
alanb@36506 1096 endif
chegar@25854 1097
ihse@54800 1098 ifeq ($(call isTargetOs, macosx), true)
erikj@51103 1099 product-images: mac-jdk-bundle
clanger@55622 1100
clanger@55622 1101 legacy-images: mac-legacy-jre-bundle
chegar@27560 1102 endif
chegar@25854 1103
ihse@28811 1104 # This target builds the documentation image
ihse@44733 1105 docs-image: docs-jdk
chegar@25854 1106
erikj@49349 1107 # If not already set, set the JVM specific targets to build the test image
erikj@49349 1108 JVM_TEST_IMAGE_TARGETS ?= test-image-hotspot-jtreg-native test-image-hotspot-gtest
erikj@49349 1109
epavlova@51569 1110 ifeq ($(INCLUDE_GRAAL), true)
epavlova@51569 1111 JVM_TEST_IMAGE_TARGETS += test-image-hotspot-jtreg-graal
epavlova@51569 1112 endif
epavlova@51569 1113
ihse@28811 1114 # This target builds the test image
erikj@49349 1115 test-image: prepare-test-image \
erikj@49349 1116 test-image-jdk-jtreg-native test-image-failure-handler \
erikj@49349 1117 test-image-demos-jdk $(JVM_TEST_IMAGE_TARGETS)
erikj@49349 1118
redestad@53563 1119 ifneq ($(JMH_CORE_JAR), )
redestad@53563 1120 test-image: build-microbenchmark
redestad@53563 1121 endif
redestad@53563 1122
erikj@49349 1123 ################################################################################
ihse@28285 1124
erikj@37972 1125 # all-images builds all our deliverables as images.
ihse@28811 1126 all-images: product-images test-image docs-image
ihse@28811 1127
erikj@37972 1128 # all-bundles packages all our deliverables as tar.gz bundles.
erikj@58633 1129 all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
erikj@37972 1130
erikj@42510 1131 ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
erikj@58633 1132 copy java rmic libs static-libs launchers jmods \
shurailine@44724 1133 jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
erikj@41171 1134 exploded-image-base exploded-image \
ihse@47563 1135 create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
clanger@55622 1136 docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \
erikj@43043 1137 docs-image test-image all-images \
erikj@37972 1138 all-bundles
chegar@25854 1139
chegar@25854 1140 ################################################################################
chegar@25854 1141
ihse@28811 1142 # Traditional targets typically run by users.
ihse@28811 1143 # These can be considered aliases for the targets now named by a more
ihse@28811 1144 # "modern" naming scheme.
erikj@34491 1145 default: $(DEFAULT_MAKE_TARGET)
ihse@28811 1146 jdk: exploded-image
ihse@28811 1147 images: product-images
ihse@28811 1148 docs: docs-image
erikj@37972 1149 bundles: all-bundles
ihse@28811 1150 all: all-images
chegar@25854 1151
erikj@37972 1152 ALL_TARGETS += default jdk images docs bundles all
chegar@25854 1153
ihse@53271 1154 # Aliases used for running tests.
ihse@53271 1155
ihse@53271 1156 # Let "run-test" be an alias for "test"
ihse@53271 1157 $(foreach t, $(ALL_NAMED_TESTS), $(eval run-test-$t: test-$t))
ihse@53375 1158 RUN_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS))
ihse@53271 1159
ihse@53271 1160 run-test: test
ihse@53271 1161 exploded-run-test: exploded-test
ihse@53271 1162
ihse@53271 1163 # "make check" is a common idiom for running basic testing
ihse@53271 1164 check: test-tier1
ihse@53271 1165
ihse@53271 1166 # Keep some old names as aliases
ihse@53271 1167 test-hotspot-jtreg: test-hotspot_all
ihse@53271 1168 test-hotspot-jtreg-native: test-hotspot_native_sanity
ihse@53271 1169 test-hotspot-gtest: exploded-test-gtest
ihse@53271 1170 test-jdk-jtreg-native: test-jdk_native_sanity
ihse@53271 1171
ihse@53271 1172 ALL_TARGETS += $(RUN_TEST_TARGETS) run-test exploded-run-test check \
ihse@53271 1173 test-hotspot-jtreg test-hotspot-jtreg-native test-hotspot-gtest \
ihse@53271 1174 test-jdk-jtreg-native
ihse@53271 1175
chegar@25854 1176 ################################################################################
chegar@25854 1177 ################################################################################
chegar@25854 1178 #
chegar@25854 1179 # Clean targets
chegar@25854 1180 #
chegar@25854 1181 ################################################################################
ihse@27595 1182 # Clean targets are automatically run serially by the Makefile calling this
erikj@26398 1183 # file.
chegar@25854 1184
chegar@27560 1185 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
ihse@55232 1186 images make-support test-make bundles buildjdk test-results test-support \
ihse@55232 1187 support/images
chegar@27560 1188 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
ihse@33437 1189 CLEAN_SUPPORT_DIRS += demos
ihse@33437 1190 CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
ihse@32562 1191 CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
ihse@29156 1192 CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
ihse@41652 1193 CLEAN_PHASES := gensrc java native include
chegar@27560 1194 CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
chegar@27560 1195 CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
chegar@27560 1196 # Construct targets of the form clean-$module-$phase
chegar@27560 1197 CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \
chegar@27560 1198 $(addprefix $m-, $(CLEAN_PHASES))))
ohair@14111 1199
ohair@14111 1200 # Remove everything, except the output from configure.
chegar@27560 1201 clean: $(CLEAN_DIR_TARGETS)
rwestberg@52851 1202 ($(CD) $(OUTPUTDIR) && $(RM) -r build*.log* compile_commands.json)
chegar@25854 1203 $(ECHO) Cleaned all build artifacts.
chegar@25854 1204
ihse@41652 1205 clean-docs:
ihse@41652 1206 $(call CleanDocs)
ihse@41652 1207
rwestberg@54886 1208 clean-compile-commands:
rwestberg@54886 1209 $(call CleanMakeSupportDir,compile-commands)
rwestberg@54886 1210
chegar@27560 1211 $(CLEAN_DIR_TARGETS):
chegar@27560 1212 $(call CleanDir,$(patsubst clean-%, %, $@))
chegar@27560 1213
ihse@33437 1214 $(CLEAN_SUPPORT_DIR_TARGETS):
ihse@33437 1215 $(call CleanSupportDir,$(patsubst clean-%, %, $@))
ihse@33437 1216
ihse@29156 1217 $(CLEAN_TEST_TARGETS):
ihse@29156 1218 $(call CleanTest,$(patsubst clean-test-%, %, $@))
ihse@29156 1219
chegar@27560 1220 $(CLEAN_PHASE_TARGETS):
chegar@27560 1221 $(call Clean-$(patsubst clean-%,%, $@))
chegar@27560 1222
chegar@27560 1223 $(CLEAN_MODULE_TARGETS):
chegar@27560 1224 $(call CleanModule,$(patsubst clean-%, %, $@))
chegar@27560 1225
chegar@27560 1226 $(CLEAN_MODULE_PHASE_TARGETS):
chegar@27560 1227 $(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \
chegar@27560 1228 $(word 2, $(subst -,$(SPACE),$@)))
chegar@27560 1229
chegar@27560 1230 # When removing the support dir, we must also remove jdk. Building classes has
chegar@27560 1231 # the side effect of generating native headers. The headers end up in support
chegar@27560 1232 # while classes and touch files end up in jdk.
chegar@27560 1233 clean-support: clean-jdk
chegar@25854 1234
ihse@48137 1235 clean-test: clean-test-results clean-test-support
ihse@48137 1236
ihse@55232 1237 # When cleaning images, also clean the support/images directory.
ihse@55232 1238 clean-images: clean-support/images
ihse@55232 1239
erikj@29790 1240 # Remove everything, including configure configuration. If the output
erikj@29790 1241 # directory was created by configure and now becomes empty, remove it as well.
ohair@14111 1242 dist-clean: clean
ihse@47275 1243 ($(CD) $(OUTPUTDIR) && \
ihse@52446 1244 $(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide \
ihse@52446 1245 configure.log* build.log*)
ihse@47275 1246 $(if $(filter $(CONF_NAME),$(notdir $(OUTPUTDIR))), \
ihse@47275 1247 if test "x`$(LS) $(OUTPUTDIR)`" != x; then \
ihse@20363 1248 $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
ihse@20363 1249 else \
erikj@47217 1250 ($(CD) $(TOPDIR) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \
ihse@47275 1251 && $(RM) -r $(OUTPUTDIR)) \
ihse@20363 1252 fi \
ihse@20363 1253 )
chegar@25854 1254 $(ECHO) Cleaned everything, you will have to re-run configure.
ohair@14111 1255
rwestberg@54886 1256 ALL_TARGETS += clean clean-docs clean-compile-commands dist-clean $(CLEAN_DIR_TARGETS) \
rwestberg@54886 1257 $(CLEAN_SUPPORT_DIR_TARGETS) $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) \
rwestberg@54886 1258 $(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS)
chegar@25854 1259
chegar@25854 1260 ################################################################################
chegar@25854 1261 # Declare *-only targets for each normal target
chegar@25854 1262 $(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
chegar@25854 1263
ihse@29662 1264 ALL_TARGETS += $(addsuffix -only, $(filter-out dist-clean clean%, $(ALL_TARGETS)))
ihse@29662 1265
ihse@29662 1266 ################################################################################
ihse@29662 1267
ihse@29788 1268 # The following targets are intentionally not added to ALL_TARGETS since they
ihse@29788 1269 # are internal only, to support Init.gmk.
ihse@29788 1270
ihse@29662 1271 print-targets:
ihse@29662 1272 @$(ECHO) $(sort $(ALL_TARGETS))
ihse@29662 1273
ihse@29662 1274 print-modules:
ihse@29662 1275 @$(ECHO) $(sort $(ALL_MODULES))
ihse@29662 1276
ihse@44027 1277 print-tests:
ihse@44027 1278 @$(ECHO) $(sort $(ALL_NAMED_TESTS))
ihse@44027 1279
ihse@29788 1280 create-main-targets-include:
erikj@35008 1281 $(call LogInfo, Generating main target list)
ihse@29788 1282 @$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
ihse@29788 1283 $(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
chegar@25854 1284
chegar@25854 1285 ################################################################################
erikj@49349 1286 # Hook to include the corresponding custom file, if present.
erikj@49349 1287 $(eval $(call IncludeCustomExtension, Main-post.gmk))
chegar@25854 1288
chegar@25854 1289 .PHONY: $(ALL_TARGETS)
chegar@25854 1290
ohair@14111 1291 FRC: # Force target