2012-04-10 15:22:03 +00:00
|
|
|
#
|
|
|
|
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(SPEC)
|
|
|
|
include MakeBase.gmk
|
|
|
|
include JavaCompilation.gmk
|
|
|
|
include Setup.gmk
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
default: images
|
2012-04-10 15:22:03 +00:00
|
|
|
|
|
|
|
include Tools.gmk
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
# Note: This double-colon rule is intentional, to support
|
|
|
|
# custom make file integration.
|
|
|
|
images:: jre-image jdk-image
|
|
|
|
|
|
|
|
overlay-images: jre-overlay-image jdk-overlay-image
|
|
|
|
|
|
|
|
|
|
|
|
-include $(CUSTOM_MAKE_DIR)/Images.gmk
|
|
|
|
|
2012-04-10 15:22:03 +00:00
|
|
|
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS),solaris)
|
2012-09-18 18:29:24 +00:00
|
|
|
# On Solaris, if the target is a symlink and exists, cp won't overwrite.
|
2012-06-08 03:40:50 +00:00
|
|
|
define install-file
|
|
|
|
$(MKDIR) -p $(@D)
|
2012-09-18 18:29:24 +00:00
|
|
|
$(RM) '$@'
|
2012-07-03 23:10:44 +00:00
|
|
|
$(CP) -f -r -P '$<' '$(@D)'
|
|
|
|
endef
|
|
|
|
else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
|
|
|
define install-file
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(CP) -fpRP '$<' '$@'
|
2012-06-08 03:40:50 +00:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define install-file
|
|
|
|
$(MKDIR) -p $(@D)
|
2012-07-03 23:10:44 +00:00
|
|
|
$(CP) -fP '$<' '$@'
|
2012-06-08 03:40:50 +00:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
# Processing license files from source area to image area
|
|
|
|
# These will be modified to have the platform specific EOL chars.
|
|
|
|
define process-doc-file
|
|
|
|
$(ECHO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(RM) $@
|
|
|
|
$(SED) 's/$$//g' $< > $@
|
|
|
|
$(CHMOD) 444 $@
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-image
|
|
|
|
JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-image
|
|
|
|
|
|
|
|
JDK_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-overlay-image
|
|
|
|
JRE_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-overlay-image
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# JRE and JDK build rules
|
|
|
|
#
|
|
|
|
################################################################################
|
2012-09-18 18:29:24 +00:00
|
|
|
#
|
|
|
|
# Variable prefixes explained:
|
|
|
|
# JRE_ refers to files in the j2re-image.
|
|
|
|
# JDK_ refers to files in the j2sdk-image outside of the jre subdir.
|
|
|
|
# JDKJRE_ refers to files in the j2sdk-image inside the jre subdir.
|
|
|
|
#
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# /bin dir
|
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/jre/bin/%: $(JDK_OUTPUTDIR)/bin/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
# Overaly image targets
|
|
|
|
$(JRE_OVERLAY_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_OVERLAY_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_OVERLAY_IMAGE_DIR)/jre/bin/%: $(JDK_OUTPUTDIR)/bin/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
2012-07-03 23:10:44 +00:00
|
|
|
NOT_JRE_BIN_FILES := \
|
2012-06-08 03:40:50 +00:00
|
|
|
appletviewer$(EXE_SUFFIX) \
|
|
|
|
extcheck$(EXE_SUFFIX) \
|
|
|
|
idlj$(EXE_SUFFIX) \
|
|
|
|
jar$(EXE_SUFFIX) \
|
|
|
|
jarsigner$(EXE_SUFFIX) \
|
|
|
|
java-rmi.cgi \
|
|
|
|
javac$(EXE_SUFFIX) \
|
|
|
|
javadoc$(EXE_SUFFIX) \
|
|
|
|
javah$(EXE_SUFFIX) \
|
|
|
|
javap$(EXE_SUFFIX) \
|
|
|
|
jcmd$(EXE_SUFFIX) \
|
|
|
|
jdb$(EXE_SUFFIX) \
|
|
|
|
jps$(EXE_SUFFIX) \
|
|
|
|
jrunscript$(EXE_SUFFIX) \
|
|
|
|
jstat$(EXE_SUFFIX) \
|
|
|
|
jstatd$(EXE_SUFFIX) \
|
|
|
|
jstack$(EXE_SUFFIX) \
|
|
|
|
packagebean$(SCRIPT_SUFFIX) \
|
|
|
|
rmic$(EXE_SUFFIX) \
|
|
|
|
serialver$(EXE_SUFFIX) \
|
|
|
|
unregbean$(EXE_SUFFIX) \
|
|
|
|
jconsole$(EXE_SUFFIX) \
|
|
|
|
jinfo$(EXE_SUFFIX) \
|
|
|
|
jmap$(EXE_SUFFIX) \
|
|
|
|
native2ascii$(EXE_SUFFIX) \
|
|
|
|
xjc$(EXE_SUFFIX) \
|
|
|
|
wsgen$(EXE_SUFFIX) \
|
|
|
|
wsimport$(EXE_SUFFIX) \
|
|
|
|
schemagen$(EXE_SUFFIX) \
|
|
|
|
jsadebugd$(EXE_SUFFIX) \
|
|
|
|
jhat$(EXE_SUFFIX)
|
|
|
|
|
|
|
|
WINDOWS_JDK_BIN_FILES = \
|
|
|
|
$(EXE_SUFFIX) \
|
2012-09-18 18:29:24 +00:00
|
|
|
$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
|
|
|
|
$(notdir $(MSVCRNN_DLL))
|
|
|
|
|
|
|
|
WINDOWS_JDKJRE_BIN_FILES := \
|
|
|
|
$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
|
|
|
|
$(SALIB_NAME)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
# Find all files in bin dir
|
|
|
|
ALL_BIN_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f)
|
2012-07-03 23:10:44 +00:00
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
# For unknown reason the debuginfo files for executables are not put into images
|
2012-07-03 23:10:44 +00:00
|
|
|
# e.g filter them out
|
2012-09-18 18:29:24 +00:00
|
|
|
ifneq ($(OPENJDK_TARGET_OS),windows)
|
|
|
|
ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST))
|
|
|
|
else
|
|
|
|
# On windows, the libraries are in the bin dir, only filter out debuginfo files
|
|
|
|
# for executables. "java" is both a library and executable.
|
|
|
|
ALL_BIN_EXEC_FILES := $(filter-out java.exe,$(notdir $(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f -name "*.exe")))
|
|
|
|
ALL_BIN_DEBUG_FILTER := $(addprefix %,$(patsubst %.exe,%.debuginfo,$(ALL_BIN_EXEC_FILES)) \
|
|
|
|
$(patsubst %.exe,%.diz,$(ALL_BIN_EXEC_FILES))) %.pdb
|
|
|
|
ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER),$(ALL_BIN_LIST))
|
|
|
|
endif
|
2012-07-03 23:10:44 +00:00
|
|
|
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS),windows)
|
2012-06-08 03:40:50 +00:00
|
|
|
JDK_BIN_LIST := $(filter $(addprefix %,$(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
|
|
|
|
else
|
|
|
|
JDK_BIN_LIST := $(ALL_BIN_LIST)
|
|
|
|
endif
|
2012-09-18 18:29:24 +00:00
|
|
|
JDKJRE_BIN_LIST := $(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
|
|
|
|
JRE_BIN_LIST := $(filter-out $(addprefix %,$(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST))
|
|
|
|
|
|
|
|
ifneq ($(OPENJDK_TARGET_CPU_ISADIR),)
|
|
|
|
OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)%
|
|
|
|
endif
|
|
|
|
|
|
|
|
JRE_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JRE_IMAGE_DIR)/%, \
|
|
|
|
$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)))
|
|
|
|
JDK_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/%, \
|
|
|
|
$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)))
|
|
|
|
JDKJRE_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/jre/%, \
|
|
|
|
$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)))
|
2012-06-08 03:40:50 +00:00
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
JRE_OVERLAY_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JRE_OVERLAY_IMAGE_DIR)/%, \
|
|
|
|
$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)))
|
|
|
|
JDK_OVERLAY_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_OVERLAY_IMAGE_DIR)/%, \
|
|
|
|
$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)))
|
|
|
|
JDKJRE_OVERLAY_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_OVERLAY_IMAGE_DIR)/jre/%, \
|
|
|
|
$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)))
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# /lib dir
|
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/jre/lib/%: $(JDK_OUTPUTDIR)/lib/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
# Overlay image targets
|
|
|
|
$(JRE_OVERLAY_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_OVERLAY_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_OVERLAY_IMAGE_DIR)/jre/lib/%: $(JDK_OUTPUTDIR)/lib/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
|
|
|
JDKJRE_LIB_FILES := \
|
|
|
|
$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
|
2012-06-08 03:40:50 +00:00
|
|
|
$(SALIB_NAME)
|
2012-09-18 18:29:24 +00:00
|
|
|
endif
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
NOT_JRE_LIB_FILES := \
|
|
|
|
tools.jar \
|
|
|
|
jconsole.jar \
|
|
|
|
sa-jdi.jar \
|
|
|
|
dt.jar \
|
|
|
|
orb.idl \
|
|
|
|
ir.idl \
|
|
|
|
ct.sym
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), windows)
|
|
|
|
NOT_JRE_LIB_FILES += jawt.lib jvm.lib
|
|
|
|
endif
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), linux)
|
2012-06-08 03:40:50 +00:00
|
|
|
JDK_LIB_FILES += jexec
|
|
|
|
endif
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
ALL_LIB_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \( -name "_the*" -o -name "javac_state " \) )
|
2012-06-08 03:40:50 +00:00
|
|
|
JRE_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),$(ALL_LIB_LIST))
|
|
|
|
JDKJRE_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES)),$(ALL_LIB_LIST))
|
|
|
|
JDK_LIB_LIST := $(filter $(addprefix %,$(JDK_LIB_FILES)),$(ALL_LIB_LIST))
|
|
|
|
|
|
|
|
JRE_LIB_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JRE_IMAGE_DIR)/%,$(JRE_LIB_LIST))
|
|
|
|
JDK_LIB_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/%,$(JDK_LIB_LIST))
|
|
|
|
JDKJRE_LIB_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/jre/%,$(JDKJRE_LIB_LIST))
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
JRE_OVERLAY_LIB_TARGETS := $(subst $(JRE_IMAGE_DIR),$(JRE_OVERLAY_IMAGE_DIR),\
|
|
|
|
$(filter $(JRE_IMAGE_DIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_LIB_TARGETS)))
|
|
|
|
JDK_OVERLAY_LIB_TARGETS := $(subst $(JDK_IMAGE_DIR),$(JDK_OVERLAY_IMAGE_DIR),\
|
|
|
|
$(filter $(JDK_IMAGE_DIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_LIB_TARGETS)))
|
|
|
|
JDKJRE_OVERLAY_LIB_TARGETS := $(subst $(JDK_IMAGE_DIR),$(JDK_OVERLAY_IMAGE_DIR),\
|
|
|
|
$(filter $(JDK_IMAGE_DIR)/jre/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_LIB_TARGETS)))
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
# CTE plugin security change require new empty directory lib/applet
|
|
|
|
$(JRE_IMAGE_DIR)/lib/applet:
|
|
|
|
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(MKDIR) -p $@
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/jre/lib/applet:
|
|
|
|
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(MKDIR) -p $@
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
# In the old build, JObjC.jar is not part of the meta-index
|
2012-06-08 03:40:50 +00:00
|
|
|
$(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS)
|
|
|
|
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
2012-09-18 18:29:24 +00:00
|
|
|
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'`
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS)
|
|
|
|
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
2012-09-18 18:29:24 +00:00
|
|
|
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'`
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS)
|
|
|
|
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
$(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JDKJRE_LIB_TARGETS)
|
2012-06-08 03:40:50 +00:00
|
|
|
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# /man dir
|
|
|
|
|
|
|
|
JRE_MAN_PAGES := \
|
|
|
|
java.1 \
|
|
|
|
keytool.1 \
|
|
|
|
orbd.1 \
|
|
|
|
pack200.1 \
|
|
|
|
policytool.1 \
|
|
|
|
rmid.1 \
|
|
|
|
rmiregistry.1 \
|
|
|
|
servertool.1 \
|
|
|
|
tnameserv.1 \
|
|
|
|
unpack200.1
|
|
|
|
|
|
|
|
ifndef OPENJDK
|
|
|
|
JRE_MAN_PAGES += javaws.1
|
|
|
|
endif
|
|
|
|
|
|
|
|
JDK_MAN_PAGES = \
|
|
|
|
$(JRE_MAN_PAGES) \
|
|
|
|
appletviewer.1 \
|
|
|
|
extcheck.1 \
|
|
|
|
idlj.1 \
|
|
|
|
jar.1 \
|
|
|
|
jarsigner.1 \
|
|
|
|
javac.1 \
|
|
|
|
javadoc.1 \
|
|
|
|
javah.1 \
|
|
|
|
javap.1 \
|
|
|
|
jconsole.1 \
|
|
|
|
jcmd.1 \
|
|
|
|
jdb.1 \
|
|
|
|
jhat.1 \
|
|
|
|
jinfo.1 \
|
|
|
|
jmap.1 \
|
|
|
|
jps.1 \
|
|
|
|
jrunscript.1 \
|
|
|
|
jsadebugd.1 \
|
|
|
|
jstack.1 \
|
|
|
|
jstat.1 \
|
|
|
|
jstatd.1 \
|
|
|
|
native2ascii.1 \
|
|
|
|
rmic.1 \
|
|
|
|
schemagen.1 \
|
|
|
|
serialver.1 \
|
|
|
|
wsgen.1 \
|
|
|
|
wsimport.1 \
|
|
|
|
xjc.1
|
|
|
|
|
2012-08-23 14:42:23 +00:00
|
|
|
ifndef OPENJDK
|
|
|
|
JDK_MAN_PAGES += jvisualvm.1
|
|
|
|
endif
|
|
|
|
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), linux)
|
2012-06-08 03:40:50 +00:00
|
|
|
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/linux/doc
|
|
|
|
MAN1_SUBDIR:=man
|
|
|
|
endif
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
2012-06-08 03:40:50 +00:00
|
|
|
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/solaris/doc
|
|
|
|
MAN1_SUBDIR:=sun/man/man1
|
|
|
|
endif
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
|
|
|
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/bsd/doc
|
|
|
|
MAN1_SUBDIR:=man
|
|
|
|
JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES))
|
|
|
|
JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES))
|
|
|
|
endif
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
define install-ja-manpage
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(CAT) $< \
|
|
|
|
| $(NATIVE2ASCII) -encoding eucJP \
|
|
|
|
| $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
|
|
|
|
| $(NATIVE2ASCII) -reverse -encoding $1 \
|
|
|
|
> $@
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
|
|
|
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(call install-ja-manpage,UTF-8)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
|
|
|
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(call install-ja-manpage,UTF-8)
|
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
|
|
|
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(call install-ja-manpage,PCK)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
|
|
|
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(call install-ja-manpage,PCK)
|
|
|
|
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
2012-06-08 03:40:50 +00:00
|
|
|
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
|
|
|
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
|
|
|
|
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Old build creates empty man page for this, mimicing behaviour.
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja/man1/jcmd.1:
|
|
|
|
$(ECHO) Creating dummy $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(TOUCH) $@
|
|
|
|
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), linux)
|
2012-06-08 03:40:50 +00:00
|
|
|
$(JRE_IMAGE_DIR)/man/ja:
|
|
|
|
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja:
|
|
|
|
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
|
|
|
|
endif
|
|
|
|
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
|
|
|
$(JRE_IMAGE_DIR)/man/ja:
|
|
|
|
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/man/ja:
|
|
|
|
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS), linux)
|
2012-06-08 03:40:50 +00:00
|
|
|
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
|
|
|
|
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
2012-06-08 03:40:50 +00:00
|
|
|
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
|
|
|
|
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), 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
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
################################################################################
|
|
|
|
# /demo dir
|
|
|
|
|
|
|
|
ifndef NO_DEMOS
|
2012-09-18 18:29:24 +00:00
|
|
|
# FIXME: demo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied.
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
# The db demo contains an empty dir that needs to be copied. The other
|
|
|
|
# directories will always trigger the rule for recompile since
|
|
|
|
# _the.list_of_packages files are touched.
|
2012-09-18 18:29:24 +00:00
|
|
|
$(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/demo/%
|
2012-06-08 03:40:50 +00:00
|
|
|
if [ ! -d "$@" ]; then \
|
|
|
|
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \
|
|
|
|
$(MKDIR) -p $(@D); \
|
|
|
|
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Find all files including directories
|
2012-09-18 18:29:24 +00:00
|
|
|
JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%,$(JDK_IMAGE_DIR)/demo/%,\
|
|
|
|
$(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) ))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Param 1 is source file
|
|
|
|
define CreateOverlayDemoRule
|
|
|
|
$1_TARGET:=$$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),\
|
|
|
|
$$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1))
|
|
|
|
$$($1_TARGET): $1
|
|
|
|
$(ECHO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)'
|
|
|
|
$(MKDIR) -p $$(@D)
|
|
|
|
$(RM) $$@
|
|
|
|
$(CP) -f '$$<' '$$@'
|
|
|
|
|
|
|
|
JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET)
|
|
|
|
endef
|
|
|
|
JDK_OVERLAY_DEMO_SOURCES := $(shell $(FIND) $(JDK_OUTPUTDIR)/demo -name "*$(SHARED_LIBRARY_SUFFIX)")
|
|
|
|
$(foreach lib,$(JDK_OVERLAY_DEMO_SOURCES),$(eval $(call CreateOverlayDemoRule,$(lib))))
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# /sample dir
|
|
|
|
|
|
|
|
ifndef NO_SAMPLES
|
|
|
|
$(JDK_IMAGE_DIR)/sample/%: $(JDK_OUTPUTDIR)/sample/%
|
|
|
|
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
JDK_SAMPLE_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/sample/%,$(JDK_IMAGE_DIR)/sample/%,\
|
|
|
|
$(shell $(FIND) $(JDK_OUTPUTDIR)/sample -type f))
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# /db dir
|
|
|
|
|
|
|
|
ifndef OPENJDK
|
|
|
|
$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/%
|
|
|
|
$(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<)
|
|
|
|
$(MKDIR) -p $(JDK_IMAGE_DIR)/db
|
|
|
|
cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -o $< -x index.html 2> /dev/null
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(TOUCH) $@
|
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html
|
|
|
|
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
|
|
|
|
$(install-file)
|
2012-07-03 23:10:44 +00:00
|
|
|
$(CHMOD) 644 $(@)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%,$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped,\
|
|
|
|
$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/db -name "*.zip" ! -name "*demo*")) \
|
|
|
|
$(JDK_IMAGE_DIR)/db/README-JDK.html
|
2012-04-10 15:22:03 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
endif
|
2012-04-10 15:22:03 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
################################################################################
|
|
|
|
# /include dir
|
2012-04-10 15:22:03 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
$(JDK_IMAGE_DIR)/include/%: $(JDK_OUTPUTDIR)/include/%
|
|
|
|
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
|
|
|
|
$(install-file)
|
2012-04-10 15:22:03 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
JDK_INCLUDE_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/include/%,$(JDK_IMAGE_DIR)/include/%,\
|
|
|
|
$(shell $(FIND) $(JDK_OUTPUTDIR)/include -type f))
|
2012-04-10 15:22:03 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
################################################################################
|
|
|
|
# doc files
|
2012-04-10 15:22:03 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
ifdef OPENJDK
|
|
|
|
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)
|
|
|
|
else
|
|
|
|
JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
|
|
|
|
JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), windows)
|
2012-06-08 03:40:50 +00:00
|
|
|
JRE_DOC_FILES += README.txt
|
|
|
|
else
|
|
|
|
JRE_DOC_FILES += README
|
|
|
|
endif
|
|
|
|
ifndef NO_DEMOS
|
|
|
|
JDK_DOC_FILES += demo/DEMOS_LICENSE
|
|
|
|
endif
|
|
|
|
ifndef NO_SAMPLES
|
|
|
|
JDK_DOC_FILES += sample/SAMPLES_LICENSE
|
|
|
|
endif
|
|
|
|
JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre
|
|
|
|
JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk
|
|
|
|
endif
|
|
|
|
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/,$(JRE_DOC_FILES))
|
|
|
|
JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/,$(JRE_DOC_FILES))
|
|
|
|
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/,$(JDK_DOC_FILES))
|
2012-04-10 15:22:03 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/%
|
2012-09-18 18:29:24 +00:00
|
|
|
$(process-doc-file)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/%
|
2012-09-18 18:29:24 +00:00
|
|
|
$(process-doc-file)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README
|
2012-09-18 18:29:24 +00:00
|
|
|
$(process-doc-file)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README
|
2012-09-18 18:29:24 +00:00
|
|
|
$(process-doc-file)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/%
|
2012-09-18 18:29:24 +00:00
|
|
|
$(process-doc-file)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/%
|
2012-09-18 18:29:24 +00:00
|
|
|
$(process-doc-file)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/%
|
2012-09-18 18:29:24 +00:00
|
|
|
$(process-doc-file)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release
|
|
|
|
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
JRE_OVERLAY_INFO_FILE := $(JRE_OVERLAY_IMAGE_DIR)/release
|
|
|
|
JDK_OVERLAY_INFO_FILE := $(JDK_OVERLAY_IMAGE_DIR)/release
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
# 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
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
define create-info-file
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(RM) $@
|
|
|
|
$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)")
|
|
|
|
$(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)")
|
|
|
|
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
|
|
|
|
endef
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
ALL_SOURCE_TIPS = $(shell \
|
|
|
|
if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \
|
|
|
|
$(CAT) $(OUTPUT_ROOT)/source_tips ; \
|
|
|
|
fi)
|
|
|
|
|
|
|
|
$(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
|
|
|
|
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
2012-09-18 18:29:24 +00:00
|
|
|
$(call create-info-file)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
|
|
|
|
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
2012-09-18 18:29:24 +00:00
|
|
|
$(call create-info-file)
|
|
|
|
|
|
|
|
$(JRE_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
|
|
|
|
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(call create-info-file)
|
|
|
|
|
|
|
|
$(JDK_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
|
|
|
|
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(call create-info-file)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
$(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip
|
|
|
|
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
|
|
$(install-file)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Post processing (strip etc)
|
|
|
|
|
|
|
|
ifneq ($(POST_STRIP_CMD),)
|
2012-07-03 23:10:44 +00:00
|
|
|
ifeq ($(OPENJDK_TARGET_OS), windows)
|
2012-09-18 18:29:24 +00:00
|
|
|
EXEC_LIST_BIN:=$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*.exe \
|
2012-06-08 03:40:50 +00:00
|
|
|
-o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)")
|
|
|
|
else
|
|
|
|
# Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
|
2012-09-18 18:29:24 +00:00
|
|
|
EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX)` \
|
2012-06-08 03:40:50 +00:00
|
|
|
| $(EGREP) 'ELF' | $(CUT) -d':' -f1)
|
2012-09-18 18:29:24 +00:00
|
|
|
# On mac, the old build searches for static libraries for stripping instead of shared.
|
|
|
|
# Not clear if it's intentional.
|
|
|
|
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
|
|
|
EXEC_LIST_LIB:=$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX))
|
|
|
|
endif
|
2012-06-08 03:40:50 +00:00
|
|
|
endif
|
2012-09-18 18:29:24 +00:00
|
|
|
|
|
|
|
# Filter out the overlay specific bin files
|
|
|
|
EXEC_LIST:=$(filter-out $(OVERLAY_FILTER),$(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
|
|
|
|
EXEC_LIST_OVERLAY:=$(filter $(OVERLAY_FILTER),$(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
# Filter out non JRE files and convert to unique touch files to depend on
|
2012-09-18 18:29:24 +00:00
|
|
|
JRE_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip_jre/%.stripped,\
|
|
|
|
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\
|
|
|
|
$(EXEC_LIST)))
|
2012-06-08 03:40:50 +00:00
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
JDKJRE_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
|
2012-07-03 23:10:44 +00:00
|
|
|
$(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \
|
|
|
|
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
JDK_BIN_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
|
2012-07-03 23:10:44 +00:00
|
|
|
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \
|
|
|
|
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST)))
|
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
# Do the same for overlay image
|
|
|
|
JRE_OVERLAY_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped,\
|
|
|
|
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\
|
|
|
|
$(EXEC_LIST_OVERLAY)))
|
|
|
|
|
|
|
|
JDKJRE_OVERLAY_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
|
|
|
|
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/jre/%.stripped, \
|
|
|
|
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST_OVERLAY)))
|
2012-07-03 23:10:44 +00:00
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
JDK_OVERLAY_BIN_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
|
|
|
|
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped, \
|
|
|
|
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST_OVERLAY)))
|
|
|
|
|
|
|
|
define mcs-file
|
|
|
|
$(if $(POST_MCS_CMD),$(POST_MCS_CMD) $<)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define strip-file
|
2012-07-03 23:10:44 +00:00
|
|
|
$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)
|
|
|
|
$(CHMOD) u+w $<
|
|
|
|
$(POST_STRIP_CMD) $<
|
2012-09-18 18:29:24 +00:00
|
|
|
$(call mcs-file)
|
2012-07-03 23:10:44 +00:00
|
|
|
$(CHMOD) go-w $<
|
|
|
|
$(MKDIR) -p $(@D)
|
|
|
|
$(TOUCH) $@
|
2012-09-18 18:29:24 +00:00
|
|
|
endef
|
2012-07-03 23:10:44 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
# Setup a rule for stripping files based on touch files
|
2012-09-18 18:29:24 +00:00
|
|
|
$(IMAGES_OUTPUTDIR)/_strip_jre/%.stripped: $(JRE_IMAGE_DIR)/%
|
|
|
|
$(call strip-file)
|
|
|
|
|
|
|
|
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped: $(JDK_IMAGE_DIR)/%
|
|
|
|
$(call strip-file)
|
|
|
|
|
|
|
|
$(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped: $(JRE_OVERLAY_IMAGE_DIR)/%
|
|
|
|
$(call strip-file)
|
|
|
|
|
|
|
|
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped: $(JDK_OVERLAY_IMAGE_DIR)/%
|
|
|
|
$(call strip-file)
|
2012-07-03 23:10:44 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Main targets
|
|
|
|
|
|
|
|
jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \
|
|
|
|
$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \
|
2012-09-18 18:29:24 +00:00
|
|
|
$(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST)
|
2012-06-08 03:40:50 +00:00
|
|
|
|
|
|
|
jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \
|
|
|
|
$(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \
|
|
|
|
$(JDK_IMAGE_DIR)/jre/lib/applet \
|
|
|
|
$(JDK_DEMO_TARGETS) \
|
|
|
|
$(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \
|
|
|
|
$(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \
|
|
|
|
$(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \
|
|
|
|
$(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \
|
2012-09-18 18:29:24 +00:00
|
|
|
$(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \
|
2012-07-03 23:10:44 +00:00
|
|
|
$(JDK_IMAGE_DIR)/src.zip
|
2012-06-08 03:40:50 +00:00
|
|
|
|
2012-09-18 18:29:24 +00:00
|
|
|
jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \
|
|
|
|
$(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST)
|
|
|
|
|
|
|
|
jdk-overlay-image: $(JDK_OVERLAY_BIN_TARGETS) $(JDKJRE_OVERLAY_BIN_TARGETS) \
|
|
|
|
$(JDK_OVERLAY_LIB_TARGETS) $(JDKJRE_OVERLAY_LIB_TARGETS) \
|
|
|
|
$(JDK_OVERLAY_DEMO_TARGETS) $(JDK_OVERLAY_INFO_FILE) \
|
|
|
|
$(JDKJRE_OVERLAY_STRIP_LIST) $(JDK_OVERLAY_BIN_STRIP_LIST)
|
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
################################################################################
|
2012-04-10 15:22:03 +00:00
|
|
|
|
2012-06-08 03:40:50 +00:00
|
|
|
.PHONY: default images jre-image jdk-image
|