2014-12-03 14:20:21 +00:00
|
|
|
#
|
2015-06-10 22:21:56 +00:00
|
|
|
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
2014-12-03 14:20:21 +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.
|
|
|
|
#
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
include $(SPEC)
|
|
|
|
include MakeBase.gmk
|
2015-11-24 11:18:24 +00:00
|
|
|
include Modules.gmk
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
TOOL_TARGETS :=
|
2015-01-15 14:09:37 +00:00
|
|
|
JDK_TARGETS :=
|
2014-12-03 14:20:21 +00:00
|
|
|
JRE_TARGETS :=
|
|
|
|
|
|
|
|
# Hook to include the corresponding custom file, if present.
|
|
|
|
$(eval $(call IncludeCustomExtension, , Images-pre.gmk))
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
|
2016-03-23 16:20:41 +00:00
|
|
|
# All modules for the current target platform.
|
|
|
|
ALL_MODULES := $(call FindAllModules)
|
|
|
|
|
|
|
|
$(eval $(call ReadImportMetaData))
|
2016-03-17 19:03:53 +00:00
|
|
|
|
2016-03-23 16:20:41 +00:00
|
|
|
JRE_MODULES += $(filter-out $(MODULES_FILTER), $(BOOT_MODULES) $(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
|
|
|
|
JDK_MODULES += $(filter-out $(MODULES_FILTER), $(ALL_MODULES))
|
2016-03-17 19:03:53 +00:00
|
|
|
|
|
|
|
# Compact builds have additional modules
|
2016-03-23 16:20:41 +00:00
|
|
|
COMPACT1_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec
|
|
|
|
COMPACT2_EXTRA_MODULES := jdk.xml.dom jdk.httpserver
|
|
|
|
COMPACT3_EXTRA_MODULES := java.smartcardio jdk.management \
|
|
|
|
jdk.naming.dns jdk.naming.rmi jdk.sctp jdk.security.auth
|
|
|
|
|
|
|
|
JRE_COMPACT1_MODULES := java.compact1 $(COMPACT1_EXTRA_MODULES)
|
|
|
|
JRE_COMPACT2_MODULES := $(JRE_COMPACT1_MODULES) java.compact2 $(COMPACT2_EXTRA_MODULES)
|
|
|
|
JRE_COMPACT3_MODULES := $(JRE_COMPACT2_MODULES) java.compact3 $(COMPACT3_EXTRA_MODULES)
|
2014-12-03 14:20:21 +00:00
|
|
|
|
2016-05-06 23:21:08 +00:00
|
|
|
JRE_MODULES_LIST := $(call CommaList, $(JRE_MODULES))
|
|
|
|
JDK_MODULES_LIST := $(call CommaList, $(JDK_MODULES))
|
|
|
|
JRE_COMPACT1_MODULES_LIST := $(call CommaList, $(JRE_COMPACT1_MODULES))
|
|
|
|
JRE_COMPACT2_MODULES_LIST := $(call CommaList, $(JRE_COMPACT2_MODULES))
|
|
|
|
JRE_COMPACT3_MODULES_LIST := $(call CommaList, $(JRE_COMPACT3_MODULES))
|
2016-03-17 19:03:53 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Release file
|
|
|
|
|
|
|
|
BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
|
|
|
|
|
|
|
|
# Common way to emit a line into the release or info file
|
|
|
|
define info-file-item # name value
|
|
|
|
$(PRINTF) '%s="%s"\n' $1 $2 >> $@
|
|
|
|
endef
|
|
|
|
|
|
|
|
# Param 1 - The file containing the MODULES list
|
|
|
|
define create-info-file
|
|
|
|
$(call info-file-item, "JAVA_VERSION", "$(VERSION_NUMBER)")
|
|
|
|
$(call info-file-item, "JAVA_FULL_VERSION", "$(VERSION_STRING)")
|
|
|
|
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)")
|
|
|
|
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)")
|
|
|
|
$(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)")
|
|
|
|
$(if $(JDK_ARCH_ABI_PROP_NAME), \
|
|
|
|
$(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"))
|
|
|
|
$(call info-file-item, "SOURCE", "$(strip $(ALL_SOURCE_TIPS))")
|
|
|
|
endef
|
|
|
|
|
|
|
|
# Param 1 - The file containing the MODULES list
|
|
|
|
define prepare-info-file
|
|
|
|
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(RM) $@
|
|
|
|
endef
|
|
|
|
|
|
|
|
define info-file
|
|
|
|
$(call prepare-info-file)
|
|
|
|
$(call create-info-file)
|
|
|
|
endef
|
|
|
|
|
|
|
|
# Create a variable dependency file common for all release info files.
|
|
|
|
INFO_FILE_VARDEPS := $(call DependOnVariable, create-info-file)
|
|
|
|
|
|
|
|
ALL_SOURCE_TIPS = $(shell \
|
|
|
|
if [ -f $(SUPPORT_OUTPUTDIR)/source_tips ] ; then \
|
|
|
|
$(CAT) $(SUPPORT_OUTPUTDIR)/source_tips ; \
|
|
|
|
fi)
|
|
|
|
|
|
|
|
$(BASE_RELEASE_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips
|
|
|
|
$(info-file)
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
JMODS := $(wildcard $(IMAGES_OUTPUTDIR)/jmods/*.jmod)
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
# Use this file inside the image as target for make rule
|
|
|
|
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
JLINK_TOOL := $(JLINK) --modulepath $(IMAGES_OUTPUTDIR)/jmods \
|
|
|
|
--endian $(OPENJDK_BUILD_CPU_ENDIAN) \
|
|
|
|
--release-info $(BASE_RELEASE_FILE)
|
|
|
|
|
|
|
|
ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true)
|
|
|
|
JLINK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
|
|
|
$(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(ECHO) Creating jdk jimage
|
2016-03-17 19:03:53 +00:00
|
|
|
$(RM) -r $(JDK_IMAGE_DIR)
|
|
|
|
$(JLINK_TOOL) --output $(JDK_IMAGE_DIR) \
|
|
|
|
--addmods $(JDK_MODULES_LIST) $(JLINK_EXTRA_OPTS)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(TOUCH) $@
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
|
|
|
$(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(ECHO) Creating jre jimage
|
2016-03-17 19:03:53 +00:00
|
|
|
$(RM) -r $(JRE_IMAGE_DIR)
|
|
|
|
$(JLINK_TOOL) --output $(JRE_IMAGE_DIR) \
|
|
|
|
--addmods $(JRE_MODULES_LIST)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(TOUCH) $@
|
|
|
|
|
|
|
|
JRE_COMPACT1_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact1
|
|
|
|
JRE_COMPACT2_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact2
|
|
|
|
JRE_COMPACT3_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact3
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
$(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
|
|
|
$(call DependOnVariable, JRE_COMPACT1_MODULES_LIST) $(BASE_RELEASE_FILE)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(ECHO) Creating jre compact1 jimage
|
2016-03-17 19:03:53 +00:00
|
|
|
$(RM) -r $(JRE_COMPACT1_IMAGE_DIR)
|
|
|
|
$(JLINK_TOOL) --addmods $(JRE_COMPACT1_MODULES_LIST) \
|
|
|
|
--output $(JRE_COMPACT1_IMAGE_DIR)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(TOUCH) $@
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
|
|
|
$(call DependOnVariable, JRE_COMPACT2_MODULES_LIST) $(BASE_RELEASE_FILE)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(ECHO) Creating jre compact2 jimage
|
2016-03-17 19:03:53 +00:00
|
|
|
$(RM) -r $(JRE_COMPACT2_IMAGE_DIR)
|
|
|
|
$(JLINK_TOOL) --addmods $(JRE_COMPACT2_MODULES_LIST) \
|
|
|
|
--output $(JRE_COMPACT2_IMAGE_DIR)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(TOUCH) $@
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
|
|
|
$(call DependOnVariable, JRE_COMPACT3_MODULES_LIST) $(BASE_RELEASE_FILE)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(ECHO) Creating jre compact3 jimage
|
2016-03-17 19:03:53 +00:00
|
|
|
$(RM) -r $(JRE_COMPACT3_IMAGE_DIR)
|
|
|
|
$(JLINK_TOOL) --addmods $(JRE_COMPACT3_MODULES_LIST) \
|
|
|
|
--output $(JRE_COMPACT3_IMAGE_DIR)
|
2014-12-03 14:20:21 +00:00
|
|
|
$(TOUCH) $@
|
|
|
|
|
|
|
|
TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
|
|
|
|
TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
|
|
|
|
TOOL_JRE_COMPACT1_TARGETS := $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
|
|
|
|
TOOL_JRE_COMPACT2_TARGETS := $(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
|
|
|
|
TOOL_JRE_COMPACT3_TARGETS := $(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# /man dir
|
|
|
|
#
|
|
|
|
# All variables in this section are assigned with simple =, without :, to enable
|
|
|
|
# more selective overriding from the custom version of this file.
|
|
|
|
#
|
|
|
|
# Avoid evaluating this whole section on windows for speed and stability
|
|
|
|
ifneq ($(OPENJDK_TARGET_OS), windows)
|
|
|
|
JRE_MAN_PAGES += \
|
|
|
|
java.1 \
|
|
|
|
jjs.1 \
|
|
|
|
keytool.1 \
|
|
|
|
orbd.1 \
|
|
|
|
pack200.1 \
|
|
|
|
rmid.1 \
|
|
|
|
rmiregistry.1 \
|
|
|
|
servertool.1 \
|
|
|
|
tnameserv.1 \
|
|
|
|
unpack200.1
|
|
|
|
|
|
|
|
ifndef OPENJDK
|
|
|
|
ifneq ($(OPENJDK_TARGET_OS), solaris)
|
|
|
|
JRE_MAN_PAGES += javaws.1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
JDK_MAN_PAGES += \
|
|
|
|
$(JRE_MAN_PAGES) \
|
|
|
|
appletviewer.1 \
|
|
|
|
idlj.1 \
|
|
|
|
jar.1 \
|
|
|
|
jarsigner.1 \
|
|
|
|
javac.1 \
|
|
|
|
javadoc.1 \
|
|
|
|
javah.1 \
|
|
|
|
javap.1 \
|
|
|
|
jconsole.1 \
|
|
|
|
jcmd.1 \
|
|
|
|
jdb.1 \
|
|
|
|
jdeps.1 \
|
|
|
|
jinfo.1 \
|
|
|
|
jmap.1 \
|
|
|
|
jps.1 \
|
|
|
|
jrunscript.1 \
|
|
|
|
jsadebugd.1 \
|
|
|
|
jstack.1 \
|
|
|
|
jstat.1 \
|
|
|
|
jstatd.1 \
|
2015-02-13 03:03:13 +00:00
|
|
|
policytool.1 \
|
2014-12-03 14:20:21 +00:00
|
|
|
rmic.1 \
|
|
|
|
schemagen.1 \
|
|
|
|
serialver.1 \
|
|
|
|
wsgen.1 \
|
|
|
|
wsimport.1 \
|
|
|
|
xjc.1
|
|
|
|
|
|
|
|
# This variable is potentially overridden in the closed makefile.
|
|
|
|
MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src
|
|
|
|
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS), linux)
|
|
|
|
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc
|
|
|
|
MAN1_SUBDIR = man
|
|
|
|
endif
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
|
|
|
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc
|
|
|
|
MAN1_SUBDIR = sun/man/man1
|
|
|
|
endif
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
|
|
|
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc
|
|
|
|
MAN1_SUBDIR = man
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2015-05-06 08:26:10 +00:00
|
|
|
$(install-file)
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2015-05-06 08:26:10 +00:00
|
|
|
$(install-file)
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
|
|
|
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(install-file)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), )
|
|
|
|
$(JRE_IMAGE_DIR)/man/ja:
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja:
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
|
|
|
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
|
|
|
|
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \
|
|
|
|
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
|
|
|
|
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES))
|
|
|
|
|
|
|
|
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
|
|
|
|
$(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \
|
|
|
|
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
|
|
|
|
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux macosx), )
|
|
|
|
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
|
|
|
|
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
|
|
|
|
$(JRE_IMAGE_DIR)/man/ja
|
|
|
|
|
|
|
|
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
|
|
|
|
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja
|
|
|
|
endif
|
|
|
|
|
|
|
|
JRE_TARGETS += $(JRE_MAN_PAGE_LIST)
|
|
|
|
JDK_TARGETS += $(JDK_MAN_PAGE_LIST)
|
|
|
|
endif # Windows
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# /include dir
|
|
|
|
|
|
|
|
$(eval $(call SetupCopyFiles,COPY_INCLUDES, \
|
|
|
|
SRC := $(JDK_OUTPUTDIR)/include, \
|
|
|
|
DEST := $(JDK_IMAGE_DIR)/include, \
|
|
|
|
FILES := $(call CacheFind,$(JDK_OUTPUTDIR)/include)))
|
|
|
|
|
|
|
|
JDK_TARGETS += $(COPY_INCLUDES)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# doc files
|
|
|
|
|
|
|
|
JRE_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
|
|
|
|
JDK_DOC_FILES ?= LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
|
|
|
|
JRE_DOC_LOCATION ?= $(JDK_TOPDIR)
|
|
|
|
JDK_DOC_LOCATION ?= $(JDK_TOPDIR)
|
|
|
|
|
|
|
|
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES))
|
|
|
|
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES))
|
|
|
|
|
|
|
|
# Processing license files from source area to image area
|
|
|
|
# These are modified to have the platform specific EOL chars.
|
|
|
|
define process-doc-file
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(RM) $@
|
|
|
|
LC_ALL=C $(SED) 's/$$//g' $< > $@
|
|
|
|
$(CHMOD) 444 $@
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/%
|
|
|
|
$(process-doc-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/%
|
|
|
|
$(process-doc-file)
|
|
|
|
|
|
|
|
JRE_TARGETS += $(JRE_DOC_TARGETS)
|
|
|
|
JDK_TARGETS += $(JDK_DOC_TARGETS)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# src.zip
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/src.zip: $(SUPPORT_OUTPUTDIR)/src.zip
|
2016-01-16 12:01:43 +00:00
|
|
|
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
2014-12-03 14:20:21 +00:00
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
JDK_TARGETS += $(JDK_IMAGE_DIR)/src.zip
|
|
|
|
|
2016-05-06 23:21:08 +00:00
|
|
|
################################################################################
|
|
|
|
# classlist
|
|
|
|
|
|
|
|
$(eval $(call SetupCopyFiles, JDK_COPY_CLASSLIST, \
|
|
|
|
FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \
|
|
|
|
DEST := $(JDK_IMAGE_DIR)/lib, \
|
|
|
|
))
|
|
|
|
|
|
|
|
JDK_TARGETS += $(JDK_COPY_CLASSLIST)
|
|
|
|
|
|
|
|
$(eval $(call SetupCopyFiles, JRE_COPY_CLASSLIST, \
|
|
|
|
FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \
|
|
|
|
DEST := $(JRE_IMAGE_DIR)/lib, \
|
|
|
|
))
|
|
|
|
|
|
|
|
JRE_TARGETS += $(JRE_COPY_CLASSLIST)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
################################################################################
|
|
|
|
# /demo dir
|
|
|
|
ifneq ($(findstring images, $(MAKECMDGOALS)), )
|
2016-01-16 12:01:43 +00:00
|
|
|
$(eval $(call SetupCopyFiles, JDK_COPY_DEMOS, \
|
|
|
|
SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \
|
|
|
|
DEST := $(JDK_IMAGE_DIR)/demo, \
|
|
|
|
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \
|
|
|
|
$(call DoubleDollar, $(call DoubleDollar, \
|
2016-03-17 19:03:53 +00:00
|
|
|
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \
|
2016-01-16 12:01:43 +00:00
|
|
|
-type f -a ! \( -name "_the*" -o -name "javac_state" \) )))), \
|
|
|
|
))
|
|
|
|
|
|
|
|
JDK_TARGETS += $(JDK_COPY_DEMOS)
|
2014-12-03 14:20:21 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# /sample dir
|
|
|
|
|
2016-03-17 19:03:53 +00:00
|
|
|
$(eval $(call SetupCopyFiles,COPY_SAMPLES, \
|
2015-06-04 16:27:42 +00:00
|
|
|
SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \
|
2014-12-03 14:20:21 +00:00
|
|
|
DEST := $(JDK_IMAGE_DIR)/sample, \
|
2015-06-04 16:27:42 +00:00
|
|
|
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \
|
|
|
|
$(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample/image))))
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
JDK_TARGETS += $(COPY_SAMPLES)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# jrt-fs.jar
|
|
|
|
|
|
|
|
$(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \
|
|
|
|
SRC := $(SUPPORT_OUTPUTDIR), \
|
|
|
|
DEST := $(JDK_IMAGE_DIR), \
|
|
|
|
FILES := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar))
|
|
|
|
|
|
|
|
JDK_TARGETS += $(COPY_JRTFS_JAR)
|
|
|
|
|
2015-03-10 13:36:56 +00:00
|
|
|
################################################################################
|
|
|
|
# Code coverage data files
|
|
|
|
|
|
|
|
ifeq ($(GCOV_ENABLED), true)
|
|
|
|
|
|
|
|
GCOV_FIND_EXPR := -type f -name "*.gcno"
|
|
|
|
|
2015-03-17 13:16:30 +00:00
|
|
|
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_GCOV_GCNO, \
|
|
|
|
SRC := $(OUTPUT_ROOT), \
|
|
|
|
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \
|
|
|
|
FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR) $(GCOV_FIND_EXPR))))
|
2015-03-10 13:36:56 +00:00
|
|
|
|
2015-03-17 13:16:30 +00:00
|
|
|
SYMBOLS_TARGETS += $(COPY_HOTSPOT_GCOV_GCNO)
|
2015-03-10 13:36:56 +00:00
|
|
|
|
|
|
|
$(eval $(call SetupCopyFiles,COPY_JDK_GCOV_GCNO, \
|
2015-03-17 13:16:30 +00:00
|
|
|
SRC := $(OUTPUT_ROOT), \
|
|
|
|
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \
|
2015-03-10 13:36:56 +00:00
|
|
|
FILES := $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/native $(GCOV_FIND_EXPR))))
|
|
|
|
|
|
|
|
SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2016-04-28 15:33:49 +00:00
|
|
|
################################################################################
|
|
|
|
# Debug symbols
|
|
|
|
# Since debug symbols are not included in the jmod files, they need to be copied
|
|
|
|
# in manually after generating the images.
|
|
|
|
|
|
|
|
ALL_JDK_MODULES := $(JDK_MODULES)
|
|
|
|
ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
|
|
|
|
$(call FindTransitiveDepsForModule, $m)))
|
|
|
|
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS), windows)
|
|
|
|
LIBS_TARGET_SUBDIR := bin
|
|
|
|
else
|
|
|
|
LIBS_TARGET_SUBDIR := lib
|
|
|
|
endif
|
|
|
|
|
|
|
|
DEBUGINFO_SUFFIXES := .diz .debuginfo .pdb .map
|
|
|
|
|
|
|
|
# Param 1 - dir to find debuginfo files in
|
|
|
|
FindDebuginfoFiles = \
|
|
|
|
$(wildcard $(addprefix $1/*, $(DEBUGINFO_SUFFIXES)) \
|
|
|
|
$(addprefix $1/*/*, $(DEBUGINFO_SUFFIXES)) \
|
|
|
|
$(addprefix $1/*/*/*, $(DEBUGINFO_SUFFIXES)))
|
|
|
|
|
|
|
|
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
|
|
|
|
# dirs.
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS)-$(ZIP_EXTERNAL_DEBUG_SYMBOLS), macosx-false)
|
|
|
|
$(eval $(call FillCacheFind, \
|
|
|
|
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs/))
|
|
|
|
FindDebuginfoFiles = \
|
|
|
|
$(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1)))
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Param 1 - either JDK or JRE
|
|
|
|
SetupCopyDebuginfo = \
|
|
|
|
$(foreach m, $(ALL_$1_MODULES), \
|
|
|
|
$(eval $(call SetupCopyFiles, COPY_$1_LIBS_DEBUGINFO_$m, \
|
|
|
|
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$m, \
|
|
|
|
DEST := $($1_IMAGE_DIR)/$(LIBS_TARGET_SUBDIR), \
|
|
|
|
FILES := $(call FindDebuginfoFiles, \
|
|
|
|
$(SUPPORT_OUTPUTDIR)/modules_libs/$m), \
|
|
|
|
)) \
|
|
|
|
$(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \
|
|
|
|
)
|
|
|
|
|
|
|
|
# No space before argument to avoid having to put $(strip ) everywhere in
|
|
|
|
# implementation above.
|
|
|
|
$(call SetupCopyDebuginfo,JDK)
|
|
|
|
$(call SetupCopyDebuginfo,JRE)
|
|
|
|
|
2014-12-03 14:20:21 +00:00
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Include custom post hook here to make it possible to augment the target lists
|
|
|
|
# before actual target prerequisites are declared.
|
|
|
|
$(eval $(call IncludeCustomExtension, , Images-post.gmk))
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
$(JRE_TARGETS): $(TOOL_JRE_TARGETS)
|
|
|
|
$(JDK_TARGETS): $(TOOL_JDK_TARGETS)
|
|
|
|
|
2015-03-10 13:36:56 +00:00
|
|
|
jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS) \
|
|
|
|
$(SYMBOLS_TARGETS)
|
2014-12-03 14:20:21 +00:00
|
|
|
|
|
|
|
$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
|
|
|
|
$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS)
|
|
|
|
$(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS)
|
|
|
|
|
|
|
|
profiles: $(TOOL_JRE_COMPACT1_TARGETS) \
|
|
|
|
$(TOOL_JRE_COMPACT2_TARGETS) \
|
|
|
|
$(TOOL_JRE_COMPACT3_TARGETS) \
|
|
|
|
$(JRE_COMPACT1_TARGETS) \
|
|
|
|
$(JRE_COMPACT2_TARGETS) \
|
|
|
|
$(JRE_COMPACT3_TARGETS)
|
|
|
|
|
|
|
|
.PHONY: default all jimages profiles
|