Main.gmk revision 2641:3389bd361d46
1# 2# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# This code is free software; you can redistribute it and/or modify it 6# under the terms of the GNU General Public License version 2 only, as 7# published by the Free Software Foundation. Oracle designates this 8# particular file as subject to the "Classpath" exception as provided 9# by Oracle in the LICENSE file that accompanied this code. 10# 11# This code is distributed in the hope that it will be useful, but WITHOUT 12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14# version 2 for more details (a copy is included in the LICENSE file that 15# accompanied this code). 16# 17# You should have received a copy of the GNU General Public License version 18# 2 along with this work; if not, write to the Free Software Foundation, 19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20# 21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22# or visit www.oracle.com if you need additional information or have any 23# questions. 24# 25 26################################################################################ 27# This is the main makefile containing most actual top level targets. It needs 28# to be called with a SPEC file defined. 29################################################################################ 30 31# Declare default target 32default: 33 34ifeq ($(wildcard $(SPEC)),) 35 $(error Main.gmk needs SPEC set to a proper spec.gmk) 36endif 37 38# Now load the spec 39include $(SPEC) 40 41include $(SRC_ROOT)/make/MainSupport.gmk 42 43# Load the vital tools for all the makefiles. 44include $(SRC_ROOT)/make/common/MakeBase.gmk 45include $(SRC_ROOT)/make/common/Modules.gmk 46include $(SRC_ROOT)/make/common/FindTests.gmk 47 48# Declare ALL_TARGETS as an immediate variable. This variable is a list of all 49# valid top level targets. It's used to declare them all as PHONY and to 50# generate the -only targets. 51ALL_TARGETS := 52 53# Hook to include the corresponding custom file, if present. 54$(eval $(call IncludeCustomExtension, , Main.gmk)) 55 56# All modules for the current target platform. 57ALL_MODULES := $(call FindAllModules) 58 59################################################################################ 60################################################################################ 61# 62# Recipes for all targets. Only recipes, dependencies are declared later. 63# 64################################################################################ 65 66################################################################################ 67# Interim/build tools targets, compiling tools used during the build 68 69# When creating a BUILDJDK, the buildtools and interim targets have already 70# been built and should not be built again. 71ifneq ($(CREATING_BUILDJDK), true) 72 buildtools-langtools: 73 +($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Tools.gmk) 74 75 interim-langtools: 76 +($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk) 77 78 interim-rmic: 79 +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk) 80 81 interim-cldrconverter: 82 +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk) 83 84 buildtools-jdk: 85 +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileTools.gmk) 86 87 buildtools-modules: 88 +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileModuleTools.gmk) 89 90 buildtools-hotspot: 91 +($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileTools.gmk) 92endif 93 94ALL_TARGETS += buildtools-langtools interim-langtools \ 95 interim-rmic interim-cldrconverter buildtools-jdk buildtools-modules \ 96 buildtools-hotspot 97 98################################################################################ 99# Special targets for certain modules 100 101unpack-sec: 102 +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UnpackSecurity.gmk) 103 104generate-exported-symbols: 105 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildStatic.gmk) 106 107ALL_TARGETS += unpack-sec generate-exported-symbols 108 109################################################################################ 110# Gensrc targets, generating source before java compilation can be done 111# 112# When creating a BUILDJDK, the java targets have already been built and copied 113# into the buildjdk so no need to generate sources. 114ifneq ($(CREATING_BUILDJDK), true) 115 $(eval $(call DeclareRecipesForPhase, GENSRC, \ 116 TARGET_SUFFIX := gensrc, \ 117 FILE_PREFIX := Gensrc, \ 118 MAKE_SUBDIR := gensrc, \ 119 CHECK_MODULES := $(ALL_MODULES), \ 120 MULTIPLE_MAKEFILES := true)) 121 122 JDK_GENSRC_TARGETS := $(filter %-gensrc-jdk, $(GENSRC_TARGETS)) 123 LANGTOOLS_GENSRC_TARGETS := $(filter %-gensrc-langtools, $(GENSRC_TARGETS)) 124 CORBA_GENSRC_TARGETS := $(filter %-gensrc-corba, $(GENSRC_TARGETS)) 125 HOTSPOT_GENSRC_TARGETS := $(filter %-gensrc-hotspot, $(GENSRC_TARGETS)) 126 127 GENSRC_MODULEINFO_MODULES := $(ALL_MODULES) 128 GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \ 129 $(GENSRC_MODULEINFO_MODULES)) 130 131 GENSRC_MODULES := $(GENSRC_MODULEINFO_MODULES) 132 GENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \ 133 $(addsuffix -gensrc, $(GENSRC_MODULES))) 134 135 define DeclareModuleInfoRecipe 136 $1-gensrc-moduleinfo: 137 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \ 138 -f GensrcModuleInfo.gmk MODULE=$1) 139 140 $1-gensrc: $1-gensrc-moduleinfo 141 endef 142 143 $(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m))) 144endif 145 146ALL_TARGETS += $(GENSRC_TARGETS) 147 148################################################################################ 149# Generate data targets 150$(eval $(call DeclareRecipesForPhase, GENDATA, \ 151 TARGET_SUFFIX := gendata, \ 152 FILE_PREFIX := Gendata, \ 153 MAKE_SUBDIR := gendata, \ 154 CHECK_MODULES := $(ALL_MODULES), \ 155 USE_WRAPPER := true)) 156 157ALL_TARGETS += $(GENDATA_TARGETS) 158 159################################################################################ 160# Copy files targets 161$(eval $(call DeclareRecipesForPhase, COPY, \ 162 TARGET_SUFFIX := copy, \ 163 FILE_PREFIX := Copy, \ 164 MAKE_SUBDIR := copy, \ 165 CHECK_MODULES := $(ALL_MODULES), \ 166 USE_WRAPPER := true, \ 167 MULTIPLE_MAKEFILES := true)) 168 169ALL_COPY_MODULES += $(COPY_MODULES) 170ALL_COPY_TARGETS += $(COPY_TARGETS) 171 172IMPORT_COPY_MODULES := $(call FindImportedModules) 173IMPORT_COPY_TARGETS := $(addsuffix -copy, $(IMPORT_COPY_MODULES)) 174ALL_COPY_MODULES += $(IMPORT_COPY_MODULES) 175ALL_COPY_TARGETS += $(IMPORT_COPY_TARGETS) 176 177define DeclareImportCopyRecipe 178 $1-copy: 179 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \ 180 -f CopyImportModules.gmk MODULE=$1) 181endef 182 183$(foreach m, $(IMPORT_COPY_MODULES), $(eval $(call DeclareImportCopyRecipe,$m))) 184 185ALL_TARGETS += $(ALL_COPY_TARGETS) 186 187################################################################################ 188# Targets for compiling all java modules. Nashorn is treated separately. 189JAVA_MODULES := $(ALL_MODULES) 190JAVA_TARGETS := $(addsuffix -java, $(JAVA_MODULES)) 191 192define DeclareCompileJavaRecipe 193 $1-java: 194 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \ 195 -f CompileJavaModules.gmk MODULE=$1) 196endef 197 198$(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \ 199 $(eval $(call DeclareCompileJavaRecipe,$m))) 200 201# Build nashorn. Needs to be compiled separately from the rest of the modules 202# due to nasgen. 203jdk.scripting.nashorn-java: 204 +($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \ 205 -f BuildNashorn.gmk compile) 206 207ALL_TARGETS += $(JAVA_TARGETS) 208 209################################################################################ 210# Targets for running rmic. 211$(eval $(call DeclareRecipesForPhase, RMIC, \ 212 TARGET_SUFFIX := rmic, \ 213 FILE_PREFIX := Rmic, \ 214 MAKE_SUBDIR := rmic, \ 215 CHECK_MODULES := $(ALL_MODULES))) 216 217ALL_TARGETS += $(RMIC_TARGETS) 218 219################################################################################ 220# Targets for compiling native libraries 221$(eval $(call DeclareRecipesForPhase, LIBS, \ 222 TARGET_SUFFIX := libs, \ 223 FILE_PREFIX := Lib, \ 224 MAKE_SUBDIR := lib, \ 225 CHECK_MODULES := $(ALL_MODULES), \ 226 USE_WRAPPER := true)) 227 228ALL_TARGETS += $(LIBS_TARGETS) 229 230################################################################################ 231# Targets for compiling native executables 232$(eval $(call DeclareRecipesForPhase, LAUNCHER, \ 233 TARGET_SUFFIX := launchers, \ 234 FILE_PREFIX := Launcher, \ 235 MAKE_SUBDIR := launcher, \ 236 CHECK_MODULES := $(ALL_MODULES), \ 237 USE_WRAPPER := true)) 238 239ALL_TARGETS += $(LAUNCHER_TARGETS) 240 241################################################################################ 242# Build hotspot target 243 244HOTSPOT_VARIANT_TARGETS := $(addprefix hotspot-, $(JVM_VARIANTS)) 245HOTSPOT_VARIANT_GENSRC_TARGETS := $(addsuffix -gensrc, $(HOTSPOT_VARIANT_TARGETS)) 246HOTSPOT_VARIANT_LIBS_TARGETS := $(addsuffix -libs, $(HOTSPOT_VARIANT_TARGETS)) 247 248define DeclareHotspotGensrcRecipe 249 hotspot-$1-gensrc: 250 $$(call LogInfo, Building JVM variant '$1' with features '$(JVM_FEATURES_$1)') 251 +($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f gensrc/GenerateSources.gmk \ 252 JVM_VARIANT=$1) 253endef 254 255$(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotGensrcRecipe,$v))) 256 257define DeclareHotspotLibsRecipe 258 hotspot-$1-libs: 259 +($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f lib/CompileLibraries.gmk \ 260 JVM_VARIANT=$1) 261endef 262 263$(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotLibsRecipe,$v))) 264 265hotspot-jsig: 266 +($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f lib/CompileLibjsig.gmk) 267 268hotspot-ide-project: 269 +($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk) 270 271ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \ 272 $(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-jsig hotspot-ide-project 273 274################################################################################ 275# Build demos targets 276 277demos-jdk: 278 +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk) 279 280test-image-demos-jdk: 281 +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk images) 282 283ALL_TARGETS += demos-jdk test-image-demos-jdk 284 285################################################################################ 286# Jigsaw specific data and analysis targets. 287 288generate-summary: 289 +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateModuleSummary.gmk) 290 291ALL_TARGETS += generate-summary 292 293################################################################################ 294# Jmod targets 295 296JMOD_MODULES := $(ALL_MODULES) 297JMOD_TARGETS := $(addsuffix -jmod, $(JMOD_MODULES)) 298 299define DeclareJmodRecipe 300 $1-jmod: 301 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \ 302 MODULE=$1) 303endef 304 305$(foreach m, $(JMOD_MODULES), $(eval $(call DeclareJmodRecipe,$m))) 306 307ALL_TARGETS += $(JMOD_TARGETS) 308 309################################################################################ 310# Images targets 311 312store-source-revision: 313 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk store-source-revision) 314 315create-source-revision-tracker: 316 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f SourceRevision.gmk create-source-revision-tracker) 317 318BOOTCYCLE_TARGET := product-images 319bootcycle-images: 320 ifneq ($(COMPILE_TYPE), cross) 321 $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image) 322 +$(MAKE) $(MAKE_ARGS) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \ 323 JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main 324 else 325 $(call LogWarn, Boot cycle build disabled when cross compiling) 326 endif 327 328zip-security: 329 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk) 330 331zip-source: 332 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk) 333 334jrtfs-jar: 335 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk) 336 337jdk-image: 338 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jdk) 339 340jre-image: 341 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jre) 342 343symbols-image: 344 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk symbols) 345 346profiles-image: 347 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles) 348 349mac-bundles-jdk: 350 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk) 351 352release-file: 353 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ReleaseFile.gmk) 354 355exploded-image-optimize: 356 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk) 357 358ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-images zip-security \ 359 zip-source jrtfs-jar jdk-image jre-image \ 360 symbols-image profiles-image mac-bundles-jdk \ 361 release-file exploded-image-optimize 362 363################################################################################ 364# Docs targets 365 366# If building full docs, to complete docs-*-api we need both the javadoc and 367# modulegraph targets. 368docs-jdk-api-javadoc: 369 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-api-javadoc) 370 371docs-jdk-api-modulegraph: 372 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-api-modulegraph) 373 374docs-javase-api-javadoc: 375 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-javase-api-javadoc) 376 377docs-javase-api-modulegraph: 378 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-javase-api-modulegraph) 379 380docs-jdk-specs: 381 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-specs) 382 383docs-jdk-index: 384 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-jdk-index) 385 386docs-zip: 387 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Docs.gmk docs-zip) 388 389update-build-docs: 390 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk) 391 392ALL_TARGETS += docs-jdk-api-javadoc docs-jdk-api-modulegraph \ 393 docs-javase-api-javadoc docs-javase-api-modulegraph docs-jdk-specs \ 394 docs-jdk-index docs-zip update-build-docs 395 396################################################################################ 397# Cross compilation support 398 399ifeq ($(CREATING_BUILDJDK), true) 400 # This target is only called by the recursive call below. 401 create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \ 402 java.base-copy jdk.jdeps-launchers 403endif 404 405create-buildjdk-copy: 406 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk) 407 408create-buildjdk-interim-image: 409 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \ 410 $@-helper \ 411 SPEC=$(dir $(SPEC))buildjdk-spec.gmk \ 412 HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \ 413 CREATING_BUILDJDK=true) 414 415ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image 416 417################################################################################ 418# The interim-image is a small jlinked image that is used to generate artifacts 419# at build time for use when linking the real images. 420 421INTERIM_JMOD_TARGETS := $(addsuffix -interim-jmod, $(INTERIM_IMAGE_MODULES)) 422 423define DeclareInterimJmodRecipe 424 $1-interim-jmod: 425 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \ 426 MODULE=$1 \ 427 JMODS_DIR=$(INTERIM_JMODS_DIR) \ 428 JMODS_TEMPDIR=$(INTERIM_JMODS_DIR)/temp \ 429 INTERIM_JMOD=true \ 430 ) 431endef 432 433$(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $(call DeclareInterimJmodRecipe,$m))) 434 435interim-image: 436 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f InterimImage.gmk) 437 438ifeq ($(ENABLE_GENERATE_CLASSLIST), true) 439 generate-link-opt-data: 440 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f GenerateLinkOptData.gmk) 441endif 442 443ALL_TARGETS += $(INTERIM_JMOD_TARGETS) interim-image generate-link-opt-data 444 445################################################################################ 446# Generate test names for all JTReg test groups 447# 448 449define DeclareRunTestRecipe 450 run-test-$1: 451 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$1") 452 453endef 454 455# ALL_NAMED_TESTS is defined in FindTests.gmk 456$(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t))) 457ALL_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS)) 458 459ALL_TARGETS += $(ALL_TEST_TARGETS) 460 461################################################################################ 462# Build tests 463# 464 465prepare-test-image: 466 $(MKDIR) -p $(TEST_IMAGE_DIR) 467 $(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image' 468 469build-test-hotspot-jtreg-native: 470 +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \ 471 build-test-hotspot-jtreg-native) 472 473test-image-hotspot-jtreg-native: 474 +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \ 475 test-image-hotspot-jtreg-native) 476 477build-test-jdk-jtreg-native: 478 +($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \ 479 build-test-jdk-jtreg-native) 480 481test-image-jdk-jtreg-native: 482 +($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \ 483 test-image-jdk-jtreg-native) 484 485run-test: 486 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$(TEST)") 487 488ifeq ($(BUILD_GTEST), true) 489 test-image-hotspot-gtest: 490 +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk) 491endif 492 493build-test-lib: 494 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk) 495 496ifeq ($(BUILD_FAILURE_HANDLER), true) 497 # Builds the failure handler jtreg extension 498 build-test-failure-handler: 499 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \ 500 -f BuildFailureHandler.gmk build) 501 502 # Runs the tests for the failure handler jtreg extension 503 test-failure-handler: 504 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \ 505 -f BuildFailureHandler.gmk test) 506 507 # Copies the failure handler jtreg extension into the test image 508 test-image-failure-handler: 509 +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \ 510 -f BuildFailureHandler.gmk images) 511endif 512 513ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \ 514 test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \ 515 test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \ 516 test-failure-handler test-image-failure-handler test-image-hotspot-gtest \ 517 run-test 518 519################################################################################ 520# Run tests 521 522# Run tests specified by $(TEST), or the default test set. 523test: 524 $(call RunTests, $(TEST), $(JDK_IMAGE_DIR)) 525 526test-hotspot-jtreg: 527 $(call RunTests, "hotspot_all", $(JDK_IMAGE_DIR)) 528 529test-hotspot-jtreg-native: 530 $(call RunTests, "hotspot_native_sanity", $(JDK_IMAGE_DIR)) 531 532test-hotspot-internal: 533 $(call RunTests, "hotspot_internal", $(JDK_OUTPUTDIR)) 534 535test-hotspot-gtest: 536 $(call RunTests, "hotspot_gtest", $(JDK_OUTPUTDIR)) 537 538test-jdk-jtreg-native: 539 $(call RunTests, "jdk_native_sanity", $(JDK_IMAGE_DIR)) 540 541test-make: 542 ($(CD) $(SRC_ROOT)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET)) 543 544ALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \ 545 test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make 546 547################################################################################ 548# Bundles 549 550product-bundles: 551 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles) 552 553profiles-bundles: 554 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk profiles-bundles) 555 556test-bundles: 557 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk test-bundles) 558 559docs-bundles: 560 +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles) 561 562ALL_TARGETS += product-bundles profiles-bundles test-bundles docs-bundles 563 564################################################################################ 565# Install targets 566 567install: 568 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Install.gmk) 569 570ALL_TARGETS += install 571 572################################################################################ 573# 574# Dependency declarations between targets. 575# 576# These are declared in two groups. First all dependencies between targets that 577# have recipes above as these dependencies may be disabled. Then the aggregator 578# targets that do not have recipes of their own, which will never have their 579# dependencies disabled. 580# 581################################################################################ 582# Targets with recipes above 583 584# If running an *-only target, parallel execution and dependencies between 585# recipe targets are disabled. This makes it possible to run a select set of 586# recipe targets in order. It's the responsibility of the user to make sure 587# all prerequisites are fulfilled. 588ifneq ($(findstring -only, $(MAKECMDGOALS)), ) 589 .NOTPARALLEL: 590else 591 $(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools 592 593 interim-langtools: $(LANGTOOLS_GENSRC_TARGETS) 594 595 buildtools-jdk: interim-langtools interim-cldrconverter 596 597 buildtools-hotspot: interim-langtools 598 599 buildtools-modules: exploded-image-base 600 601 $(CORBA_GENSRC_TARGETS): interim-langtools 602 603 $(HOTSPOT_GENSRC_TARGETS): interim-langtools buildtools-hotspot 604 605 $(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk 606 607 $(GENSRC_MODULEINFO_TARGETS): buildtools-jdk 608 609 $(GENDATA_TARGETS): interim-langtools buildtools-jdk 610 611 interim-rmic: interim-langtools 612 613 $(RMIC_TARGETS): interim-langtools interim-rmic 614 615 $(JAVA_TARGETS): interim-langtools 616 617 # Declare dependencies between hotspot-<variant>* targets 618 $(foreach v, $(JVM_VARIANTS), \ 619 $(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \ 620 $(eval hotspot-$v-libs: hotspot-$v-gensrc) \ 621 ) 622 623 hotspot-ide-project: hotspot exploded-image 624 625 generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs 626 627 # Building one JVM variant is enough to start building the other libs 628 $(LIBS_TARGETS): hotspot-$(JVM_VARIANT_MAIN)-libs 629 630 $(LAUNCHER_TARGETS): java.base-libs 631 632 ifeq ($(STATIC_BUILD), true) 633 $(LAUNCHER_TARGETS): generate-exported-symbols 634 endif 635 636 # The demos are currently linking to libjvm and libjava, just like all other 637 # jdk libs, even though they don't need to. To avoid warnings, make sure they 638 # aren't built until after libjava and libjvm are available to link to. 639 demos-jdk: java.base-libs exploded-image-optimize 640 test-image-demos-jdk: demos-jdk 641 642 # Declare dependency from <module>-java to <module>-gensrc 643 $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc)) 644 645 # Declare dependencies between java modules 646 $(foreach m, $(JAVA_MODULES), \ 647 $(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \ 648 $(call FindDepsForModule,$m))))) 649 650 # Declare dependencies between <module>-rmic to <module>-java 651 $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java)) 652 653 # Declare dependencies from <module>-lib to <module>-java 654 # Skip modules that do not have java source. 655 # When creating a BUILDJDK, the java compilation has already been done by the 656 # normal build and copied in. 657 ifneq ($(CREATING_BUILDJDK), true) 658 $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java)) 659 endif 660 661 # Declare dependencies from all other <module>-lib to java.base-lib 662 $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \ 663 $(eval $t: java.base-libs)) 664 665 # jdk.accessibility depends on java.desktop 666 jdk.accessibility-libs: java.desktop-libs 667 668 # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a 669 # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a 670 # virtual target. 671 jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc 672 673 # The swing beans need to have java base properly generated to avoid errors 674 # in javadoc. 675 java.desktop-gensrc-jdk: java.base-gensrc 676 677 # The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler 678 # needs classes from the current JDK. 679 jdk.internal.vm.ci-gensrc-hotspot: $(addsuffix -java, \ 680 $(call FindTransitiveDepsForModule, jdk.internal.vm.ci)) 681 jdk.internal.vm.compiler-gensrc-hotspot: $(addsuffix -java, \ 682 $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler)) 683 684 # For jdk.internal.vm.compiler, the gensrc step is generating a module-info.java.extra 685 # file to be processed by the gensrc-moduleinfo target. 686 jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-hotspot 687 688 # Explicitly add dependencies for special targets 689 java.base-java: unpack-sec 690 691 jdk.jdeps-gendata: java rmic 692 693 # Declare dependencies between jmod targets. 694 # java.base jmod needs jrt-fs.jar and access to the other jmods to be built. 695 # When creating a BUILDJDK, we don't need to add hashes to java.base, thus 696 # we don't need to depend on all other jmods 697 ifneq ($(CREATING_BUILDJDK), true) 698 java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS)) 699 endif 700 701 # Building java.base-jmod requires all of hotspot to be built. 702 java.base-jmod: hotspot 703 704 # Declare dependencies from <module>-jmod to all other module targets 705 # When creating a BUILDJDK, the java compilation has already been done by the 706 # normal build and copied in. 707 ifneq ($(CREATING_BUILDJDK), true) 708 $(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java)) 709 endif 710 $(foreach m, $(GENDATA_MODULES), $(eval $m_JMOD_DEPS += $m-gendata)) 711 $(foreach m, $(RMIC_MODULES), $(eval $m_JMOD_DEPS += $m-rmic)) 712 $(foreach m, $(LIBS_MODULES), $(eval $m_JMOD_DEPS += $m-libs)) 713 $(foreach m, $(LAUNCHER_MODULES), $(eval $m_JMOD_DEPS += $m-launchers)) 714 $(foreach m, $(COPY_MODULES), $(eval $m_JMOD_DEPS += $m-copy)) 715 $(foreach m, $(ALL_MODULES), $(eval $m-jmod: $($(m)_JMOD_DEPS))) 716 $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $m-interim-jmod: $($(m)_JMOD_DEPS))) 717 718 # Jmods cannot be created until we have the jmod tool ready to run. During 719 # a normal build we run it from the exploded image, but when cross compiling 720 # it's run from the buildjdk, which is either created at build time or user 721 # supplied. 722 # 723 # For the exploded image to be runnable, all java modules and 724 # jdk.jlink-launchers need to be built. We also need to copy jvm.cfg (done 725 # in java.base-copy) and tzdb.dat (done in java.base-gendata) to the 726 # appropriate location otherwise jimage, jlink and jmod won't start. This 727 # also applies when creating the buildjdk. 728 DEFAULT_JMOD_DEPS := java.base-libs java.base-copy java.base-gendata \ 729 jdk.jlink-launchers 730 # When cross compiling and buildjdk is to be created, depend on creating the 731 # buildjdk instead of the default dependencies. 732 ifeq ($(CREATE_BUILDJDK), true) 733 # Avoid calling create-buildjdk from within a create-buildjdk call. 734 ifneq ($(CREATING_BUILDJDK), true) 735 $(JMOD_TARGETS): create-buildjdk 736 buildtools-modules: create-buildjdk 737 else 738 # While actually creating the buildjdk, the default deps applies. 739 $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS) 740 endif 741 else 742 # The normal non cross compilation case uses the default deps. 743 # To avoid races with the optimize target, that also needs to happen first. 744 $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS) \ 745 exploded-image-optimize 746 endif 747 748 # All modules include the main license files from java.base. 749 $(JMOD_TARGETS): java.base-copy 750 751 zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \ 752 $(filter jdk.crypto%, $(JAVA_TARGETS)) 753 754 zip-source: gensrc rmic 755 756 jrtfs-jar: interim-langtools 757 758 ifeq ($(ENABLE_GENERATE_CLASSLIST), true) 759 ifeq ($(CREATE_BUILDJDK), true) 760 # If creating a buildjdk, the interim image needs to be based on that. 761 generate-link-opt-data: create-buildjdk 762 else ifeq ($(EXTERNAL_BUILDJDK), false) 763 # If an external buildjdk has been provided, we skip generating an 764 # interim-image and just use the external buildjdk for generating 765 # classlist. 766 generate-link-opt-data: interim-image 767 endif 768 generate-link-opt-data: buildtools-jdk 769 770 # The generated classlist needs to go into java.base-jmod. 771 java.base-jmod jdk.jlink-jmod jdk-image jre-image: generate-link-opt-data 772 endif 773 774 release-file: create-source-revision-tracker 775 776 jdk-image: jmods zip-source demos release-file 777 jre-image: jmods release-file 778 symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS) 779 780 profiles-image: jmods release-file 781 782 mac-bundles-jdk: jdk-image jre-image 783 784 # The optimize target can run as soon as the modules dir has been completely 785 # populated (java, copy and gendata targets) and the basic libs and launchers 786 # have been built. 787 exploded-image-optimize: java copy gendata java.base-libs java.base-launchers \ 788 buildtools-modules 789 790 bootcycle-images: jdk-image 791 792 docs-jdk-api-javadoc: $(GENSRC_TARGETS) rmic 793 794 docs-javase-api-javadoc: $(GENSRC_TARGETS) rmic 795 796 docs-jdk-api-modulegraph: exploded-image buildtools-modules 797 798 docs-javase-api-modulegraph: exploded-image buildtools-modules 799 800 # The gensrc steps for hotspot and jdk.jdi create html spec files. 801 docs-jdk-specs: hotspot-$(JVM_VARIANT_MAIN)-gensrc jdk.jdi-gensrc \ 802 docs-jdk-index 803 804 docs-jdk-index: exploded-image buildtools-modules 805 806 docs-zip: docs-jdk 807 808 test: jdk-image test-image 809 810 run-test: jdk-image test-image 811 812 # Declare dependency for all generated test targets 813 $(foreach t, $(ALL_TEST_TARGETS), $(eval $t: jdk-image test-image)) 814 815 create-buildjdk-copy: jdk.jlink-java java.base-gendata \ 816 $(addsuffix -java, $(INTERIM_IMAGE_MODULES)) 817 818 create-buildjdk-interim-image: create-buildjdk-copy 819 820 interim-image: $(INTERIM_JMOD_TARGETS) 821 822 test-make: clean-test-make 823 824 build-test-lib: exploded-image-optimize 825 826 build-test-failure-handler: interim-langtools 827 828 test-failure-handler: build-test-failure-handler 829 830 test-image-failure-handler: build-test-failure-handler 831 832 build-test-hotspot-jtreg-native: buildtools-jdk \ 833 hotspot-$(JVM_VARIANT_MAIN)-libs 834 835 build-test-jdk-jtreg-native: buildtools-jdk 836 837 test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native 838 839 test-image-jdk-jtreg-native: build-test-jdk-jtreg-native 840 841 test-image-hotspot-gtest: hotspot 842 843 test-hotspot-internal: exploded-image 844 845 test-hotspot-jtreg: jdk-image test-image 846 847 test-hotspot-gtest: exploded-image test-image-hotspot-gtest 848 849 install: product-images 850 851 product-bundles: product-images 852 853 profiles-bundles: profiles-images 854 855 test-bundles: test-image 856 857 docs-bundles: docs-image 858 859 generate-summary: jmods buildtools-modules 860 861endif 862 863################################################################################ 864# Virtual targets without recipes 865 866buildtools: buildtools-langtools interim-langtools interim-rmic \ 867 buildtools-jdk buildtools-hotspot 868 869hotspot: $(HOTSPOT_VARIANT_TARGETS) hotspot-jsig 870 871hotspot-libs: hotspot-jsig 872 873# Create targets hotspot-libs and hotspot-gensrc. 874$(foreach v, $(JVM_VARIANTS), \ 875 $(eval hotspot-libs: hotspot-$v-libs) \ 876 $(eval hotspot-gensrc: hotspot-$v-gensrc) \ 877) 878 879gensrc: $(GENSRC_TARGETS) 880 881gendata: $(GENDATA_TARGETS) 882 883copy: $(ALL_COPY_TARGETS) 884 885java: $(JAVA_TARGETS) 886 887rmic: $(RMIC_TARGETS) 888 889libs: $(LIBS_TARGETS) 890 891launchers: $(LAUNCHER_TARGETS) 892 893jmods: $(JMOD_TARGETS) 894 895# Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which 896# is actually handled by jdk.jdi-gensrc 897jdk.jdwp.agent-gensrc: jdk.jdi-gensrc 898 899# Declare dependencies from <module> to all the individual targets specific 900# to that module <module>-*, that are needed for the exploded image. 901$(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc)) 902$(foreach m, $(JAVA_MODULES), $(eval $m: $m-java)) 903$(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata)) 904$(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic)) 905$(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs)) 906$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers)) 907$(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy)) 908 909# Building java.base includes building all of hotspot. 910java.base: hotspot 911 912demos: demos-jdk 913 914# The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk. 915exploded-image-base: $(ALL_MODULES) 916exploded-image: exploded-image-base release-file 917# When cross compiling, no need to optimize the exploded image since it won't 918# be runnable on the host platform anyway. 919ifneq ($(COMPILE_TYPE), cross) 920 exploded-image: exploded-image-optimize 921endif 922 923create-buildjdk: create-buildjdk-copy create-buildjdk-interim-image 924 925docs-jdk-api: docs-jdk-api-javadoc 926docs-javase-api: docs-javase-api-javadoc 927 928# If we're building full docs, we must also generate the module graphs to 929# get non-broken api documentation. 930ifeq ($(ENABLE_FULL_DOCS), true) 931 docs-jdk-api: docs-jdk-api-modulegraph 932 docs-javase-api: docs-javase-api-modulegraph 933endif 934 935docs-jdk: docs-jdk-api docs-jdk-specs docs-jdk-index 936docs-javase: docs-javase-api 937 938# alias for backwards compatibility 939docs-javadoc: docs-jdk-api 940 941mac-bundles: mac-bundles-jdk 942 943# The $(BUILD_OUTPUT)/images directory contain the resulting deliverables, 944# and in line with this, our targets for creating these are named *-image[s]. 945 946# This target builds the product images, e.g. the JRE and JDK image 947# (and possibly other, more specific versions) 948product-images: jdk-image jre-image symbols-image exploded-image 949 950# zip-security is actually a bundle, but for now it needs to be considered 951# an image until this can be cleaned up properly. 952product-images: zip-security 953 954# Declare these for backwards compatiblity and convenience. 955profiles profiles-images: profiles-image 956 957# The module summary cannot be run when: 958# * Cross compiling and building a partial BUILDJDK for the build host 959# * An external buildjdk has been supplied since it may not match the 960# module selection of the target jdk 961ifneq ($(CREATE_BUILDJDK), true) 962 ifeq ($(EXTERNAL_BUILDJDK), false) 963 product-images: generate-summary 964 endif 965endif 966 967ifeq ($(OPENJDK_TARGET_OS), macosx) 968 product-images: mac-bundles 969endif 970 971# This target builds the documentation image 972docs-image: docs-jdk 973 974# This target builds the test image 975test-image: prepare-test-image test-image-hotspot-jtreg-native \ 976 test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest \ 977 test-image-demos-jdk 978 979# all-images builds all our deliverables as images. 980all-images: product-images test-image docs-image 981 982# all-bundles packages all our deliverables as tar.gz bundles. 983all-bundles: product-bundles test-bundles docs-bundles 984 985ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \ 986 copy java rmic libs launchers jmods \ 987 jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \ 988 exploded-image-base exploded-image \ 989 create-buildjdk docs-jdk-api docs-javase-api docs-jdk docs-javase \ 990 docs-javadoc mac-bundles product-images \ 991 profiles profiles-images \ 992 docs-image test-image all-images \ 993 all-bundles 994 995################################################################################ 996 997# Traditional targets typically run by users. 998# These can be considered aliases for the targets now named by a more 999# "modern" naming scheme. 1000default: $(DEFAULT_MAKE_TARGET) 1001jdk: exploded-image 1002images: product-images 1003docs: docs-image 1004bundles: all-bundles 1005all: all-images 1006 1007ALL_TARGETS += default jdk images docs bundles all 1008 1009################################################################################ 1010################################################################################ 1011# 1012# Clean targets 1013# 1014################################################################################ 1015# Clean targets are automatically run serially by the Makefile calling this 1016# file. 1017 1018CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \ 1019 images make-support test-make bundles buildjdk 1020CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS)) 1021CLEAN_SUPPORT_DIRS += demos 1022CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS)) 1023CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib 1024CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS)) 1025CLEAN_PHASES := gensrc java native include 1026CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES)) 1027CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES)) 1028# Construct targets of the form clean-$module-$phase 1029CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \ 1030 $(addprefix $m-, $(CLEAN_PHASES)))) 1031 1032# Remove everything, except the output from configure. 1033clean: $(CLEAN_DIR_TARGETS) 1034 ($(CD) $(OUTPUT_ROOT) && $(RM) -r build*.log*) 1035 $(ECHO) Cleaned all build artifacts. 1036 1037clean-docs: 1038 $(call CleanDocs) 1039 1040$(CLEAN_DIR_TARGETS): 1041 $(call CleanDir,$(patsubst clean-%, %, $@)) 1042 1043$(CLEAN_SUPPORT_DIR_TARGETS): 1044 $(call CleanSupportDir,$(patsubst clean-%, %, $@)) 1045 1046$(CLEAN_TEST_TARGETS): 1047 $(call CleanTest,$(patsubst clean-test-%, %, $@)) 1048 1049$(CLEAN_PHASE_TARGETS): 1050 $(call Clean-$(patsubst clean-%,%, $@)) 1051 1052$(CLEAN_MODULE_TARGETS): 1053 $(call CleanModule,$(patsubst clean-%, %, $@)) 1054 1055$(CLEAN_MODULE_PHASE_TARGETS): 1056 $(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \ 1057 $(word 2, $(subst -,$(SPACE),$@))) 1058 1059# When removing the support dir, we must also remove jdk. Building classes has 1060# the side effect of generating native headers. The headers end up in support 1061# while classes and touch files end up in jdk. 1062clean-support: clean-jdk 1063 1064# Remove everything, including configure configuration. If the output 1065# directory was created by configure and now becomes empty, remove it as well. 1066dist-clean: clean 1067 ($(CD) $(OUTPUT_ROOT) && \ 1068 $(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide) 1069 $(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \ 1070 if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \ 1071 $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \ 1072 else \ 1073 ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \ 1074 && $(RM) -r $(OUTPUT_ROOT)) \ 1075 fi \ 1076 ) 1077 $(ECHO) Cleaned everything, you will have to re-run configure. 1078 1079ALL_TARGETS += clean clean-docs dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \ 1080 $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \ 1081 $(CLEAN_MODULE_PHASE_TARGETS) 1082 1083################################################################################ 1084# Declare *-only targets for each normal target 1085$(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t))) 1086 1087ALL_TARGETS += $(addsuffix -only, $(filter-out dist-clean clean%, $(ALL_TARGETS))) 1088 1089################################################################################ 1090 1091# Include JPRT targets 1092include $(SRC_ROOT)/make/Jprt.gmk 1093 1094################################################################################ 1095 1096# The following targets are intentionally not added to ALL_TARGETS since they 1097# are internal only, to support Init.gmk. 1098 1099print-targets: 1100 @$(ECHO) $(sort $(ALL_TARGETS)) 1101 1102print-modules: 1103 @$(ECHO) $(sort $(ALL_MODULES)) 1104 1105print-tests: 1106 @$(ECHO) $(sort $(ALL_NAMED_TESTS)) 1107 1108create-main-targets-include: 1109 $(call LogInfo, Generating main target list) 1110 @$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \ 1111 $(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk 1112 1113################################################################################ 1114 1115.PHONY: $(ALL_TARGETS) 1116 1117FRC: # Force target 1118