2012-10-26 21:29:57 +00:00
|
|
|
#
|
2015-02-27 10:56:57 +00:00
|
|
|
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
2012-10-26 21:29:57 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
# This is the main makefile containing most actual top level targets. It needs
|
|
|
|
# to be called with a SPEC file defined.
|
|
|
|
|
|
|
|
# Declare default target
|
|
|
|
default:
|
2012-10-26 21:29:57 +00:00
|
|
|
|
|
|
|
# Now load the spec
|
|
|
|
include $(SPEC)
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
include $(SRC_ROOT)/make/MakeHelpers.gmk
|
|
|
|
|
2013-10-10 12:58:19 +00:00
|
|
|
# Load the vital tools for all the makefiles.
|
2013-11-14 09:53:23 +00:00
|
|
|
include $(SRC_ROOT)/make/common/MakeBase.gmk
|
2014-08-21 10:22:42 +00:00
|
|
|
include $(SRC_ROOT)/make/common/Modules.gmk
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
|
2014-11-27 14:41:56 +00:00
|
|
|
# valid top level targets. It's used to declare them all as PHONY and to
|
2014-08-17 14:51:37 +00:00
|
|
|
# generate the -only targets.
|
|
|
|
ALL_TARGETS :=
|
|
|
|
|
2014-02-12 23:00:20 +00:00
|
|
|
# Hook to include the corresponding custom file, if present.
|
|
|
|
$(eval $(call IncludeCustomExtension, , Main.gmk))
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
# All modules for the current target platform.
|
|
|
|
# Manually add jdk.hotspot.agent for now.
|
|
|
|
ALL_MODULES := $(call FindAllModules) jdk.hotspot.agent
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# Recipes for all targets. Only recipes, dependencies are declared later.
|
|
|
|
#
|
|
|
|
################################################################################
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
# Interim/build tools targets, compiling tools used during the build
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
buildtools-langtools:
|
|
|
|
+($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Tools.gmk)
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
interim-langtools:
|
|
|
|
+($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk)
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
interim-corba:
|
2014-12-03 14:20:21 +00:00
|
|
|
+($(CD) $(CORBA_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk)
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
interim-rmic:
|
|
|
|
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
|
2012-12-28 08:51:15 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
buildtools-jdk:
|
2014-08-17 14:51:37 +00:00
|
|
|
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Tools.gmk java-tools)
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
ALL_TARGETS += buildtools-langtools interim-langtools interim-corba \
|
|
|
|
interim-rmic buildtools-jdk
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Special targets for certain modules
|
|
|
|
|
|
|
|
import-hotspot:
|
|
|
|
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Import.gmk)
|
|
|
|
|
|
|
|
unpack-sec:
|
|
|
|
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UnpackSecurity.gmk)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
ALL_TARGETS += import-hotspot unpack-sec
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Gensrc targets, generating source before java compilation can be done
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, GENSRC, \
|
|
|
|
TARGET_SUFFIX := gensrc, \
|
|
|
|
FILE_PREFIX := Gensrc, \
|
|
|
|
MAKE_SUBDIR := gensrc, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
|
|
|
MULTIPLE_MAKEFILES := true))
|
|
|
|
|
|
|
|
JDK_GENSRC_TARGETS := $(filter %-gensrc-jdk, $(GENSRC_TARGETS))
|
|
|
|
LANGTOOLS_GENSRC_TARGETS := $(filter %-gensrc-langtools, $(GENSRC_TARGETS))
|
|
|
|
CORBA_GENSRC_TARGETS := $(filter %-gensrc-corba, $(GENSRC_TARGETS))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
ALL_TARGETS += $(GENSRC_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Generate data targets
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, GENDATA, \
|
|
|
|
TARGET_SUFFIX := gendata, \
|
|
|
|
FILE_PREFIX := Gendata, \
|
|
|
|
MAKE_SUBDIR := gendata, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
|
|
|
USE_WRAPPER := true))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
ALL_TARGETS += $(GENDATA_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Copy files targets
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, COPY, \
|
|
|
|
TARGET_SUFFIX := copy, \
|
|
|
|
FILE_PREFIX := Copy, \
|
|
|
|
MAKE_SUBDIR := copy, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
|
|
|
USE_WRAPPER := true))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
ALL_TARGETS += $(COPY_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Targets for compiling all java modules. Nashorn is treated separately.
|
|
|
|
JAVA_MODULES := $(call FindJavaModules)
|
|
|
|
JAVA_TARGETS := $(addsuffix -java, $(JAVA_MODULES))
|
|
|
|
|
|
|
|
define DeclareCompileJavaRecipe
|
|
|
|
$1-java:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CompileJavaModules.gmk \
|
|
|
|
$1 JAVA_MODULES=$1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \
|
|
|
|
$(eval $(call DeclareCompileJavaRecipe,$m)))
|
|
|
|
|
|
|
|
# Build nashorn. Needs to be compiled separately from the rest of the modules
|
|
|
|
# due to nasgen.
|
|
|
|
jdk.scripting.nashorn-java:
|
|
|
|
+($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildNashorn.gmk compile)
|
|
|
|
|
|
|
|
ALL_TARGETS += $(JAVA_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Targets for running rmic.
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, RMIC, \
|
|
|
|
TARGET_SUFFIX := rmic, \
|
|
|
|
FILE_PREFIX := Rmic, \
|
|
|
|
MAKE_SUBDIR := rmic, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES)))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
ALL_TARGETS += $(RMIC_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Targets for compiling native libraries
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, LIBS, \
|
|
|
|
TARGET_SUFFIX := libs, \
|
|
|
|
FILE_PREFIX := Lib, \
|
|
|
|
MAKE_SUBDIR := lib, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
|
|
|
USE_WRAPPER := true))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
ALL_TARGETS += $(LIBS_TARGETS)
|
2013-02-04 09:53:38 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
# Targets for compiling native executables
|
2014-12-03 14:20:21 +00:00
|
|
|
$(eval $(call DeclareRecipesForPhase, LAUNCHER, \
|
|
|
|
TARGET_SUFFIX := launchers, \
|
|
|
|
FILE_PREFIX := Launcher, \
|
|
|
|
MAKE_SUBDIR := launcher, \
|
|
|
|
CHECK_MODULES := $(ALL_MODULES), \
|
|
|
|
USE_WRAPPER := true))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
ALL_TARGETS += $(LAUNCHER_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Build hotspot target
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2012-11-12 20:34:11 +00:00
|
|
|
ifeq ($(BUILD_HOTSPOT),true)
|
2014-08-17 14:51:37 +00:00
|
|
|
hotspot:
|
|
|
|
($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
|
2012-11-12 20:34:11 +00:00
|
|
|
endif
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
ALL_TARGETS += hotspot
|
2013-01-21 06:50:40 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
# Build demos and samples targets
|
2013-01-21 06:50:40 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
demos:
|
|
|
|
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileDemos.gmk)
|
|
|
|
|
|
|
|
samples:
|
|
|
|
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopySamples.gmk)
|
|
|
|
|
|
|
|
ALL_TARGETS += demos samples
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
################################################################################
|
|
|
|
# Image targets
|
2012-10-26 21:29:57 +00:00
|
|
|
|
|
|
|
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
|
|
|
|
# used to track the exact sources used to build that image.
|
2014-12-03 14:20:21 +00:00
|
|
|
source-tips: $(SUPPORT_OUTPUTDIR)/source_tips
|
|
|
|
$(SUPPORT_OUTPUTDIR)/source_tips: FRC
|
2012-10-26 21:29:57 +00:00
|
|
|
@$(MKDIR) -p $(@D)
|
|
|
|
@$(RM) $@
|
2013-06-25 07:37:46 +00:00
|
|
|
@$(call GetSourceTips)
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2015-02-06 11:46:59 +00:00
|
|
|
BOOTCYCLE_TARGET := product-images
|
2014-12-03 14:20:21 +00:00
|
|
|
bootcycle-images:
|
|
|
|
@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
|
|
|
|
+$(MAKE) $(MAKE_ARGS) -f Main.gmk SPEC=$(dir $(SPEC))bootcycle-spec.gmk $(BOOTCYCLE_TARGET)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
zip-security:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
zip-source:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
strip-binaries:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f StripBinaries.gmk)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
jrtfs-jar:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
jimages:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jimages)
|
|
|
|
|
|
|
|
profiles:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
|
|
|
|
|
|
|
|
mac-bundles:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
ALL_TARGETS += source-tips bootcycle-images zip-security zip-source strip-binaries \
|
2015-02-27 10:56:57 +00:00
|
|
|
jrtfs-jar jimages profiles mac-bundles
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Docs targets
|
|
|
|
|
|
|
|
docs-javadoc:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
|
|
|
|
|
|
|
|
docs-jvmtidoc:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk jvmtidocs)
|
|
|
|
|
|
|
|
ALL_TARGETS += docs-javadoc docs-jvmtidoc
|
|
|
|
|
|
|
|
################################################################################
|
2015-02-27 10:56:57 +00:00
|
|
|
# Build tests
|
|
|
|
#
|
|
|
|
|
|
|
|
prepare-test-image:
|
|
|
|
$(MKDIR) -p $(TEST_IMAGE_DIR)
|
|
|
|
$(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
|
|
|
|
|
|
|
|
build-test-hotspot-jtreg-native:
|
|
|
|
+($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
|
|
|
|
build-test-hotspot-jtreg-native)
|
|
|
|
|
|
|
|
test-image-hotspot-jtreg-native:
|
|
|
|
+($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
|
|
|
|
test-image-hotspot-jtreg-native)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2015-02-27 10:56:57 +00:00
|
|
|
build-test-jdk-jtreg-native:
|
|
|
|
+($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
|
|
|
|
build-test-jdk-jtreg-native)
|
|
|
|
|
|
|
|
test-image-jdk-jtreg-native:
|
|
|
|
+($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
|
|
|
|
test-image-jdk-jtreg-native)
|
|
|
|
|
|
|
|
ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
|
|
|
|
test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
|
|
|
|
test-image-jdk-jtreg-native
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Run tests
|
|
|
|
|
|
|
|
# Run tests specified by $(TEST), or the default test set.
|
2014-08-17 14:51:37 +00:00
|
|
|
test:
|
2015-02-27 10:56:57 +00:00
|
|
|
$(call RunTests, $(TEST))
|
|
|
|
|
|
|
|
test-hotspot-jtreg-native:
|
|
|
|
$(call RunTests, "hotspot_native_sanity")
|
|
|
|
|
|
|
|
test-jdk-jtreg-native:
|
|
|
|
$(call RunTests, "jdk_native_sanity")
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
test-make:
|
|
|
|
($(CD) $(SRC_ROOT)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET))
|
|
|
|
|
2015-02-27 10:56:57 +00:00
|
|
|
ALL_TARGETS += test test-hotspot-jtreg-native test-jdk-jtreg-native test-make
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Verification targets
|
|
|
|
|
|
|
|
verify-modules:
|
2014-09-15 19:23:32 +00:00
|
|
|
@$(call TargetEnter)
|
2014-08-29 17:46:21 +00:00
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CheckModules.gmk)
|
2014-09-15 19:23:32 +00:00
|
|
|
@$(call TargetExit)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-08-29 17:46:21 +00:00
|
|
|
ALL_TARGETS += verify-modules
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Install targets
|
|
|
|
|
|
|
|
install:
|
|
|
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Install.gmk)
|
|
|
|
|
|
|
|
ALL_TARGETS += install
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
#
|
2014-11-27 14:41:56 +00:00
|
|
|
# Dependency declarations between targets.
|
2014-08-17 14:51:37 +00:00
|
|
|
#
|
2014-11-27 14:41:56 +00:00
|
|
|
# These are declared in two groups. First all dependencies between targets that
|
2014-08-17 14:51:37 +00:00
|
|
|
# have recipes above as these dependencies may be disabled. Then the aggregator
|
|
|
|
# targets that do not have recipes of their own, which will never have their
|
|
|
|
# dependencies disabled.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
# Targets with recipes above
|
|
|
|
|
2014-11-27 14:41:56 +00:00
|
|
|
# If running an *-only target, parallel execution and dependencies between
|
|
|
|
# recipe targets are disabled. This makes it possible to run a select set of
|
2014-08-17 14:51:37 +00:00
|
|
|
# recipe targets in order. It's the responsibility of the user to make sure
|
2014-11-27 14:41:56 +00:00
|
|
|
# all prerequisites are fulfilled.
|
2014-08-17 14:51:37 +00:00
|
|
|
ifneq ($(findstring -only, $(MAKECMDGOALS)), )
|
|
|
|
.NOTPARALLEL:
|
|
|
|
else
|
2014-12-03 14:20:21 +00:00
|
|
|
$(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
interim-langtools: $(LANGTOOLS_GENSRC_TARGETS)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
buildtools-jdk: interim-langtools
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
$(CORBA_GENSRC_TARGETS): interim-langtools
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
$(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
interim-corba: $(CORBA_GENSRC_TARGETS)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
$(GENDATA_TARGETS): interim-langtools buildtools-jdk
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
interim-rmic: interim-langtools
|
|
|
|
|
|
|
|
$(RMIC_TARGETS): interim-langtools interim-corba interim-rmic
|
|
|
|
|
|
|
|
import-hotspot: hotspot
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
$(LIBS_TARGETS): import-hotspot
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
$(LAUNCHER_TARGETS): java.base-libs
|
|
|
|
|
2014-08-21 09:05:01 +00:00
|
|
|
# The demos are currently linking to libjvm and libjava, just like all other
|
|
|
|
# jdk libs, even though they don't need to. To avoid warnings, make sure they
|
|
|
|
# aren't built until after libjava and libjvm are available to link to.
|
2014-08-17 14:51:37 +00:00
|
|
|
demos: $(JAVA_TARGETS)
|
|
|
|
|
|
|
|
# Declare dependency from <module>-java to <module>-gensrc
|
|
|
|
$(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
|
|
|
|
|
|
|
|
# Declare dependencies between java modules
|
|
|
|
$(foreach m, $(JAVA_MODULES), \
|
|
|
|
$(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \
|
|
|
|
$(call FindDepsForModule,$m)))))
|
|
|
|
|
|
|
|
# Declare dependencies between <module>-rmic to <module>-java
|
|
|
|
$(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
|
|
|
|
|
|
|
|
# Declare dependencies from <module>-lib to <module>-java
|
2015-02-16 11:25:56 +00:00
|
|
|
# Skip modules that do not have java source.
|
|
|
|
$(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
# Declare dependencies from all other <module>-lib to java.base-lib
|
2014-12-03 14:20:21 +00:00
|
|
|
$(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
|
2014-08-17 14:51:37 +00:00
|
|
|
$(eval $t: java.base-libs))
|
2014-11-27 14:41:56 +00:00
|
|
|
# Declare the special case dependency for jdk.deploy.osx where libosx
|
2014-08-17 14:51:37 +00:00
|
|
|
# links against libosxapp.
|
|
|
|
jdk.deploy.osx-libs: java.desktop-libs
|
|
|
|
|
2014-11-27 14:41:56 +00:00
|
|
|
# This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
|
2014-12-03 14:20:21 +00:00
|
|
|
# header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
|
|
|
|
# virtual target.
|
|
|
|
jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
|
|
|
|
|
|
|
|
# Until the module system is in place, jdk.jdi-gensrc needs to combine service
|
|
|
|
# loader configuration with jdk.hotspot.agent so is dependent on importing
|
|
|
|
# hotspot.
|
|
|
|
jdk.jdi-gensrc-jdk: import-hotspot
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-09-23 14:23:25 +00:00
|
|
|
# The swing beans need to have java base properly generated to avoid errors
|
|
|
|
# in javadoc.
|
2014-12-03 14:20:21 +00:00
|
|
|
java.desktop-gensrc-jdk: java.base-gensrc
|
2014-09-23 14:23:25 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
# Explicitly add dependencies for special targets
|
|
|
|
java.base-java: unpack-sec
|
|
|
|
|
2014-08-29 17:46:21 +00:00
|
|
|
jdk.dev-gendata: java rmic
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
|
|
|
|
$(filter jdk.crypto%, $(JAVA_TARGETS))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
zip-source: gensrc rmic
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
strip-binaries: libs launchers gendata copy
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
jrtfs-jar: buildtools-jdk
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
jimages: exploded-image zip-source strip-binaries source-tips demos samples \
|
|
|
|
jrtfs-jar
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
profiles: exploded-image strip-binaries source-tips
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
mac-bundles: jimages
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
bootcycle-images: jimages
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
docs-javadoc: gensrc rmic
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
docs-jvmtidoc: hotspot
|
|
|
|
|
2015-02-27 10:56:57 +00:00
|
|
|
test: jimages test-image
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-08-29 17:46:21 +00:00
|
|
|
verify-modules: exploded-image
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2015-01-26 09:28:53 +00:00
|
|
|
test-make: clean-test-make
|
|
|
|
|
2015-03-02 13:18:01 +00:00
|
|
|
build-test-hotspot-jtreg-native: buildtools-jdk
|
|
|
|
|
|
|
|
build-test-jdk-jtreg-native: buildtools-jdk
|
|
|
|
|
2015-02-27 10:56:57 +00:00
|
|
|
test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
|
|
|
|
|
|
|
|
test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Virtual targets without recipes
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
buildtools: buildtools-langtools interim-langtools interim-corba interim-rmic \
|
|
|
|
buildtools-jdk
|
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
gensrc: $(GENSRC_TARGETS)
|
|
|
|
|
|
|
|
gendata: $(GENDATA_TARGETS)
|
|
|
|
|
|
|
|
copy: $(COPY_TARGETS)
|
|
|
|
|
|
|
|
java: $(JAVA_TARGETS)
|
|
|
|
|
|
|
|
rmic: $(RMIC_TARGETS)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
libs: $(LIBS_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
launchers: $(LAUNCHER_TARGETS)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
# Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
|
|
|
|
# is actually handled by jdk.jdi-gensrc
|
|
|
|
jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
# Declare dependencies from <module> to all the individual targets specific
|
|
|
|
# to that module <module>-*.
|
|
|
|
$(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
|
|
|
|
$(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
|
|
|
|
$(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
|
|
|
|
$(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
|
2014-08-17 14:51:37 +00:00
|
|
|
$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
|
|
|
|
$(foreach m, $(COPY_MODULES), $(eval $m: $m-copy))
|
|
|
|
|
|
|
|
ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \
|
2014-12-03 14:20:21 +00:00
|
|
|
$(GENDATA_MODULES) $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2015-02-06 11:46:59 +00:00
|
|
|
# The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
|
2014-08-29 17:46:21 +00:00
|
|
|
exploded-image: $(ALL_MODULE_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2015-02-27 10:56:57 +00:00
|
|
|
# The $(BUILD_OUTPUT)/images directory contain the resulting deliverables,
|
2015-02-06 11:46:59 +00:00
|
|
|
# and in line with this, our targets for creating these are named *-image[s].
|
|
|
|
|
|
|
|
# This target builds the product images, e.g. the JRE and JDK image
|
|
|
|
# (and possibly other, more specific versions)
|
|
|
|
product-images: jimages demos samples zip-security verify-modules
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
2015-02-06 11:46:59 +00:00
|
|
|
product-images: mac-bundles
|
2014-12-03 14:20:21 +00:00
|
|
|
endif
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2015-02-06 11:46:59 +00:00
|
|
|
# This target builds the documentation image
|
|
|
|
docs-image: docs-javadoc docs-jvmtidoc
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2015-02-06 11:46:59 +00:00
|
|
|
# This target builds the test image
|
2015-02-27 10:56:57 +00:00
|
|
|
test-image: prepare-test-image test-image-hotspot-jtreg-native \
|
|
|
|
test-image-jdk-jtreg-native
|
2015-01-09 15:45:39 +00:00
|
|
|
|
2015-02-06 11:46:59 +00:00
|
|
|
# all-images is the top-most target, it builds all our deliverables ("images").
|
|
|
|
all-images: product-images test-image docs-image
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
|
2015-02-06 11:46:59 +00:00
|
|
|
jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) exploded-image \
|
|
|
|
product-images docs-image test-image all-images
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2015-02-06 11:46:59 +00:00
|
|
|
# Traditional targets typically run by users.
|
|
|
|
# These can be considered aliases for the targets now named by a more
|
|
|
|
# "modern" naming scheme.
|
2014-08-17 14:51:37 +00:00
|
|
|
default: exploded-image
|
2015-02-06 11:46:59 +00:00
|
|
|
jdk: exploded-image
|
|
|
|
images: product-images
|
|
|
|
docs: docs-image
|
|
|
|
all: all-images
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2015-02-06 11:46:59 +00:00
|
|
|
ALL_TARGETS += default jdk images docs all
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# Clean targets
|
|
|
|
#
|
|
|
|
################################################################################
|
2014-11-27 14:41:56 +00:00
|
|
|
# Clean targets are automatically run serially by the Makefile calling this
|
2014-09-05 10:42:41 +00:00
|
|
|
# file.
|
2014-08-17 14:51:37 +00:00
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
|
2015-03-10 13:36:56 +00:00
|
|
|
images make-support test-make bundles
|
2014-12-03 14:20:21 +00:00
|
|
|
CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
|
2015-02-27 10:56:57 +00:00
|
|
|
CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native
|
|
|
|
CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
|
2014-12-03 14:20:21 +00:00
|
|
|
CLEAN_PHASES := gensrc java native include
|
|
|
|
CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
|
|
|
|
CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
|
|
|
|
# Construct targets of the form clean-$module-$phase
|
|
|
|
CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \
|
|
|
|
$(addprefix $m-, $(CLEAN_PHASES))))
|
2012-10-26 21:29:57 +00:00
|
|
|
|
|
|
|
# Remove everything, except the output from configure.
|
2014-12-03 14:20:21 +00:00
|
|
|
clean: $(CLEAN_DIR_TARGETS)
|
|
|
|
($(CD) $(OUTPUT_ROOT) && $(RM) -r source_tips build.log* build-trace*.log*)
|
2014-08-17 14:51:37 +00:00
|
|
|
$(ECHO) Cleaned all build artifacts.
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
$(CLEAN_DIR_TARGETS):
|
|
|
|
$(call CleanDir,$(patsubst clean-%, %, $@))
|
|
|
|
|
2015-02-27 10:56:57 +00:00
|
|
|
$(CLEAN_TEST_TARGETS):
|
|
|
|
$(call CleanTest,$(patsubst clean-test-%, %, $@))
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
$(CLEAN_PHASE_TARGETS):
|
|
|
|
$(call Clean-$(patsubst clean-%,%, $@))
|
|
|
|
|
|
|
|
$(CLEAN_MODULE_TARGETS):
|
|
|
|
$(call CleanModule,$(patsubst clean-%, %, $@))
|
|
|
|
|
|
|
|
$(CLEAN_MODULE_PHASE_TARGETS):
|
|
|
|
$(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \
|
|
|
|
$(word 2, $(subst -,$(SPACE),$@)))
|
|
|
|
|
|
|
|
# When removing the support dir, we must also remove jdk. Building classes has
|
|
|
|
# the side effect of generating native headers. The headers end up in support
|
|
|
|
# while classes and touch files end up in jdk.
|
|
|
|
clean-support: clean-jdk
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
clean-docs: clean-docstemp
|
2012-10-26 21:29:57 +00:00
|
|
|
|
|
|
|
# Remove everything, including configure configuration.
|
|
|
|
# If the output directory was created by configure and now becomes empty, remove it as well.
|
|
|
|
dist-clean: clean
|
2014-08-17 14:51:37 +00:00
|
|
|
($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments \
|
2014-11-05 08:51:33 +00:00
|
|
|
Makefile compare.sh tmp javacservers)
|
2014-08-17 14:51:37 +00:00
|
|
|
$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
|
2013-10-10 12:58:19 +00:00
|
|
|
if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
|
|
|
|
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
|
|
|
|
else \
|
2014-08-17 14:51:37 +00:00
|
|
|
($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \
|
|
|
|
&& $(RM) -r $(OUTPUT_ROOT)) \
|
2013-10-10 12:58:19 +00:00
|
|
|
fi \
|
|
|
|
)
|
2014-08-17 14:51:37 +00:00
|
|
|
$(ECHO) Cleaned everything, you will have to re-run configure.
|
|
|
|
|
2015-02-27 10:56:57 +00:00
|
|
|
ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_TEST_TARGETS) \
|
|
|
|
$(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS)
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2014-11-27 14:41:56 +00:00
|
|
|
# Setup a rule for SPEC file that fails if executed. This check makes sure the
|
|
|
|
# configuration is up to date after changes to configure.
|
2014-08-17 14:51:37 +00:00
|
|
|
ifeq ($(findstring reconfigure, $(MAKECMDGOALS)), )
|
|
|
|
$(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
|
|
|
|
@$(ECHO) "ERROR: $(SPEC) is not up to date."
|
|
|
|
@$(ECHO) "Please rerun configure! Easiest way to do this is by running"
|
|
|
|
@$(ECHO) "'make reconfigure'."
|
|
|
|
@$(ECHO) "It may also be ignored by setting IGNORE_OLD_CONFIG=true"
|
|
|
|
@if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi
|
|
|
|
endif
|
|
|
|
|
2014-09-05 10:42:41 +00:00
|
|
|
# The reconfigure target is automatically run serially from everything else
|
|
|
|
# by the Makefile calling this file.
|
|
|
|
|
2014-02-13 22:30:08 +00:00
|
|
|
reconfigure:
|
|
|
|
ifneq ($(CONFIGURE_COMMAND_LINE), )
|
|
|
|
@$(ECHO) "Re-running configure using arguments '$(CONFIGURE_COMMAND_LINE)'"
|
|
|
|
else
|
|
|
|
@$(ECHO) "Re-running configure using default settings"
|
|
|
|
endif
|
2015-02-06 08:56:30 +00:00
|
|
|
@( cd $(OUTPUT_ROOT) && PATH="$(ORIGINAL_PATH)" \
|
|
|
|
$(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) )
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
ALL_TARGETS += reconfigure
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Declare *-only targets for each normal target
|
|
|
|
$(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
ALL_TARGETS += $(addsuffix -only, $(filter-out clean%, $(ALL_TARGETS)))
|
2014-08-17 14:51:37 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
.PHONY: $(ALL_TARGETS)
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2014-08-17 14:51:37 +00:00
|
|
|
include $(SRC_ROOT)/make/Jprt.gmk
|
2013-12-17 10:09:26 +00:00
|
|
|
|
2012-10-26 21:29:57 +00:00
|
|
|
FRC: # Force target
|