Main.gmk revision 2046:a36a877e7624
154359Sroberto#
254359Sroberto# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
354359Sroberto# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
482498Sroberto#
554359Sroberto# This code is free software; you can redistribute it and/or modify it
654359Sroberto# under the terms of the GNU General Public License version 2 only, as
754359Sroberto# published by the Free Software Foundation.  Oracle designates this
854359Sroberto# particular file as subject to the "Classpath" exception as provided
9106163Sroberto# by Oracle in the LICENSE file that accompanied this code.
1082498Sroberto#
1182498Sroberto# This code is distributed in the hope that it will be useful, but WITHOUT
1282498Sroberto# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13182007Sroberto# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1482498Sroberto# version 2 for more details (a copy is included in the LICENSE file that
15285612Sdelphij# accompanied this code).
16285612Sdelphij#
17285612Sdelphij# You should have received a copy of the GNU General Public License version
18285612Sdelphij# 2 along with this work; if not, write to the Free Software Foundation,
19285612Sdelphij# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20285612Sdelphij#
21285612Sdelphij# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22285612Sdelphij# or visit www.oracle.com if you need additional information or have any
23132451Sroberto# questions.
24182007Sroberto#
25132451Sroberto
26132451Sroberto################################################################################
27285612Sdelphij# This is the main makefile containing most actual top level targets. It needs
28285612Sdelphij# to be called with a SPEC file defined.
29285612Sdelphij################################################################################
30293893Sglebius
31293893Sglebius# Declare default target
32293893Sglebiusdefault:
33289999Sglebius
34289999Sglebiusifeq ($(wildcard $(SPEC)),)
35289999Sglebius  $(error Main.gmk needs SPEC set to a proper spec.gmk)
36289999Sglebiusendif
37293893Sglebius
38293893Sglebius# Now load the spec
39293893Sglebiusinclude $(SPEC)
40289999Sglebius
41289999Sglebiusinclude $(SRC_ROOT)/make/MainSupport.gmk
4254359Sroberto
4354359Sroberto# Load the vital tools for all the makefiles.
4454359Srobertoinclude $(SRC_ROOT)/make/common/MakeBase.gmk
4554359Srobertoinclude $(SRC_ROOT)/make/common/Modules.gmk
4654359Sroberto
4754359Sroberto# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
4854359Sroberto# valid top level targets. It's used to declare them all as PHONY and to
49285612Sdelphij# generate the -only targets.
50285612SdelphijALL_TARGETS :=
51285612Sdelphij
52200576Sroberto# Hook to include the corresponding custom file, if present.
53200576Sroberto$(eval $(call IncludeCustomExtension, , Main.gmk))
5454359Sroberto
5554359Sroberto# All modules for the current target platform.
56200576SrobertoALL_MODULES := $(call FindAllModules)
57200576Sroberto
58200576Sroberto################################################################################
59200576Sroberto################################################################################
6054359Sroberto#
6154359Sroberto# Recipes for all targets. Only recipes, dependencies are declared later.
6254359Sroberto#
6354359Sroberto################################################################################
6454359Sroberto
6554359Sroberto################################################################################
6654359Sroberto# Interim/build tools targets, compiling tools used during the build
6754359Sroberto
6854359Srobertobuildtools-langtools:
6954359Sroberto	+($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Tools.gmk)
7054359Sroberto
7154359Srobertointerim-langtools:
7254359Sroberto	+($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk)
7354359Sroberto
7454359Srobertointerim-rmic:
7554359Sroberto	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
7654359Sroberto
7754359Srobertointerim-cldrconverter:
7854359Sroberto	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
7954359Sroberto
8054359Srobertobuildtools-jdk:
8154359Sroberto	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileTools.gmk)
8254359Sroberto
8354359SrobertoALL_TARGETS += buildtools-langtools interim-langtools \
8454359Sroberto    interim-rmic interim-cldrconverter buildtools-jdk
8554359Sroberto
8654359Sroberto################################################################################
8754359Sroberto# Special targets for certain modules
8854359Sroberto
8954359Srobertoimport-hotspot:
9054359Sroberto	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Import.gmk)
9154359Sroberto
9254359Srobertounpack-sec:
9354359Sroberto	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UnpackSecurity.gmk)
94285612Sdelphij
95285612Sdelphijgenerate-exported-symbols:
96285612Sdelphij	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildStatic.gmk)
9754359Sroberto
9854359SrobertoALL_TARGETS += import-hotspot unpack-sec generate-exported-symbols
9954359Sroberto
10054359Sroberto################################################################################
10154359Sroberto# Gensrc targets, generating source before java compilation can be done
10254359Sroberto$(eval $(call DeclareRecipesForPhase, GENSRC, \
10354359Sroberto    TARGET_SUFFIX := gensrc, \
10454359Sroberto    FILE_PREFIX := Gensrc, \
10554359Sroberto    MAKE_SUBDIR := gensrc, \
10654359Sroberto    CHECK_MODULES := $(ALL_MODULES), \
10754359Sroberto    MULTIPLE_MAKEFILES := true))
10882498Sroberto
10954359SrobertoJDK_GENSRC_TARGETS := $(filter %-gensrc-jdk, $(GENSRC_TARGETS))
11054359SrobertoLANGTOOLS_GENSRC_TARGETS := $(filter %-gensrc-langtools, $(GENSRC_TARGETS))
11154359SrobertoCORBA_GENSRC_TARGETS := $(filter %-gensrc-corba, $(GENSRC_TARGETS))
11282498SrobertoHOTSPOT_GENSRC_TARGETS := $(filter %-gensrc-hotspot, $(GENSRC_TARGETS))
11354359Sroberto
11454359SrobertoGENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
115182007SrobertoGENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
116132451Sroberto    $(GENSRC_MODULEINFO_MODULES))
117132451Sroberto
118132451SrobertoGENSRC_MODULES := $(GENSRC_MODULEINFO_MODULES)
119182007SrobertoGENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \
120182007Sroberto    $(addsuffix -gensrc, $(GENSRC_MODULES)))
121182007Sroberto
122285612Sdelphijdefine DeclareModuleInfoRecipe
123285612Sdelphij  $1-gensrc-moduleinfo:
124285612Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
125285612Sdelphij	    -f GensrcModuleInfo.gmk MODULE=$1)
126285612Sdelphij
12782498Sroberto  $1-gensrc: $1-gensrc-moduleinfo
128285612Sdelphijendef
129285612Sdelphij
130285612Sdelphij$(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m)))
131285612Sdelphij
132285612SdelphijALL_TARGETS += $(GENSRC_TARGETS)
13354359Sroberto
134182007Sroberto################################################################################
135285612Sdelphij# Generate data targets
136182007Sroberto$(eval $(call DeclareRecipesForPhase, GENDATA, \
137182007Sroberto    TARGET_SUFFIX := gendata, \
13854359Sroberto    FILE_PREFIX := Gendata, \
139285612Sdelphij    MAKE_SUBDIR := gendata, \
140285612Sdelphij    CHECK_MODULES := $(ALL_MODULES), \
141285612Sdelphij    USE_WRAPPER := true))
142285612Sdelphij
143285612SdelphijALL_TARGETS += $(GENDATA_TARGETS)
144285612Sdelphij
145285612Sdelphij################################################################################
146285612Sdelphij# Copy files targets
147285612Sdelphij$(eval $(call DeclareRecipesForPhase, COPY, \
148285612Sdelphij    TARGET_SUFFIX := copy, \
149285612Sdelphij    FILE_PREFIX := Copy, \
15054359Sroberto    MAKE_SUBDIR := copy, \
15154359Sroberto    CHECK_MODULES := $(ALL_MODULES), \
15254359Sroberto    USE_WRAPPER := true, \
15382498Sroberto    MULTIPLE_MAKEFILES := true))
15454359Sroberto
15582498SrobertoALL_COPY_MODULES += $(COPY_MODULES)
15682498SrobertoALL_COPY_TARGETS += $(COPY_TARGETS)
15782498Sroberto
15882498SrobertoIMPORT_COPY_MODULES := $(call FindImportedModules)
15982498SrobertoIMPORT_COPY_TARGETS := $(addsuffix -copy, $(IMPORT_COPY_MODULES))
160285612SdelphijALL_COPY_MODULES += $(IMPORT_COPY_MODULES)
161285612SdelphijALL_COPY_TARGETS += $(IMPORT_COPY_TARGETS)
16254359Sroberto
163285612Sdelphijdefine DeclareImportCopyRecipe
16454359Sroberto  $1-copy:
165285612Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
16654359Sroberto	    -f CopyImportModules.gmk MODULE=$1)
167285612Sdelphijendef
168132451Sroberto
169285612Sdelphij$(foreach m, $(IMPORT_COPY_MODULES), $(eval $(call DeclareImportCopyRecipe,$m)))
170285612Sdelphij
171285612SdelphijALL_TARGETS += $(ALL_COPY_TARGETS)
17254359Sroberto
173285612Sdelphij################################################################################
174285612Sdelphij# Targets for compiling all java modules. Nashorn is treated separately.
175285612SdelphijJAVA_MODULES := $(ALL_MODULES)
17654359SrobertoJAVA_TARGETS := $(addsuffix -java, $(JAVA_MODULES))
177182007Sroberto
178285612Sdelphijdefine DeclareCompileJavaRecipe
179285612Sdelphij  $1-java:
180285612Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
181285612Sdelphij	    -f CompileJavaModules.gmk MODULE=$1)
182285612Sdelphijendef
183285612Sdelphij
184285612Sdelphij$(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \
185285612Sdelphij    $(eval $(call DeclareCompileJavaRecipe,$m)))
186132451Sroberto
187285612Sdelphij# Build nashorn. Needs to be compiled separately from the rest of the modules
188182007Sroberto# due to nasgen.
189132451Srobertojdk.scripting.nashorn-java:
190285612Sdelphij	+($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
191285612Sdelphij	    -f BuildNashorn.gmk compile)
192285612Sdelphij
193285612SdelphijALL_TARGETS += $(JAVA_TARGETS)
19454359Sroberto
19554359Sroberto################################################################################
19654359Sroberto# Targets for running rmic.
19754359Sroberto$(eval $(call DeclareRecipesForPhase, RMIC, \
19854359Sroberto    TARGET_SUFFIX := rmic, \
199182007Sroberto    FILE_PREFIX := Rmic, \
200182007Sroberto    MAKE_SUBDIR := rmic, \
20154359Sroberto    CHECK_MODULES := $(ALL_MODULES)))
20254359Sroberto
20354359SrobertoALL_TARGETS += $(RMIC_TARGETS)
20454359Sroberto
20554359Sroberto################################################################################
20654359Sroberto# Targets for compiling native libraries
207285612Sdelphij$(eval $(call DeclareRecipesForPhase, LIBS, \
20854359Sroberto    TARGET_SUFFIX := libs, \
20954359Sroberto    FILE_PREFIX := Lib, \
21054359Sroberto    MAKE_SUBDIR := lib, \
211285612Sdelphij    CHECK_MODULES := $(ALL_MODULES), \
212294904Sdelphij    USE_WRAPPER := true))
213294904Sdelphij
214294904SdelphijALL_TARGETS += $(LIBS_TARGETS)
215294904Sdelphij
216294904Sdelphij################################################################################
217285612Sdelphij# Targets for compiling native executables
218285612Sdelphij$(eval $(call DeclareRecipesForPhase, LAUNCHER, \
21954359Sroberto    TARGET_SUFFIX := launchers, \
220285612Sdelphij    FILE_PREFIX := Launcher, \
221285612Sdelphij    MAKE_SUBDIR := launcher, \
222132451Sroberto    CHECK_MODULES := $(ALL_MODULES), \
22354359Sroberto    USE_WRAPPER := true))
224285612Sdelphij
225285612SdelphijALL_TARGETS += $(LAUNCHER_TARGETS)
226285612Sdelphij
227285612Sdelphij################################################################################
228285612Sdelphij# Build hotspot target
229285612Sdelphij
230285612Sdelphijifeq ($(BUILD_HOTSPOT),true)
231285612Sdelphij  hotspot:
23254359Sroberto        ifeq ($(USE_NEW_HOTSPOT_BUILD), true)
233285612Sdelphij	  +($(CD) $(HOTSPOT_TOPDIR)/makefiles && $(MAKE) $(MAKE_ARGS) -f BuildHotspot.gmk)
234285612Sdelphij        else
235182007Sroberto	  +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
236285612Sdelphij        endif
237285612Sdelphijendif
238285612Sdelphij
239285612Sdelphijhotspot-ide-project:
240285612Sdelphij	+($(CD) $(HOTSPOT_TOPDIR)/makefiles && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk)
241285612Sdelphij
242285612SdelphijALL_TARGETS += hotspot hotspot-ide-project
243285612Sdelphij
244285612Sdelphij################################################################################
245285612Sdelphij# Build demos and samples targets
246285612Sdelphij
247285612Sdelphijdemos-jdk:
248285612Sdelphij	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk)
249285612Sdelphij
250182007Srobertosamples-jdk:
251182007Sroberto	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopySamples.gmk)
252289999Sglebius
253289999SglebiusALL_TARGETS += demos-jdk samples-jdk
254289999Sglebius
255289999Sglebius################################################################################
256289999Sglebius# Jigsaw specific data and analysis targets.
257289999Sglebius
258289999Sglebiusgenerate-summary:
259289999Sglebius	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) -f GenerateModuleSummary.gmk)
260289999Sglebius
261289999SglebiusALL_TARGETS += generate-summary
262289999Sglebius
263289999Sglebius################################################################################
264289999Sglebius# Strip binaries targets
265289999Sglebius
266289999SglebiusSTRIP_MODULES := $(sort $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES) \
267289999Sglebius    $(GENDATA_MODULES))
268289999SglebiusSTRIP_TARGETS := $(addsuffix -strip, $(STRIP_MODULES))
269289999Sglebius
270289999Sglebiusdefine DeclareStripRecipe
271289999Sglebius  $1-strip:
272289999Sglebius	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f StripBinaries.gmk \
273289999Sglebius	    MODULE=$1)
274289999Sglebiusendef
275289999Sglebius
276289999Sglebius$(foreach m, $(STRIP_MODULES), $(eval $(call DeclareStripRecipe,$m)))
277289999Sglebius
278289999SglebiusALL_TARGETS += $(STRIP_TARGETS)
279289999Sglebius
280289999Sglebius################################################################################
281293893Sglebius# Jmod targets
282293893Sglebius
283293893SglebiusJMOD_MODULES := $(ALL_MODULES)
284289999SglebiusJMOD_TARGETS := $(addsuffix -jmod, $(JMOD_MODULES))
285289999Sglebius
286182007Srobertodefine DeclareJmodRecipe
287289999Sglebius  $1-jmod:
288289999Sglebius	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
289289999Sglebius	    MODULE=$1)
290289999Sglebiusendef
291289999Sglebius
292289999Sglebius$(foreach m, $(JMOD_MODULES), $(eval $(call DeclareJmodRecipe,$m)))
293289999Sglebius
294289999SglebiusALL_TARGETS += $(JMOD_TARGETS)
295289999Sglebius
296289999Sglebius################################################################################
297289999Sglebius# Images targets
298289999Sglebius
299289999Sglebius# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
300289999Sglebius# used to track the exact sources used to build that image.
301289999Sglebiussource-tips: $(SUPPORT_OUTPUTDIR)/source_tips
302289999Sglebius$(SUPPORT_OUTPUTDIR)/source_tips: FRC
303289999Sglebius	$(call MakeDir, $(@D))
304289999Sglebius	@$(RM) $@
305289999Sglebius	@$(call GetSourceTips)
306294904Sdelphij
307294904SdelphijBOOTCYCLE_TARGET := product-images
308294904Sdelphijbootcycle-images:
309294904Sdelphij	@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
310294904Sdelphij	+$(MAKE) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
311294904Sdelphij	    JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
312294904Sdelphij
313294904Sdelphijzip-security:
314294904Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
315294904Sdelphij
316294904Sdelphijzip-source:
317294904Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
318294904Sdelphij
319294904Sdelphijjrtfs-jar:
320289999Sglebius	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
321294904Sdelphij
322294904Sdelphijjimages:
323294904Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jimages)
324294904Sdelphij
325294904Sdelphijprofiles:
326294904Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
327294904Sdelphij
328289999Sglebiusmac-bundles-jdk:
329289999Sglebius	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
330289999Sglebius
331289999SglebiusALL_TARGETS += source-tips bootcycle-images zip-security zip-source \
332182007Sroberto    jrtfs-jar jimages profiles mac-bundles-jdk
333289999Sglebius
334289999Sglebius################################################################################
335298770Sdelphij# Docs targets
336298770Sdelphij
337298770Sdelphijdocs-javadoc:
338289999Sglebius	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
339298770Sdelphij
340298770Sdelphijdocs-jvmtidoc:
341298770Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk jvmtidocs)
342298770Sdelphij
343298770Sdelphijzip-docs: docs-javadoc docs-jvmtidoc
344298770Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk zip-docs)
345298770Sdelphij
346182007SrobertoALL_TARGETS += docs-javadoc docs-jvmtidoc
347285612Sdelphij
348285612Sdelphij################################################################################
349285612Sdelphij# Cross compilation support
350182007Sroberto
351182007Srobertoifeq ($(CREATE_BUILDJDK), true)
352285612Sdelphij  # This target is only called by the recursive call below.
353285612Sdelphij  create-buildjdk-compile-hotspot-helper: hotspot
354182007Sroberto  create-buildjdk-compile-modules-helper: jdk.jlink-launchers java.base-copy \
355285612Sdelphij      jdk.jdeps-launchers
356285612Sdelphijendif
357182007Sroberto
358285612Sdelphijcreate-buildjdk-copy:
359285612Sdelphij	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk)
360285612Sdelphij
361285612Sdelphijcreate-buildjdk-compile-hotspot create-buildjdk-compile-modules:
362182007Sroberto	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
363182007Sroberto	    $@-helper \
364285612Sdelphij	    SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
365132451Sroberto	    HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
366132451Sroberto	    CREATING_BUILDJDK=true)
367132451Sroberto
368132451SrobertoALL_TARGETS += create-buildjdk-copy create-buildjdk-compile-hotspot \
369132451Sroberto    create-buildjdk-compile-modules
370132451Sroberto
371132451Sroberto################################################################################
372285612Sdelphij# Build tests
373285612Sdelphij#
374285612Sdelphij
375285612Sdelphijprepare-test-image:
376285612Sdelphij	$(MKDIR) -p $(TEST_IMAGE_DIR)
377285612Sdelphij	$(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
378285612Sdelphij
379132451Srobertobuild-test-hotspot-jtreg-native:
380132451Sroberto	+($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
381285612Sdelphij	    build-test-hotspot-jtreg-native)
38254359Sroberto
38354359Srobertotest-image-hotspot-jtreg-native:
384285612Sdelphij	+($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
385182007Sroberto	    test-image-hotspot-jtreg-native)
38654359Sroberto
38754359Srobertobuild-test-jdk-jtreg-native:
38854359Sroberto	+($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
38954359Sroberto	    build-test-jdk-jtreg-native)
39054359Sroberto
39154359Srobertotest-image-jdk-jtreg-native:
39254359Sroberto	+($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
39354359Sroberto	    test-image-jdk-jtreg-native)
394285612Sdelphij
395285612Sdelphijbuild-test-lib:
396285612Sdelphij	+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk)
39754359Sroberto
39854359Srobertoifeq ($(BUILD_FAILURE_HANDLER), true)
39954359Sroberto  # Builds the failure handler jtreg extension
40054359Sroberto  build-test-failure-handler:
40154359Sroberto	+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
402285612Sdelphij	    -f BuildFailureHandler.gmk build)
403285612Sdelphij
40454359Sroberto  # Runs the tests for the failure handler jtreg extension
405285612Sdelphij  test-failure-handler:
40654359Sroberto	+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
40754359Sroberto	    -f BuildFailureHandler.gmk test)
40854359Sroberto
40954359Sroberto  # Copies the failure handler jtreg extension into the test image
41054359Sroberto  test-image-failure-handler:
41154359Sroberto	+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
41254359Sroberto	     -f BuildFailureHandler.gmk images)
41354359Srobertoendif
41454359Sroberto
41554359SrobertoALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
41654359Sroberto    test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
41754359Sroberto    test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \
41854359Sroberto    test-failure-handler test-image-failure-handler
41954359Sroberto
42054359Sroberto################################################################################
42154359Sroberto# Run tests
42254359Sroberto
42354359Sroberto# Run tests specified by $(TEST), or the default test set.
42454359Srobertotest:
42554359Sroberto	$(call RunTests, $(TEST))
42654359Sroberto
42754359Srobertotest-hotspot-jtreg:
42854359Sroberto	$(call RunTests, "hotspot_all")
42954359Sroberto
43054359Srobertotest-hotspot-jtreg-native:
43154359Sroberto	$(call RunTests, "hotspot_native_sanity")
43254359Sroberto
43354359Srobertotest-hotspot-internal:
43454359Sroberto	$(call RunTests, "hotspot_internal")
435285612Sdelphij
43654359Srobertotest-jdk-jtreg-native:
43754359Sroberto	$(call RunTests, "jdk_native_sanity")
43854359Sroberto
43954359Srobertotest-make:
440285612Sdelphij	($(CD) $(SRC_ROOT)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET))
44182498Sroberto
44282498SrobertoALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \
44382498Sroberto    test-hotspot-internal test-jdk-jtreg-native test-make
44482498Sroberto
44582498Sroberto################################################################################
44682498Sroberto# Install targets
44782498Sroberto
448285612Sdelphijinstall:
44982498Sroberto	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Install.gmk)
450285612Sdelphij
45182498SrobertoALL_TARGETS += install
45254359Sroberto
45354359Sroberto################################################################################
45454359Sroberto#
45554359Sroberto# Dependency declarations between targets.
45654359Sroberto#
45754359Sroberto# These are declared in two groups. First all dependencies between targets that
45854359Sroberto# have recipes above as these dependencies may be disabled. Then the aggregator
45954359Sroberto# targets that do not have recipes of their own, which will never have their
46054359Sroberto# dependencies disabled.
46154359Sroberto#
46254359Sroberto################################################################################
46354359Sroberto# Targets with recipes above
46454359Sroberto
46554359Sroberto# If running an *-only target, parallel execution and dependencies between
46654359Sroberto# recipe targets are disabled. This makes it possible to run a select set of
46754359Sroberto# recipe targets in order. It's the responsibility of the user to make sure
46854359Sroberto# all prerequisites are fulfilled.
46954359Srobertoifneq ($(findstring -only, $(MAKECMDGOALS)), )
47082498Sroberto  .NOTPARALLEL:
47154359Srobertoelse
472285612Sdelphij  $(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools
473285612Sdelphij
474285612Sdelphij  interim-langtools: $(LANGTOOLS_GENSRC_TARGETS)
47582498Sroberto
47654359Sroberto  buildtools-jdk: interim-langtools interim-cldrconverter
47754359Sroberto
47854359Sroberto  $(CORBA_GENSRC_TARGETS): interim-langtools
47954359Sroberto
48054359Sroberto  $(HOTSPOT_GENSRC_TARGETS): interim-langtools
48154359Sroberto
48254359Sroberto  $(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
48354359Sroberto
48482498Sroberto  $(GENSRC_MODULEINFO_TARGETS): buildtools-jdk
48554359Sroberto
486285612Sdelphij  $(GENDATA_TARGETS): interim-langtools buildtools-jdk
48782498Sroberto
48854359Sroberto  interim-rmic: interim-langtools
48954359Sroberto
49054359Sroberto  $(RMIC_TARGETS): interim-langtools interim-rmic
49182498Sroberto
49254359Sroberto  $(JAVA_TARGETS): interim-langtools
493285612Sdelphij
494285612Sdelphij  hotspot-ide-project: hotspot exploded-image
495285612Sdelphij
496285612Sdelphij  import-hotspot: hotspot
49782498Sroberto
49854359Sroberto  generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
49954359Sroberto
50054359Sroberto  $(LIBS_TARGETS): import-hotspot
50154359Sroberto
50282498Sroberto  $(LAUNCHER_TARGETS): java.base-libs
50354359Sroberto
504285612Sdelphij  ifeq ($(STATIC_BUILD), true)
505285612Sdelphij    $(LAUNCHER_TARGETS): generate-exported-symbols
50682498Sroberto  endif
50754359Sroberto
50854359Sroberto  # The demos are currently linking to libjvm and libjava, just like all other
50954359Sroberto  # jdk libs, even though they don't need to. To avoid warnings, make sure they
51082498Sroberto  # aren't built until after libjava and libjvm are available to link to.
51154359Sroberto  demos-jdk: $(JAVA_TARGETS)
512285612Sdelphij
513285612Sdelphij  # Declare dependency from <module>-java to <module>-gensrc
51482498Sroberto  $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
51554359Sroberto
51654359Sroberto  # Declare dependencies between java modules
517285612Sdelphij  $(foreach m, $(JAVA_MODULES), \
51854359Sroberto      $(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \
51956746Sroberto      $(call FindDepsForModule,$m)))))
52054359Sroberto
52154359Sroberto  # Declare dependencies between <module>-rmic to <module>-java
52254359Sroberto  $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
52354359Sroberto
524285612Sdelphij  # Declare dependencies from <module>-lib to <module>-java
52554359Sroberto  # Skip modules that do not have java source. When creating a BUILD_JDK, the
52654359Sroberto  # java compilation has already been done by the normal build and copied in.
52754359Sroberto  ifneq ($(CREATING_BUILDJDK), true)
52854359Sroberto  $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
52954359Sroberto  endif
53054359Sroberto
531285612Sdelphij  # Declare dependencies from all other <module>-lib to java.base-lib
53254359Sroberto  $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
533285612Sdelphij      $(eval $t: java.base-libs))
534285612Sdelphij
535285612Sdelphij  # jdk.accessibility depends on java.desktop
536285612Sdelphij  jdk.accessibility-libs: java.desktop-libs
537285612Sdelphij
538285612Sdelphij  # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
539285612Sdelphij  # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
540285612Sdelphij  # virtual target.
541285612Sdelphij  jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
542285612Sdelphij
543285612Sdelphij  # The swing beans need to have java base properly generated to avoid errors
544285612Sdelphij  # in javadoc.
545285612Sdelphij  java.desktop-gensrc-jdk: java.base-gensrc
54654359Sroberto
547285612Sdelphij  # The annotation processing for jdk.vm.ci needs java.base classes from the
548285612Sdelphij  # current JDK.
549285612Sdelphij  jdk.vm.ci-gensrc-hotspot: java.base-java
550285612Sdelphij
551285612Sdelphij  # Explicitly add dependencies for special targets
552285612Sdelphij  java.base-java: unpack-sec
553285612Sdelphij
554285612Sdelphij  # The copy target copies files generated by gensrc
555285612Sdelphij  java.base-copy-hotspot: java.base-gensrc-hotspot
55654359Sroberto
557289999Sglebius  jdk.jdeps-gendata: java rmic
558289999Sglebius
559289999Sglebius  # Declare dependencies from <module>-strip to libs, launchers, gendata and copy
560289999Sglebius  $(foreach m, $(LIBS_MODULES), $(eval $m-strip: $m-libs))
561285612Sdelphij  $(foreach m, $(LAUNCHER_MODULES), $(eval $m-strip: $m-launchers))
562285612Sdelphij  $(foreach m, $(GENDATA_MODULES), $(eval $m-strip: $m-gendata))
563285612Sdelphij  $(foreach m, $(COPY_MODULES), $(eval $m-strip: $m-copy))
564285612Sdelphij
565285612Sdelphij  # Declare dependencies between jmod targets. Only java.base jmod needs access
566285612Sdelphij  # to the other jmods to be built.
567285612Sdelphij  java.base-jmod: $(filter-out java.base-jmod, $(JMOD_TARGETS))
568285612Sdelphij
569285612Sdelphij  # Declare dependencies from <module>-jmod to all other module targets
570182007Sroberto  $(foreach m, $(STRIP_MODULES), $(eval $m-jmod: $m-strip))
571285612Sdelphij  $(foreach m, $(JAVA_MODULES), $(eval $m-jmod: $m-java))
572285612Sdelphij  $(foreach m, $(GENDATA_MODULES), $(eval $m-jmod: $m-gendata))
573285612Sdelphij  $(foreach m, $(RMIC_MODULES), $(eval $m-jmod: $m-rmic))
574285612Sdelphij  $(foreach m, $(LIBS_MODULES), $(eval $m-jmod: $m-libs))
575285612Sdelphij  $(foreach m, $(LAUNCHER_MODULES), $(eval $m-jmod: $m-launchers))
576285612Sdelphij  $(foreach m, $(COPY_MODULES), $(eval $m-jmod: $m-copy))
577285612Sdelphij
578285612Sdelphij  # Jmods cannot be created until we have the jlink tool ready to run, which requires
579182007Sroberto  # all java modules to be compiled and jdk.jlink-launchers.
580285612Sdelphij  $(JMOD_TARGETS): java java.base-libs jdk.jlink-launchers
581285612Sdelphij
582285612Sdelphij  ifeq ($(CREATE_BUILDJDK), true)
583285612Sdelphij    $(JMOD_TARGETS): create-buildjdk
584285612Sdelphij  endif
585285612Sdelphij
58654359Sroberto  zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
587285612Sdelphij      $(filter jdk.crypto%, $(JAVA_TARGETS))
588285612Sdelphij
589285612Sdelphij  zip-source: gensrc rmic
590285612Sdelphij
591285612Sdelphij  jrtfs-jar: interim-langtools
592285612Sdelphij
593285612Sdelphij  jimages: jmods zip-source source-tips demos samples jrtfs-jar
594285612Sdelphij
595285612Sdelphij  profiles: jmods zip-source source-tips jrtfs-jar
596285612Sdelphij
597285612Sdelphij  mac-bundles-jdk: jimages
598285612Sdelphij
599182007Sroberto  bootcycle-images: jimages
600285612Sdelphij
601182007Sroberto  docs-javadoc: $(GENSRC_TARGETS) rmic
60254359Sroberto
603285612Sdelphij  docs-jvmtidoc: hotspot
604285612Sdelphij
605285612Sdelphij  test: jimages test-image
60654359Sroberto
607285612Sdelphij  create-buildjdk-copy: jdk.jlink-java java.base-gendata
608285612Sdelphij
609285612Sdelphij  create-buildjdk-compile-modules: create-buildjdk-copy create-buildjdk-compile-hotspot
61054359Sroberto
611285612Sdelphij  test-make: clean-test-make
612285612Sdelphij
613285612Sdelphij  build-test-lib: java
614285612Sdelphij
61554359Sroberto  build-test-failure-handler: interim-langtools
616285612Sdelphij
61754359Sroberto  test-failure-handler: build-test-failure-handler
61854359Sroberto
619285612Sdelphij  test-image-failure-handler: build-test-failure-handler
620285612Sdelphij
621285612Sdelphij  build-test-hotspot-jtreg-native: buildtools-jdk
622285612Sdelphij
623285612Sdelphij  build-test-jdk-jtreg-native: buildtools-jdk
624285612Sdelphij
625285612Sdelphij  test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
626285612Sdelphij
627285612Sdelphij  test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
628285612Sdelphij
629285612Sdelphij  test-hotspot-internal: exploded-image
630285612Sdelphij
631285612Sdelphij  test-hotspot-jtreg: jimages test-image
632182007Sroberto
633285612Sdelphij  install: product-images
63454359Sroberto
63554359Sroberto  generate-summary: jmods
636285612Sdelphij
63754359Srobertoendif
638182007Sroberto
639182007Sroberto################################################################################
640182007Sroberto# Virtual targets without recipes
641285612Sdelphij
642182007Srobertobuildtools: buildtools-langtools interim-langtools interim-rmic \
643182007Sroberto    buildtools-jdk
644285612Sdelphij
645182007Srobertogensrc: $(GENSRC_TARGETS)
646285612Sdelphij
647285612Sdelphijgendata: $(GENDATA_TARGETS)
648285612Sdelphij
649285612Sdelphijcopy: $(ALL_COPY_TARGETS)
650285612Sdelphij
651285612Sdelphijjava: $(JAVA_TARGETS)
652285612Sdelphij
653285612Sdelphijrmic: $(RMIC_TARGETS)
654182007Sroberto
655182007Srobertolibs: $(LIBS_TARGETS)
656182007Sroberto
657182007Srobertolaunchers: $(LAUNCHER_TARGETS)
658285612Sdelphij
659285612Sdelphijjmods: $(JMOD_TARGETS)
660285612Sdelphij
661182007Srobertostrip-binaries: $(STRIP_TARGETS)
662285612Sdelphij
663285612Sdelphij# Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
664285612Sdelphij# is actually handled by jdk.jdi-gensrc
665182007Srobertojdk.jdwp.agent-gensrc: jdk.jdi-gensrc
666182007Sroberto
667285612Sdelphij# Declare dependencies from <module> to all the individual targets specific
668285612Sdelphij# to that module <module>-*, that are needed for the exploded image.
669285612Sdelphij$(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
670285612Sdelphij$(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
671285612Sdelphij$(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
672285612Sdelphij$(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
673182007Sroberto$(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
674182007Sroberto$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
675182007Sroberto$(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
676182007Srobertodemos: demos-jdk
677182007Sroberto
678182007Srobertosamples: samples-jdk
679285612Sdelphij
680182007Sroberto# The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
681182007Srobertoexploded-image: $(ALL_MODULES)
682182007Sroberto
683182007Srobertocreate-buildjdk: create-buildjdk-compile-modules create-buildjdk-copy \
684182007Sroberto    create-buildjdk-compile-hotspot
685285612Sdelphij
686182007Srobertomac-bundles: mac-bundles-jdk
687285612Sdelphij
688293893Sglebius# The $(BUILD_OUTPUT)/images directory contain the resulting deliverables,
689293893Sglebius# and in line with this, our targets for creating these are named *-image[s].
690293893Sglebius
691285612Sdelphij# This target builds the product images, e.g. the JRE and JDK image
692285612Sdelphij# (and possibly other, more specific versions)
693285612Sdelphijproduct-images: jimages demos samples zip-security exploded-image
694285612Sdelphij
695285612Sdelphij# When cross compiling and building a partial BUILDJDK for the build host,
696285612Sdelphij# the summary generation cannot be run.
697285612Sdelphijifneq ($(CREATE_BUILDJDK), true)
698285612Sdelphij  product-images: generate-summary
699285612Sdelphijendif
700285612Sdelphij
701285612Sdelphijifeq ($(OPENJDK_TARGET_OS), macosx)
702285612Sdelphij  product-images: mac-bundles
703285612Sdelphijendif
704285612Sdelphij
705285612Sdelphij# This target builds the documentation image
706285612Sdelphijdocs-image: zip-docs
707285612Sdelphij
708285612Sdelphij# This target builds the test image
709285612Sdelphijtest-image: prepare-test-image test-image-hotspot-jtreg-native \
710285612Sdelphij    test-image-jdk-jtreg-native test-image-failure-handler
711285612Sdelphij
712285612Sdelphij# all-images is the top-most target, it builds all our deliverables ("images").
71382498Srobertoall-images: product-images test-image docs-image
714285612Sdelphij
715285612SdelphijALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers jmods \
716182007Sroberto    jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples exploded-image \
717182007Sroberto    create-buildjdk mac-bundles product-images docs-image test-image all-images
718285612Sdelphij
719182007Sroberto################################################################################
72082498Sroberto
72182498Sroberto# Traditional targets typically run by users.
72254359Sroberto# These can be considered aliases for the targets now named by a more
72354359Sroberto# "modern" naming scheme.
724182007Srobertodefault: $(DEFAULT_MAKE_TARGET)
725182007Srobertojdk: exploded-image
72654359Srobertoimages: product-images
72754359Srobertodocs: docs-image
72854359Srobertoall: all-images
729285612Sdelphij
73054359SrobertoALL_TARGETS += default jdk images docs all zip-docs
731285612Sdelphij
732285612Sdelphij################################################################################
733285612Sdelphij################################################################################
734285612Sdelphij#
735285612Sdelphij# Clean targets
736285612Sdelphij#
737285612Sdelphij################################################################################
738285612Sdelphij# Clean targets are automatically run serially by the Makefile calling this
739285612Sdelphij# file.
740285612Sdelphij
741285612SdelphijCLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
742285612Sdelphij    images make-support test-make bundles buildjdk
743285612SdelphijCLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
744285612SdelphijCLEAN_SUPPORT_DIRS += demos
745285612SdelphijCLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
746285612SdelphijCLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
747285612SdelphijCLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
748285612SdelphijCLEAN_PHASES := gensrc java native include docs
749285612SdelphijCLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
750285612SdelphijCLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
751285612Sdelphij# Construct targets of the form clean-$module-$phase
752285612SdelphijCLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \
753285612Sdelphij    $(addprefix $m-, $(CLEAN_PHASES))))
754285612Sdelphij
755285612Sdelphij# Remove everything, except the output from configure.
756285612Sdelphijclean: $(CLEAN_DIR_TARGETS)
757285612Sdelphij	($(CD) $(OUTPUT_ROOT) && $(RM) -r build*.log*)
758285612Sdelphij	$(ECHO) Cleaned all build artifacts.
75954359Sroberto
760285612Sdelphij$(CLEAN_DIR_TARGETS):
761285612Sdelphij	$(call CleanDir,$(patsubst clean-%, %, $@))
762285612Sdelphij
76354359Sroberto$(CLEAN_SUPPORT_DIR_TARGETS):
764285612Sdelphij	$(call CleanSupportDir,$(patsubst clean-%, %, $@))
765285612Sdelphij
766285612Sdelphij$(CLEAN_TEST_TARGETS):
767285612Sdelphij	$(call CleanTest,$(patsubst clean-test-%, %, $@))
76854359Sroberto
769285612Sdelphij$(CLEAN_PHASE_TARGETS):
770285612Sdelphij	$(call Clean-$(patsubst clean-%,%, $@))
77154359Sroberto
772285612Sdelphij$(CLEAN_MODULE_TARGETS):
773285612Sdelphij	$(call CleanModule,$(patsubst clean-%, %, $@))
774285612Sdelphij
775285612Sdelphij$(CLEAN_MODULE_PHASE_TARGETS):
776285612Sdelphij	$(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \
777285612Sdelphij	    $(word 2, $(subst -,$(SPACE),$@)))
778285612Sdelphij
779285612Sdelphij# When removing the support dir, we must also remove jdk. Building classes has
780285612Sdelphij# the side effect of generating native headers. The headers end up in support
781285612Sdelphij# while classes and touch files end up in jdk.
782285612Sdelphijclean-support: clean-jdk
783285612Sdelphij
784285612Sdelphij# Remove everything, including configure configuration. If the output
785285612Sdelphij# directory was created by configure and now becomes empty, remove it as well.
786285612Sdelphijdist-clean: clean
787285612Sdelphij	($(CD) $(OUTPUT_ROOT) && \
788285612Sdelphij	    $(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide)
789285612Sdelphij	$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
790285612Sdelphij	  if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
791285612Sdelphij	    $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
792285612Sdelphij	  else \
793285612Sdelphij	    ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \
794285612Sdelphij	        && $(RM) -r $(OUTPUT_ROOT)) \
795285612Sdelphij	  fi \
796285612Sdelphij	)
79754359Sroberto	$(ECHO) Cleaned everything, you will have to re-run configure.
79854359Sroberto
799285612SdelphijALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \
80054359Sroberto    $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \
80154359Sroberto    $(CLEAN_MODULE_PHASE_TARGETS)
80254359Sroberto
80354359Sroberto################################################################################
80454359Sroberto# Declare *-only targets for each normal target
805285612Sdelphij$(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
806285612Sdelphij
807285612SdelphijALL_TARGETS += $(addsuffix -only, $(filter-out dist-clean clean%, $(ALL_TARGETS)))
80854359Sroberto
809285612Sdelphij################################################################################
810285612Sdelphij
81154359Sroberto# Include JPRT targets
812285612Sdelphijinclude $(SRC_ROOT)/make/Jprt.gmk
81354359Sroberto
814285612Sdelphij################################################################################
815285612Sdelphij
816285612Sdelphij# The following targets are intentionally not added to ALL_TARGETS since they
817285612Sdelphij# are internal only, to support Init.gmk.
818285612Sdelphij
81954359Srobertoprint-targets:
820285612Sdelphij	  @$(ECHO) $(sort $(ALL_TARGETS))
821285612Sdelphij
822285612Sdelphijprint-modules:
823285612Sdelphij	  @$(ECHO) $(sort $(ALL_MODULES))
824132451Sroberto
825285612Sdelphijcreate-main-targets-include:
826285612Sdelphij	  $(call LogInfo, Generating main target list)
827285612Sdelphij	  @$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
828285612Sdelphij	      $(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
829285612Sdelphij
830285612Sdelphij################################################################################
831285612Sdelphij
832132451Sroberto.PHONY: $(ALL_TARGETS)
83354359Sroberto
834182007SrobertoFRC: # Force target
83554359Sroberto