#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# 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.
#
# What jdk version are we building
#
# Perform release engineering tasks.
#
# images An image is what the product looks like when it is
# installed.
#
# The compiler should not issue a "Proprietary" warning when compiling
# classes in the com.sun.java.swing.plaf packages, since we've always
# allowed, and even advocated, extending them (see bug 6476749).
#
# This approach is NOT to be used as a general purpose way to avoid such
# compiler warnings for non-core packages. The correct way is to document
# the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
# definition.
#
# Swing has taken this approach only as a temporary measure to avoid
# the compiler warnings until we can properly document these packages.
# This is covered under 6491853.
#
# Include the exported private packages in ct.sym.
# This is an interim solution until the ct.sym is replaced
# with a new module system (being discussed for JDK 8).
#
# 64-bit solaris has a few special cases. We define the variable
# SOLARIS64 for use in this Makefile to easily test those cases
SOLARIS64 = true
# The base names of all the license and document files for the jdk and jre
# (These files get placed in the jdk and jre install images)
# Where to find these files
# Same files for jdk and jre, no name changes
else
else
# Paths to these files we need
# absolute directory names: note, these must exist prior to build
# time - they are created in the main Makefile.
#
# Man pages
#
JRE_MAN_PAGES = \
java.1 \
keytool.1 \
orbd.1 \
pack200.1 \
policytool.1 \
rmid.1 \
rmiregistry.1 \
servertool.1 \
tnameserv.1 \
JDK_MAN_PAGES = \
$(JRE_MAN_PAGES) \
appletviewer.1 \
apt.1 \
extcheck.1 \
idlj.1 \
jar.1 \
jarsigner.1 \
javac.1 \
javadoc.1 \
javah.1 \
javap.1 \
jcmd.1 \
jconsole.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
endif # solaris
endif # linux
ja_dir="ja"; \
ja_dir="ja_JP.$${ja_encoding}"; \
fi; \
| $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
done; \
fi; \
done; \
done
fi
# no compression unless requested
else
#
# Targets.
#
# Order is important here, trim jre after jdk image is created
else
$(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \
# Don't use these
#
# Sources we ship in the SDK.
#
SOURCES = \
#
# Directories where sources may be found. If a file with the same path
# name exists in more than one of these places, the one found last on this
# list wins.
#
SOURCE_DIRS += $(GENSRCDIR)
SOURCE_DIRS += $(IMPORTSRCDIR)
#
# Specific files and directories that will be filtered out from above areas.
#
SOURCE_FILES_filter = $(SOURCE_FILTERs:%=-name % -prune -o)
#
# Bug 4249883 - excluding some unnecessary packages from com.sun.tools
#
#
TOOLS = \
JFR_SRCDIRS_EXIST := $(shell \
echo true; \
else \
echo false; \
fi)
BUILD_JFR=true
# classes that go into jfr.jar
# classes that go into jsse.jar
# files under $(OUTPUTDIR) that need to go into sec-bin.zip for builds
# where the corresponding sources are not available
SEC_FILES_DIRS = \
# files under $(OUTPUTDIR) that need to go into sec-windows-win.zip for builds
# where the corresponding sources are not available
# files under $(BINDIR) that need to go into jgss_files.zip for builds
# where the corresponding sources are not available
JGSS_FILES_DIRS = \
# The following get removed from the SDK image.
NOTJDKTOOLS = \
# The following get removed from the JRE after the bulk-copy of BINDIR...
NOTJRETOOLS = \
extcheck$(EXE_SUFFIX) \
idlj$(EXE_SUFFIX) \
jar$(EXE_SUFFIX) \
jarsigner$(EXE_SUFFIX) \
javac$(EXE_SUFFIX) \
javadoc$(EXE_SUFFIX) \
apt$(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) \
rmic$(EXE_SUFFIX) \
serialver$(EXE_SUFFIX) \
unregbean$(EXE_SUFFIX) \
jconsole$(EXE_SUFFIX) \
jinfo$(EXE_SUFFIX) \
jmap$(EXE_SUFFIX) \
xjc$(EXE_SUFFIX) \
wsgen$(EXE_SUFFIX) \
wsimport$(EXE_SUFFIX) \
schemagen$(EXE_SUFFIX) \
jsadebugd$(EXE_SUFFIX) \
# The following get removed from the JRE after the bulk-copy of LIBDIR...
NOTJRELIBS = tools.jar \
# The following get removed from the JRE after the bulk-copy of LIBDIR...
else
# Attach library is JDK only
#
###### RULES
# Processing license files from source area to image area
# These will be modified to have the platform specific EOL chars.
$(SED) 's/$$//g' $< > $@
$(CHMOD) 444 $@
# JDK files
$(JDK_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%
# JRE files
$(JRE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%
# Differences tool
######################################################
# List of directories in classes directory that should NOT be in rt.jar
######################################################
$(NOT_RT_JAR_LIST): FRC
$(ECHO) "#\n" >> $@
$(ECHO) "# Directories must contain trailing '/'." >> $@
$(ECHO) "META-INF/services/com.sun.jdi.connect.Connector" >> $@
$(ECHO) "META-INF/services/com.sun.tools.xjc.Plugin" >> $@
$(ECHO) "sun/awt/HKSCS.class" >> $@
$(ECHO) "sun/awt/motif/X11GB2312.class" >> $@
$(ECHO) "sun/awt/motif/X11GBK.class" >> $@
$(ECHO) "sun/awt/motif/X11KSC5601.class" >> $@
$(ECHO) "sun/tools/native2ascii/" >> $@
$(ECHO) "sun/security/tools/JarBASE64Encoder.class" >> $@
$(ECHO) "sun/security/tools/JarSigner.class" >> $@
$(ECHO) "sun/security/tools/JarSignerParameters.class" >> $@
$(ECHO) "sun/security/tools/JarSignerResources.class" >> $@
$(ECHO) "sun/security/tools/JarSignerResources_ja.class" >> $@
$(ECHO) "sun/security/tools/JarSignerResources_zh_CN.class" >> $@
$(ECHO) "sun/security/tools/SignatureFile.class" >> $@
$(ECHO) "sun/security/tools/TimestampedSigner.class" >> $@
$(ECHO) "sun/security/rsa/SunRsaSign.class" >> $@
# File order list for rt.jar
# - sun.applet is included, till hotjava stops relying on it.
# - sun.tools.jar is included, needs cleanup.
#
# Create jfr.jar
$(JFR_JAR): $(OTHER_JAR_MANIFEST_FILE)
$(CD) $(CLASSBINDIR) && \
# Create the rt.jar file list & non-class files list
$(RT_JAR_FILELIST) + $(RES_JAR_FILELIST): \
$(MKDIR) -p $(JARFILELISTS_TEMPDIR)
$(TOTAL_JAR_FILELIST) \
-o $(RT_JAR_FILELIST) $(RES_JAR_FILELIST)
# Create the manifest file.
$(MAINMANIFEST) >> $@
$(ECHO) >> $@
$(CAT) $(BEANMANIFEST) >> $@
$(MAINMANIFEST) >> $@
# Create resources.jar containing non-class files
$(CD) $(CLASSBINDIR) && \
@$(RES_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
# Create jsse.jar containing SunJSSE implementation classes
$(JSSE_JAR): $(OTHER_JAR_MANIFEST_FILE)
$(CD) $(CLASSBINDIR) && \
# Create sec-bin.zip
$(RM) $(SEC_FILES_ZIP)
# Create sec-windows-bin.zip
$(RM) $(SEC_FILES_WIN_ZIP)
# Create JGSS files that contains the native Kerberos library
$(RM) $(JGSS_WIN32_FILES_ZIP)
else
$(RM) $(JGSS_WIN64_FILES_ZIP)
# Create rt.jar
$(CD) $(CLASSBINDIR) && \
@$(RT_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
# Meta-index construction to make core class loaders lazier
# SE-Embedded targets if enabled
######################################################
# JRE Image
######################################################
$(RM) -r $(JRE_IMAGE_DIR)
$(MKDIR) -p $(JRE_IMAGE_DIR)
# 64-bit solaris jre image contains only the 64-bit add-on files.
@# Use tar instead of cp to preserve the symbolic links
done
@# Remove some files from the jre area
for t in $(NOTJRETOOLS) ; do \
done
for l in $(NOTJRELIBS) ; do \
done
# Construct an initial jre image (initial jdk jre) no trimming or stripping
# See "initial-image-jdk-setup" for an explanation of the rm of
# drive names like C:
$(JRE_DOCFILES) \
@# Copy in bin directory
@# Copy in lib directory
@# Remove some files from the jre area
for t in $(NOTJRETOOLS) ; do \
done
for l in $(NOTJRELIBS) ; do \
done
@# Copy in rt.jar & resources.jar file
@# Generate meta-index to make boot and extension class loaders lazier
@#install jobjc, apple mac only
endif # macosx
@# Remove certain *.lib files
@# The Java Kernel JRE image ships with a special VM. It is not included
@# in the full JRE image, so remove it. Also, is it only for 32-bit windows.
endif # Windows
endif # !windows
# Trim out any extra files not for the jre shipment but wanted in the jdk jre.
# (Note the jdk WILL want the jre image before this trimming)
# Removes server VM on Windows 32bit.
# Remove certain shared libraries that should not be in the jre image
# but should be in the jdk jre image.
for l in $(NOTJRE_SHARED_LIBS) ; do \
done ;
else # PLATFORM
for l in $(NOTJRE_SHARED_LIBS) ; do \
done ;
endif # PLATFORM
# Get list of all binary (COFF or Elf) files in the jre
$(JRE_BIN_LIST):
$(RM) $@
else
# The FILE command reports .debuginfo files as "ELF", but we don't want
# those files in the JRE_BIN_LIST file. EXE_SUFFIX is empty on non-Windows.
# Post process the image (strips and mcs on Elf files we are shipping)
# (Note the jdk WILL want the jre image before this processing)
$(CHMOD) u+w $${f}; \
$(ECHO) $(POST_STRIP_PROCESS) $${f}; \
$(POST_STRIP_PROCESS) $${f}; \
done
$(CHMOD) u+w $${f}; \
$(ECHO) $(POST_MCS_PROCESS) $${f}; \
$(POST_MCS_PROCESS) $${f}; \
done
$(call binary_file_verification,$${f}); \
done
$(RM) $(JRE_BIN_LIST)
# Duplicate current j2re-image contents to server-j2re-image
# for the server version of jre, before deploy build
else
$(RM) -r $(JDK_SERVER_IMAGE_DIR)
######################################################
# JDK Image
######################################################
# Note: cpio ($(CPIO)) sometimes leaves directories without rx access.
# REMIND: the $(RM) calls for patterns like c:, d: following $(CPIO)
# are because the 1.7.x versions of cygwin's cpio command drops these
# in the working directory if the output path begins with that pattern
# The one for the output jre subdirectory gets there because cpio sees its
# own dropping in the input jre subdirectory. Need to remove both of these.
# We can remove these RM's if someone figures out how to stop cpio from
# leaving these there.
# Note that its a real problem not because this directory can end up in the
# bundle (I think it won't since it not in bin or lib and those are the
# only places from which we copy everything), but because the presence
# of this file causes cygwin's find to bomb out, thus breaking the build
# in "install".
$(RM) -r $(JDK_IMAGE_DIR)
done
# Solaris 64 bit image is special
# DB files to add
else
# Create the list of db *.zip files to bundle with jdk
# Java DB image. Move the Java DB demo directory into the JDK's demo
# dir and in the process, rename it to db. Also remove index.html,
# since it presumes docs are co-located. Also remove register.html (no
# longer relevant).
for d in $(DB_ZIP_LIST); do \
done
# The launcher source files we need for src.zip
# Standard jdk image
$(JDK_DOCFILES) \
@#
@# Copy in the jars in lib that only belong in the JDK
@#
for l in $(NOTJRELIBS); do \
if [ -r $(LIBDIR)/$$l ]; then \
fi; \
done
@#
@# lib/
@#
@#
@# bin/
@#
@# copy all EXE files and only certain DLL files from BINDIR
else # PLATFORM
@#
@# bin/
@#
endif # PLATFORM
@#
@# files that might not exist need to be touched.
@#
@#
@#
$(CD) $(CLASSBINDIR) && \
$(TOOLS) $(BOOT_JAR_JFLAGS)
@#
@#
@#
@#
@#
@#
endif # PLATFORM
@#
@# src.zip
@#
@#
@# The '*-*' pattern in the find command excludes files named with dashes,
@# such as the java.nio templates for generated classes
@#
@# The Linux 'tar' command cannot handle the huge command line argument
@# So for Linux, make use of the -T option (like Solaris' -I option) of
@# obtaining the list of files from a file. MKS tar has no such option.
for d in $(SOURCE_DIRS); do \
if [ -d $$sd ] ; then \
fi; \
done ; \
) ; \
if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \
fi; \
done
else
for d in $(SOURCE_DIRS); do \
if [ -d $$sd ] ; then \
fi; \
done ; \
) ; \
if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \
fi; \
done
@#
@# demo, include
@#
@#
@# Swing BeanInfo generation
@#
endif # !windows
# Trim out files we don't want to ship
@# Remove tools that should not be part of SDK.
for t in $(NOTJDKTOOLS); do \
done
# Get list of binary (COFF or Elf) files in the jdk
$(JDK_BIN_LIST):
else
$(RM) $@
# The FILE command reports .debuginfo files as "ELF", but we don't want
# those files in the JDK_BIN_LIST file. EXE_SUFFIX is empty on non-Windows.
# Post process the image (strips and mcs on files we are shipping)
$(CHMOD) u+w $${f}; \
$(ECHO) $(POST_STRIP_PROCESS) $${f}; \
$(POST_STRIP_PROCESS) $${f}; \
done
$(CHMOD) u+w $${f}; \
$(ECHO) $(POST_MCS_PROCESS) $${f}; \
$(POST_MCS_PROCESS) $${f}; \
done
$(call binary_file_verification,$${f}); \
done
$(RM) $(JDK_BIN_LIST)
###################################################################
# What did we build
###################################################################
# The jdk text info file that lives at the root of the install image.
# Common way to emit a line into the release or info file
$(CAT) $1
# Values to emit
MINIMUM_OS_ARCH := $(ARCH)
ALL_SOURCE_TIPS = $(shell \
fi)
$(JDK_INFO_FILE): FRC
# Create release file to identify this image
$(JRE_INFO_FILE): FRC
# Create release file to identify this image
###################################################################
# What do we compare against
###################################################################
# The temporary files and areas created
# unbundle(sourcedir,bundlename,destdir)
# logic is slightly different if a .tar.gz file (linux)
$(RM) -r $3
$(MKDIR) -p $3
else \
fi
# In general, ignore the fastdebug tree, and changes in the demo and sample area
# If a previuous image is provided, no need to install it.
# Just use the pre-installed images
else
# Use the temp images we will create
# Force the installation in this case
# Unbundle the jre
$(TOUCH) $@
# Unbundle the jdk
$(TOUCH) $@
# Make sure all images have a java in them (used as the touch file)
@if [ ! -f $(PREVIOUS_JRE_BUNDLE) ]; then \
$(ECHO) "ERROR: You do not have access to the previous java release jre bundles. \n" \
" Please check your access to \n" \
" This will affect you if you build the images target. \n" \
"" >> $(ERROR_FILE) ; \
fi
@if [ ! -f $(PREVIOUS_JDK_BUNDLE) ]; then \
$(ECHO) "ERROR: You do not have access to the previous java release sdk bundles. \n" \
" Please check your access to \n" \
" This will affect you if you build the images target. \n" \
"" >> $(ERROR_FILE) ; \
fi
# Create the jre comparison report
# Create the jdk comparison report
# Clean up names in the messages printed out
# Report on the jre image comparison
# Report on the jdk image comparison
# Do both image comparisons
# Clean up any temp images and reports
$(RM) -r $(TEMP_PREV_JRE_BASE_DIR)
$(RM) -r $(TEMP_PREV_JDK_BASE_DIR)
######################################################
# clobber
######################################################
$(RM) -r $(REORDER_TEMPDIR)
$(RM) -r $(JARFILELISTS_TEMPDIR)
$(RM) -r $(JDK_IMAGE_DIR)
$(RM) -r $(JRE_IMAGE_DIR)
# Force rule
FRC: