Merge
This commit is contained in:
commit
9f54520b2a
.hgtags-top-repoREADME-builds.html
common
autoconf
bin
makefiles
corba
hotspot
jaxp
jaxws
jdk
.hgtags
make
com/oracle
common
java
jprt.propertiesnetbeans/jconsole
sun
tools
makefiles
CompileDemos.gmkCompileJavaClasses.gmkCompileLaunchers.gmkCompileNativeLibraries.gmkCopyFiles.gmkCopyIntoClasses.gmkCopySamples.gmkCreateJars.gmkGendataBreakIterator.gmkGendataFontConfig.gmkGendataHtml32dtd.gmkGendataTimeZone.gmkGenerateClasses.gmkGenerateData.gmkGenerateJavaSources.gmkGensrcBuffer.gmkGensrcCharacterData.gmkGensrcCharsetCoder.gmkGensrcCharsetMapping.gmkGensrcExceptions.gmkGensrcIcons.gmkGensrcJDWP.gmkGensrcLocaleDataMetaInfo.gmkGensrcMisc.gmkGensrcProperties.gmkGensrcSwing.gmkGensrcX11Wrappers.gmkImages.gmkLegacyMakefiles.gmkMakefileOldImages.gmkSetup.gmkTools.gmk
altclasses
apple
com
common
@ -163,3 +163,4 @@ d939bd0ab13c16647ffa38cc4b64fb31b7d44e10 jdk8-b38
|
||||
8927dd68aee3fa54a1a698e2980e1b2f6c7c12c1 jdk8-b39
|
||||
a2b2d435f1d275fa8010774c653197c64e326d3a jdk8-b40
|
||||
1a8c7c530f8a9b7f5bdb9b0693b2f5435ca5205e jdk8-b41
|
||||
1ce5dc16416611c58b7480ca67a2eee5153498a6 jdk8-b42
|
||||
|
@ -108,6 +108,7 @@
|
||||
<li><a href="#testing">Testing the Build</a> </li>
|
||||
<li><a href="#variables">Environment/Make Variables</a></li>
|
||||
<li><a href="#troubleshooting">Troubleshooting</a></li>
|
||||
<li><a href="#newbuild">The New Build</a></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
||||
@ -2120,6 +2121,16 @@
|
||||
</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<hr>
|
||||
<h2><a name="newbuild">The New Build</a></h2>
|
||||
<blockquote>
|
||||
The <a href="http://openjdk.java.net/projects/build-infra/">
|
||||
Build Infrastructure project</a> is working on a new
|
||||
build. For information on how to try it out, please see the
|
||||
<a href="http://openjdk.java.net/projects/build-infra/guide.html">
|
||||
Build Infra User Guide</a>
|
||||
</blockquote>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -22,5 +22,5 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
autoconf configure.ac > configure
|
||||
autoconf -W all configure.ac > configure
|
||||
rm -rf config.status config.log autom4te.cache
|
||||
|
@ -34,7 +34,7 @@ AC_DEFUN([BDEPS_SCAN_FOR_BUILDDEPS],
|
||||
. $builddepsfile
|
||||
AC_MSG_RESULT([loaded!])
|
||||
else
|
||||
AC_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
|
||||
AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
|
||||
fi
|
||||
else
|
||||
AC_MSG_CHECKING([for builddeps.conf files in sources...])
|
||||
@ -47,7 +47,7 @@ AC_DEFUN([BDEPS_SCAN_FOR_BUILDDEPS],
|
||||
. $builddepsfile
|
||||
AC_MSG_RESULT([found at least one!])
|
||||
else
|
||||
AC_ERROR([Could not find any builddeps.conf at all!])
|
||||
AC_MSG_ERROR([Could not find any builddeps.conf at all!])
|
||||
fi
|
||||
fi
|
||||
# Create build and host names that use _ instead of "-" and ".".
|
||||
@ -117,7 +117,7 @@ AC_DEFUN([BDEPS_FTPGET],
|
||||
) | ftp -in $FTPSERVER
|
||||
fi
|
||||
if test "x$VALID_TOOL" != xyes; then
|
||||
AC_ERROR([I do not know how to use the tool: $BDEPS_FTP])
|
||||
AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -159,7 +159,7 @@ AC_DEFUN([BDEPS_CHECK_MODULE],
|
||||
thecflags=${builddep_$2_CFLAGS}
|
||||
thelibs=${builddep_$2_LIBS}
|
||||
if test "x$depdir" = x; then
|
||||
AC_ERROR([Could not download build dependency $2])
|
||||
AC_MSG_ERROR([Could not download build dependency $2])
|
||||
fi
|
||||
$1=$depdir
|
||||
if test "x$theroot" != x; then
|
||||
@ -198,17 +198,17 @@ AC_DEFUN([BDEPS_FETCH],
|
||||
mkdir -p $installdir
|
||||
fi
|
||||
if test ! -d $installdir; then
|
||||
AC_ERROR([Could not create directory $installdir])
|
||||
AC_MSG_ERROR([Could not create directory $installdir])
|
||||
fi
|
||||
tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
|
||||
touch $tmpfile
|
||||
if test ! -f $tmpfile; then
|
||||
AC_ERROR([Could not create files in directory $installdir])
|
||||
AC_MSG_ERROR([Could not create files in directory $installdir])
|
||||
fi
|
||||
BDEPS_FTPGET([$3/$2] , [$tmpfile])
|
||||
mv $tmpfile $installdir/$filename
|
||||
if test ! -s $installdir/$filename; then
|
||||
AC_ERROR([Could not download $3/$2])
|
||||
AC_MSG_ERROR([Could not download $3/$2])
|
||||
fi
|
||||
case "$extension" in
|
||||
zip) echo "Unzipping $installdir/$filename..."
|
||||
@ -220,7 +220,7 @@ AC_DEFUN([BDEPS_FETCH],
|
||||
tgz) echo "Untaring $installdir/$filename..."
|
||||
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
|
||||
;;
|
||||
*) AC_ERROR([Cannot handle build depency archive with extension $extension])
|
||||
*) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -228,4 +228,3 @@ AC_DEFUN([BDEPS_FETCH],
|
||||
$5=$installdir
|
||||
fi
|
||||
])
|
||||
|
||||
|
622
common/autoconf/configure
vendored
622
common/autoconf/configure
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -23,18 +23,20 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
function prepare_help_system {
|
||||
AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
|
||||
}
|
||||
|
||||
function help_on_build_dependency {
|
||||
# Print a helpful message on how to acquire the necessary build dependency.
|
||||
# $1 is the help tag: freetyp2, cups, pulse, alsa etc
|
||||
MISSING_DEPENDENCY=$1
|
||||
PKGHANDLER_COMMAND=
|
||||
|
||||
AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
|
||||
|
||||
case $PKGHANDLER in
|
||||
apt-get)
|
||||
apt_help $MISSING_DEPENDENCY ;;
|
||||
yum)
|
||||
yum)
|
||||
yum_help $MISSING_DEPENDENCY ;;
|
||||
port)
|
||||
port_help $MISSING_DEPENDENCY ;;
|
||||
@ -47,7 +49,7 @@ function help_on_build_dependency {
|
||||
esac
|
||||
|
||||
if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
HELP_MSG="Try running '$PKGHANDLER_COMMAND'."
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ AC_DEFUN([CHECK_FIND_DELETE],
|
||||
AC_DEFUN([CHECK_NONEMPTY],
|
||||
[
|
||||
# Test that variable $1 is not empty.
|
||||
if test "" = "[$]$1"; then AC_ERROR(Could not find translit($1,A-Z,a-z) !); fi
|
||||
if test "" = "[$]$1"; then AC_MSG_ERROR(Could not find translit($1,A-Z,a-z) !); fi
|
||||
])
|
||||
|
||||
AC_DEFUN([ADD_JVM_ARG_IF_OK],
|
||||
@ -97,7 +97,7 @@ AC_DEFUN([SPACESAFE],
|
||||
$1=`$CYGPATH -s -m -a "[$]$1"`
|
||||
$1=`$CYGPATH -u "[$]$1"`
|
||||
else
|
||||
AC_ERROR([You cannot have spaces in $2! "[$]$1"])
|
||||
AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
@ -215,7 +215,7 @@ AC_DEFUN([SETUP_CCACHE_USAGE],
|
||||
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
|
||||
PUSHED_FLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="-fpch-preprocess $CXXFLAGS"
|
||||
AC_TRY_COMPILE([], [], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
|
||||
CXXFLAGS="$PUSHED_FLAGS"
|
||||
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
@ -257,7 +257,7 @@ AC_DEFUN([EXTRACT_HOST_AND_BUILD_AND_LEGACY_VARS],
|
||||
# The same values are setup for BUILD_...
|
||||
#
|
||||
# And the legacy variables, for controlling the old makefiles.
|
||||
# LEGACY_HOST_CPU1=i586,amd64,sparc,sparcv9,arm,arm64...
|
||||
# LEGACY_HOST_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
|
||||
# LEGACY_HOST_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
|
||||
# LEGACY_HOST_CPU3=sparcv9,amd64 (but only on solaris)
|
||||
# LEGACY_HOST_OS_API=solaris,windows
|
||||
@ -276,7 +276,14 @@ AC_DEFUN([EXTRACT_HOST_AND_BUILD_AND_LEGACY_VARS],
|
||||
if test "x$HOST_OS" != xsolaris; then
|
||||
LEGACY_HOST_CPU3=""
|
||||
LEGACY_BUILD_CPU3=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_HOST_CPU1) ...
|
||||
if test "x$HOST_OS" = xmacosx && test "x$HOST_CPU" = xx64; then
|
||||
LEGACY_HOST_CPU1="x86_64"
|
||||
fi
|
||||
|
||||
SET_RELEASE_FILE_OS_VALUES()
|
||||
])
|
||||
|
||||
AC_DEFUN([EXTRACT_VARS_FROM_OS_TO],
|
||||
@ -427,7 +434,7 @@ AC_DEFUN([EXTRACT_VARS_FROM_CPU],
|
||||
VAR_LEGACY_CPU=s390x
|
||||
;;
|
||||
*)
|
||||
AC_ERROR([unsupported cpu $1])
|
||||
AC_MSG_ERROR([unsupported cpu $1])
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -515,3 +522,26 @@ AC_DEFUN([WIN_FIX_PATH],
|
||||
$1="$tmp"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([SET_RELEASE_FILE_OS_VALUES],
|
||||
[
|
||||
if test "x$HOST_OS" = "xsolaris"; then
|
||||
REQUIRED_OS_NAME=SunOS
|
||||
REQUIRED_OS_VERSION=5.10
|
||||
fi
|
||||
if test "x$HOST_OS" = "xlinux"; then
|
||||
REQUIRED_OS_NAME=Linux
|
||||
REQUIRED_OS_VERSION=2.6
|
||||
fi
|
||||
if test "x$HOST_OS" = "xwindows"; then
|
||||
REQUIRED_OS_NAME=Windows
|
||||
REQUIRED_OS_VERSION=5.1
|
||||
fi
|
||||
if test "x$HOST_OS" = "xmacosx"; then
|
||||
REQUIRED_OS_NAME=Darwin
|
||||
REQUIRED_OS_VERSION=11.2
|
||||
fi
|
||||
|
||||
AC_SUBST(REQUIRED_OS_NAME)
|
||||
AC_SUBST(REQUIRED_OS_VERSION)
|
||||
])
|
||||
|
@ -64,6 +64,9 @@ endif
|
||||
# A self-referential reference to this file.
|
||||
SPEC:=@SPEC@
|
||||
|
||||
# The "human readable" name of this configuration
|
||||
CONF_NAME:=@CONF_NAME@
|
||||
|
||||
# The built jdk will run in this host system.
|
||||
HOST:=@HOST@
|
||||
HOST_OS:=@HOST_OS@
|
||||
@ -87,6 +90,10 @@ BUILD_CPU_ARCH:=@BUILD_CPU_ARCH@
|
||||
BUILD_CPU_BITS:=@BUILD_CPU_BITS@
|
||||
BUILD_CPU_ENDIAN:=@BUILD_CPU_ENDIAN@
|
||||
|
||||
# Legacy OS values for use in release file.
|
||||
REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
|
||||
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
|
||||
|
||||
# Old name for HOST_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
|
||||
PLATFORM:=@HOST_OS@
|
||||
# Old name for HOST_CPU, uses i586 and amd64, instead of ia32 and x64.
|
||||
@ -105,6 +112,7 @@ ENDIAN:=@HOST_CPU_ENDIAN@
|
||||
@SET_OPENJDK@
|
||||
JIGSAW:=@JIGSAW@
|
||||
LIBM:=-lm
|
||||
LIBDL:=@LIBDL@
|
||||
|
||||
# colon or semicolon
|
||||
PATH_SEP:=@PATH_SEP@
|
||||
@ -287,8 +295,8 @@ CUPS_CFLAGS:=@CUPS_CFLAGS@
|
||||
|
||||
PACKAGE_PATH=@PACKAGE_PATH@
|
||||
|
||||
CACERTS_FILE:=$(SRC_ROOT)/jdk/src/share/lib/security/cacerts
|
||||
#CACERTS_INT=$(CLOSED_SHARE_SRC)/lib/security/cacerts.internal
|
||||
# Source file for cacerts
|
||||
CACERTS_FILE=@CACERTS_FILE@
|
||||
|
||||
#MOZILLA_HEADERS_PATH:=
|
||||
|
||||
@ -308,13 +316,18 @@ LD_OUT_OPTION:=@LD_OUT_OPTION@
|
||||
AR_OUT_OPTION:=@AR_OUT_OPTION@
|
||||
|
||||
# Flags used for overriding the default opt setting for a C/C++ source file.
|
||||
C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
|
||||
C_O_FLAG_HI:=@C_O_FLAG_HI@
|
||||
C_O_FLAG_NORM:=@C_O_FLAG_NORM@
|
||||
C_O_FLAG_NONE:=@C_O_FLAG_NONE@
|
||||
CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
|
||||
CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
|
||||
CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
|
||||
CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
|
||||
|
||||
C_FLAG_DEPS:=@C_FLAG_DEPS@
|
||||
CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
|
||||
|
||||
# Tools that potentially need to be cross compilation aware.
|
||||
CC:=@UNCYGDRIVE@ @CCACHE@ @CC@
|
||||
|
||||
@ -386,6 +399,11 @@ SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
|
||||
|
||||
# Options for C/CXX compiler to be used if linking is performed
|
||||
# using reorder file
|
||||
C_FLAG_REORDER:=@C_FLAG_REORDER@
|
||||
CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
|
||||
|
||||
# Options to linker to specify the library name.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
|
||||
@ -406,6 +424,9 @@ STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
|
||||
EXE_SUFFIX:=@EXE_SUFFIX@
|
||||
OBJ_SUFFIX:=@OBJ_SUFFIX@
|
||||
|
||||
POST_STRIP_CMD:=@POST_STRIP_CMD@
|
||||
POST_MCS_CMD:=@POST_MCS_CMD@
|
||||
|
||||
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
|
||||
|
||||
JAVA=@UNCYGDRIVE@ @JAVA@ $(JAVA_FLAGS)
|
||||
@ -419,6 +440,8 @@ JAR:=@UNCYGDRIVE@ @JAR@
|
||||
|
||||
RMIC:=@UNCYGDRIVE@ @RMIC@
|
||||
|
||||
NATIVE2ASCII:=@UNCYGDRIVE@ @NATIVE2ASCII@
|
||||
|
||||
BOOT_JAR_CMD:=@UNCYGDRIVE@ @JAR@
|
||||
BOOT_JAR_JFLAGS:=
|
||||
|
||||
@ -483,6 +506,7 @@ OTOOL:=@OTOOL@
|
||||
READELF:=@READELF@
|
||||
EXPR:=@EXPR@
|
||||
FILE:=@FILE@
|
||||
HG:=@HG@
|
||||
|
||||
UNCYGDRIVE:=@UNCYGDRIVE@
|
||||
|
||||
@ -584,5 +608,13 @@ INSTALL_SYSCONFDIR=@sysconfdir@
|
||||
# Misc
|
||||
#
|
||||
|
||||
# Name of Service Agent library
|
||||
SALIB_NAME=@SALIB_NAME@
|
||||
|
||||
# Control wether Hotspot runs Queens test after building
|
||||
TEST_IN_BUILD=@TEST_IN_BUILD@
|
||||
|
||||
OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
|
||||
OS_VERSION_MINOR:=@OS_VERSION_MINOR@
|
||||
OS_VERSION_MICRO:=@OS_VERSION_MICRO@
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
#
|
||||
|
||||
if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
|
||||
echo "./common/bin/compareimages.sh old_jdk_image new_jdk_image"
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image"
|
||||
echo ""
|
||||
echo "Compare the directory structure."
|
||||
echo "Compare the filenames in the directories."
|
||||
@ -55,11 +55,11 @@ if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
|
||||
echo "Compare the native executables"
|
||||
echo "Compare the remaining files"
|
||||
echo ""
|
||||
echo "./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]"
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]"
|
||||
echo ""
|
||||
echo "Compare only the selected subset of the images."
|
||||
echo ""
|
||||
echo "./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar"
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar"
|
||||
echo ""
|
||||
echo "Compare only the CodePointIM.jar file"
|
||||
echo "Can be used to compare zips, libraries and executables."
|
||||
@ -114,10 +114,10 @@ else
|
||||
CMP_OTHER=true
|
||||
fi
|
||||
|
||||
DIFFJARZIP=`dirname $0`/diffjarzip.sh
|
||||
DIFFLIB=`dirname $0`/difflib.sh
|
||||
DIFFEXEC=`dirname $0`/diffexec.sh
|
||||
export COMPARE_ROOT=/tmp/cimages
|
||||
DIFFJARZIP="/bin/bash `dirname $0`/diffjarzip.sh"
|
||||
DIFFLIB="/bin/bash `dirname $0`/difflib.sh"
|
||||
DIFFEXEC="/bin/bash `dirname $0`/diffexec.sh"
|
||||
export COMPARE_ROOT=/tmp/cimages.$USER
|
||||
mkdir -p $COMPARE_ROOT
|
||||
|
||||
# Load the correct exception list.
|
||||
@ -167,16 +167,64 @@ else
|
||||
ONLY_OLD=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '<')
|
||||
if [ "$ONLY_OLD" ]; then
|
||||
echo Only in $OLD
|
||||
echo $ONLY_OLD | sed 's|< ./|\t|g' | sed 's/ /\n/g'
|
||||
echo "$ONLY_OLD" | sed 's|< ./| |g'
|
||||
fi
|
||||
# Differences in directories found.
|
||||
ONLY_NEW=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '>')
|
||||
if [ "$ONLY_NEW" ]; then
|
||||
echo Only in $NEW
|
||||
echo $ONLY_NEW | sed 's|> ./|\t|g' | sed 's/ /\n/g'
|
||||
echo "$ONLY_NEW" | sed 's|> ./| |g'
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
PERM="gstat -c%a"
|
||||
elif [ $OSTYPE == "cygwin" ]; then
|
||||
PERM=
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
PERM="stat -f%p"
|
||||
elif [ "`uname`" == "Linux" ]; then
|
||||
PERM="stat -c%A"
|
||||
else
|
||||
PERM="stat -c%a"
|
||||
fi
|
||||
|
||||
if [ "${PERM}" ]
|
||||
then
|
||||
echo -n Permissions...
|
||||
found=""
|
||||
for f in `cd $OLD && find . -type f`
|
||||
do
|
||||
if [ ! -f ${OLD}/$f ]; then continue; fi
|
||||
if [ ! -f ${NEW}/$f ]; then continue; fi
|
||||
OP=`${PERM} ${OLD}/$f`
|
||||
NP=`${PERM} ${NEW}/$f`
|
||||
if [ "$OP" != "$NP" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
printf "\told: ${OP} new: ${NP}\t$f\n"
|
||||
fi
|
||||
done
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
fi
|
||||
|
||||
GENERAL_FILES=$(cd $OLD && find . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
|
||||
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "ct.sym" \
|
||||
| grep -v "./bin/" | sort | $FILTER)
|
||||
echo General files...
|
||||
for f in $GENERAL_FILES
|
||||
do
|
||||
if [ -e $NEW/$f ]; then
|
||||
DIFF_OUT=$(diff $OLD/$f $NEW/$f 2>&1)
|
||||
if [ -n "$DIFF_OUT" ]; then
|
||||
echo $f
|
||||
echo "$DIFF_OUT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if [ "x$CMP_ZIPS" == "xtrue" ]; then
|
||||
ZIPS=$(cd $OLD && find . -type f -name "*.zip" | sort | $FILTER)
|
||||
|
||||
@ -194,7 +242,7 @@ if [ "x$CMP_ZIPS" == "xtrue" ]; then
|
||||
fi
|
||||
|
||||
if [ "x$CMP_JARS" == "xtrue" ]; then
|
||||
JARS=$(cd $OLD && find . -type f -name "*.jar" | sort | $FILTER)
|
||||
JARS=$(cd $OLD && find . -type f -name "*.jar" -o -name "ct.sym" | sort | $FILTER)
|
||||
|
||||
if [ -n "$JARS" ]; then
|
||||
echo Jar files...
|
||||
|
@ -50,14 +50,21 @@ fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
NM=gnm
|
||||
STAT=gstat
|
||||
STAT="gstat -c%s"
|
||||
LDD=ldd
|
||||
elif [ $OSTYPE == "cygwin" ]; then
|
||||
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
|
||||
NM_ARGS=/exports
|
||||
STAT=stat
|
||||
STAT="stat -c%s"
|
||||
LDD=
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
NM=nm
|
||||
STAT="stat -f%z"
|
||||
LDD="otool -L"
|
||||
else
|
||||
NM=nm
|
||||
STAT=stat
|
||||
STAT="stat -c%s"
|
||||
LDD=ldd
|
||||
fi
|
||||
|
||||
# Should the differences be viewed?
|
||||
@ -72,8 +79,8 @@ fi
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
OLD_SIZE=$($STAT -c%s "$OLD")
|
||||
NEW_SIZE=$($STAT -c%s "$NEW")
|
||||
OLD_SIZE=$($STAT "$OLD")
|
||||
NEW_SIZE=$($STAT "$NEW")
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
@ -119,15 +126,41 @@ fi
|
||||
|
||||
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
|
||||
|
||||
if [ "${LDD}" ]
|
||||
then
|
||||
NAME=`basename $OLD`
|
||||
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
|
||||
rm -rf "${TMP}"
|
||||
mkdir -p "${TMP}"
|
||||
|
||||
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
|
||||
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
|
||||
(cd "${TMP}" && rm -f ${NAME})
|
||||
|
||||
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
|
||||
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
|
||||
|
||||
DEP_MSG=
|
||||
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
|
||||
DEP_MSG="Identical dependencies"
|
||||
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
|
||||
DEP_MSG="Redundant duplicate dependencies added"
|
||||
RES=1
|
||||
else
|
||||
DEP_MSG="DIFFERENT dependencies"
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
|
||||
RESULT=0
|
||||
|
||||
if [ -n "$DIFFS" ]; then
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Differences, content AND size : $OLD_NAME
|
||||
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=4
|
||||
else
|
||||
echo Differences, content BUT SAME size: $OLD_NAME
|
||||
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
|
||||
RESULT=3
|
||||
fi
|
||||
if [ "x$VIEW" == "xview" ]; then
|
||||
@ -136,10 +169,10 @@ if [ -n "$DIFFS" ]; then
|
||||
else
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Identical symbols BUT NEW size : $OLD_NAME
|
||||
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=2
|
||||
else
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $OLD_NAME
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
|
||||
RESULT=1
|
||||
fi
|
||||
fi
|
||||
|
@ -84,8 +84,8 @@ if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ "$OLD_SUFFIX" != "zip" ] && [ "$OLD_SUFFIX" != "jar" ]; then
|
||||
echo The files have to be zip or jar! They are $OLD_SUFFIX
|
||||
if [ "$OLD_SUFFIX" != "zip" ] && [ "$OLD_SUFFIX" != "jar" ] && [ "$OLD_SUFFIX" != "sym" ]; then
|
||||
echo The files have to be zip, jar or sym! They are $OLD_SUFFIX
|
||||
exit 2
|
||||
fi
|
||||
|
||||
@ -128,7 +128,7 @@ if [ -n "$ONLY2" ]; then
|
||||
| sed "s|Only in $NEW_TEMPDIR| |"g | sed 's|: |/|g'
|
||||
fi
|
||||
|
||||
DIFFTEXT=`dirname $0`/difftext.sh
|
||||
DIFFTEXT="/bin/bash `dirname $0`/difftext.sh"
|
||||
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep differ | cut -f 2,4 -d ' ' | \
|
||||
awk "{ print \"$DIFFTEXT \"\$1\" \"\$2 }" > $COMPARE_ROOT/diffing
|
||||
|
@ -54,14 +54,21 @@ fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
NM=gnm
|
||||
STAT=gstat
|
||||
STAT="gstat -c%s"
|
||||
LDD=ldd
|
||||
elif [ $OSTYPE == "cygwin" ]; then
|
||||
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
|
||||
NM_ARGS=/exports
|
||||
STAT=stat
|
||||
STAT="stat -c%s"
|
||||
LDD=
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
NM=nm
|
||||
STAT="stat -f%z"
|
||||
LDD="otool -L"
|
||||
else
|
||||
NM=nm
|
||||
STAT=stat
|
||||
STAT="stat -c%s"
|
||||
LDD=ldd
|
||||
fi
|
||||
|
||||
# Should the differences be viewed?
|
||||
@ -76,8 +83,8 @@ fi
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
OLD_SIZE=$($STAT -c%s "$OLD")
|
||||
NEW_SIZE=$($STAT -c%s "$NEW")
|
||||
OLD_SIZE=$($STAT "$OLD")
|
||||
NEW_SIZE=$($STAT "$NEW")
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
@ -139,13 +146,39 @@ DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
|
||||
|
||||
RESULT=0
|
||||
|
||||
if [ "${LDD}" ]
|
||||
then
|
||||
NAME=`basename $OLD`
|
||||
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
|
||||
rm -rf "${TMP}"
|
||||
mkdir -p "${TMP}"
|
||||
|
||||
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
|
||||
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
|
||||
(cd "${TMP}" && rm -f ${NAME})
|
||||
|
||||
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
|
||||
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
|
||||
|
||||
DEP_MSG=
|
||||
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
|
||||
DEP_MSG="Identical dependencies"
|
||||
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
|
||||
DEP_MSG="Redundant duplicate dependencies added"
|
||||
RES=1
|
||||
else
|
||||
DEP_MSG="DIFFERENT dependencies"
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$DIFFS" ]; then
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Differences, content AND size : $OLD_NAME
|
||||
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=4
|
||||
else
|
||||
echo Differences, content BUT SAME size: $OLD_NAME
|
||||
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
|
||||
RESULT=3
|
||||
fi
|
||||
if [ "x$VIEW" == "xview" ]; then
|
||||
@ -154,10 +187,10 @@ if [ -n "$DIFFS" ]; then
|
||||
else
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Identical symbols BUT NEW size : $OLD_NAME
|
||||
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=2
|
||||
else
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $OLD_NAME
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
|
||||
RESULT=1
|
||||
fi
|
||||
fi
|
||||
|
@ -37,10 +37,9 @@
|
||||
|
||||
# Create a temporary directory to store the result code from
|
||||
# the wrapped command.
|
||||
RCDIR=`mktemp -d tmp.XXXXXX` || exit $?
|
||||
trap "rm -rf '$RCDIR'" EXIT
|
||||
RCDIR=`mktemp -dt jdk-build-logger.tmp.XXXXXX` || exit $?
|
||||
trap "rm -rf \"$RCDIR\"" EXIT
|
||||
LOGFILE=$1
|
||||
shift
|
||||
(exec 3>&1 ; ("$@" 2>&1 1>&3; echo $? > $RCDIR/rc) | tee -a $LOGFILE 1>&2 ; exec 3>&-) | tee -a $LOGFILE
|
||||
exit `cat $RCDIR/rc`
|
||||
|
||||
(exec 3>&1 ; ("$@" 2>&1 1>&3; echo $? > "$RCDIR/rc") | tee -a $LOGFILE 1>&2 ; exec 3>&-) | tee -a $LOGFILE
|
||||
exit `cat "$RCDIR/rc"`
|
||||
|
@ -126,8 +126,7 @@ define SetupArchive
|
||||
# JAR:=Jar file to create
|
||||
# MANIFEST:=Optional manifest file template.
|
||||
# JARMAIN:=Optional main class to add to manifest
|
||||
# SETUP:=The Java(h) compiler setup, needed to run javah.
|
||||
# HEADERS:=Directory to put headers in
|
||||
# JARINDEX :=
|
||||
# SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
|
||||
# added to the archive.
|
||||
# EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
|
||||
@ -143,9 +142,8 @@ define SetupArchive
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$1_$(strip $(15)))
|
||||
|
||||
$1_JVM := $$($$($1_SETUP)_JVM)
|
||||
$1_JAVAH := $$($$($1_SETUP)_JAVAH)
|
||||
$1_JARMAIN:=$(strip $$($1_JARMAIN))
|
||||
$1_JARNAME:=$$(notdir $$($1_JAR))
|
||||
$1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest
|
||||
@ -155,19 +153,46 @@ define SetupArchive
|
||||
$1_NATIVEAPI_NOTIFICATIONS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_native_notifications
|
||||
$1_NATIVEAPI_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_native
|
||||
$1_BIN:=$$(dir $$($1_JAR))
|
||||
|
||||
ifeq (,$$($1_SUFFIXES))
|
||||
# No suffix was set, default to classes.
|
||||
$1_SUFFIXES:=.class
|
||||
endif
|
||||
# Convert suffixes to a find expression
|
||||
$1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
|
||||
# On windows, a lot of includes/excludes risk making the command line too long, so
|
||||
# writing the grep patterns to files.
|
||||
ifneq (,$$($1_INCLUDES))
|
||||
$1_GREP_INCLUDES:=| $(GREP) $$(foreach src,$$($1_SRCS),$$(addprefix -e$(SPACE)$$(src)/,$$($1_INCLUDES)))
|
||||
$1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),\
|
||||
$$(addprefix $$(src)/,$$($1_INCLUDES)))
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_INCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_include))
|
||||
$1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
|
||||
endif
|
||||
ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v $$(foreach src,$$($1_SRCS),$$(addprefix -e$(SPACE)$$(src)/,$$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
|
||||
$1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,\
|
||||
$$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_EXCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_JARINDEX))
|
||||
$1_JARINDEX = (cd $$(dir $$@) && $(JAR) -i $$(notdir $$@))
|
||||
else
|
||||
$1_JARINDEX = true
|
||||
endif
|
||||
# When this macro is run in the same makefile as the java compilation, dependencies are transfered
|
||||
# in make variables. When the macro is run in a different makefile than the java compilation, the
|
||||
# dependencies need to be found in the filesystem.
|
||||
$1_ALL_SRCS:=$$(foreach src,$$($1_SRCS),$$(shell ($(FIND) $$(src) -type f \
|
||||
-a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES))))
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_ALL_SRCS+=$$(foreach src,$$($1_SRCS),$$(shell $(FIND) $$(src)/META-INF -type f 2> /dev/null))
|
||||
endif
|
||||
|
||||
|
||||
# Utility macros, to make the shell script receipt somewhat easier to dechipher.
|
||||
|
||||
# The capture contents macro finds all files (matching the patterns, typically
|
||||
@ -187,15 +212,6 @@ define SetupArchive
|
||||
(cd $$(src) && \
|
||||
$(FIND) . -name _the.package.api.notify -exec dirname \{\} \; >> $$($1_PUBAPI_NOTIFICATIONS_FILE) ; \
|
||||
true) &&)
|
||||
# The capture nativeapi macro scans for native api change notificiations. If such notifications are
|
||||
# found, then we will run javah on the changed classes. It also collects all classes with native methods
|
||||
# to be used to find out which classes no longer has native methods, to trigger deletion of those .h files.
|
||||
$1_CAPTURE_NATIVEAPI=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && \
|
||||
$(FIND) . -name _the.package.native.notify | $(SED) 's/package.native.notify/package.native/' | \
|
||||
$(XARGS) $(CAT) | $(GREP) '^TYPE ' | $(SED) 's/.*TYPE //' >> $$($1_NATIVEAPI_NOTIFICATIONS_FILE) ; \
|
||||
$(FIND) . -name _the.package.native -exec $(CAT) \{\} \; | $(SED) -n 's/^TYPE //p' >> $$($1_NATIVEAPI_FILE) ; \
|
||||
true) &&)
|
||||
# The update contents macro updates the jar file with the previously capture contents.
|
||||
$1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && \
|
||||
@ -205,13 +221,18 @@ define SetupArchive
|
||||
fi) &&)
|
||||
# The s-variants of the above macros are used when the jar is created from scratch.
|
||||
$1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES)) | $(SED) 's|$$(src)/||g' > $$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES)) | $(SED) 's|$$(src)/||g' > \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS),\
|
||||
($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
endif
|
||||
$1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && $(JAR) uf $$@ @$$(src)/_the.$$($1_JARNAME)_contents) &&)
|
||||
|
||||
# The TOUCH macro is used to make sure all timestamps are identical for package files and the pubapi files.
|
||||
# If we do not do this, we get random recompilations, the next time we run make, since the order of package building is random,
|
||||
# ie independent of package --dependes on-> public api of another package. This is of course
|
||||
@ -223,7 +244,7 @@ define SetupArchive
|
||||
# Use a slightly shorter name for logging, but with enough path to identify this jar.
|
||||
$1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
|
||||
# Here is the rule that creates/updates the jar file.
|
||||
$$($1_JAR) : $2
|
||||
$$($1_JAR) : $2 $$($1_ALL_SRC)
|
||||
$(MKDIR) -p $$($1_BIN)
|
||||
if [ -n "$$($1_MANIFEST)" ]; then \
|
||||
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
|
||||
@ -231,9 +252,11 @@ define SetupArchive
|
||||
else \
|
||||
$(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE)
|
||||
if [ -n "$$(strip $$($1_JARMAIN))" ]; then \
|
||||
$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
if [ -n "$$($1_EXTRA_MANIFEST_ATTR)" ]; then \
|
||||
$(ECHO) "$$($1_EXTRA_MANIFEST_ATTR)" >> $$($1_MANIFEST_FILE); \
|
||||
$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
+if [ -s $$@ ]; then \
|
||||
$(RM) -r $$($1_PUBAPI_NOTIFICATIONS_FILE) && \
|
||||
@ -255,20 +278,8 @@ define SetupArchive
|
||||
$(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
|
||||
fi && \
|
||||
$$($1_UPDATE_CONTENTS) true && \
|
||||
$$($1_JARINDEX) && \
|
||||
$$($1_TOUCH_API_FILES) true && \
|
||||
$(RM) -r $$($1_NATIVEAPI_NOTIFICATIONS_FILE) $$($1_NATIVEAPI_FILE) && \
|
||||
$$($1_CAPTURE_NATIVEAPI) true && \
|
||||
if [ "x$$($1_JAVAH)" != "x" ] && [ -s $$($1_NATIVEAPI_NOTIFICATIONS_FILE) ]; then \
|
||||
$(ECHO) Native api change detected in: && $(CAT) $$($1_NATIVEAPI_NOTIFICATIONS_FILE) && \
|
||||
$$($1_JVM) $$($1_JAVAH) "-Xbootclasspath/p:$$($1_JAR)" -d $$($1_HEADERS) @$$($1_NATIVEAPI_NOTIFICATIONS_FILE) ; \
|
||||
fi && \
|
||||
$(TOUCH) $$($1_NATIVEAPI_FILE)_prev ; \
|
||||
($(GREP) -xvf $$($1_NATIVEAPI_FILE) $$($1_NATIVEAPI_FILE)_prev > $$($1_NATIVEAPI_FILE)_deleted; true) && \
|
||||
$(CP) $$($1_NATIVEAPI_FILE) $$($1_NATIVEAPI_FILE)_prev && \
|
||||
if [ -s $$($1_NATIVEAPI_FILE)_deleted ]; then \
|
||||
$(ECHO) Native methods dropped from classes: && $(CAT) $$($1_NATIVEAPI_FILE)_deleted && \
|
||||
$(RM) `$(CAT) $$($1_NATIVEAPI_FILE)_deleted | $(SED) -e 's|\.|_|g' -e 's|.*|$$($1_HEADERS)/&.h $$($1_HEADERS)/&_*|'` ; \
|
||||
fi && \
|
||||
$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.api.notify $(FIND_DELETE); true) &&) true ; \
|
||||
fi ; \
|
||||
else \
|
||||
@ -276,15 +287,9 @@ define SetupArchive
|
||||
$$($1_SCAPTURE_CONTENTS) \
|
||||
$$($1_SCAPTURE_METAINF) \
|
||||
$$($1_SUPDATE_CONTENTS) \
|
||||
$$($1_JARINDEX) && \
|
||||
$$($1_TOUCH_API_FILES) true && \
|
||||
$(RM) -r $$($1_NATIVEAPI_NOTIFICATIONS_FILE) $$($1_NATIVEAPI_FILE) && \
|
||||
$$($1_CAPTURE_NATIVEAPI) true && \
|
||||
if [ "x$$($1_JAVAH)" != "x" ] && [ -s $$($1_NATIVEAPI_FILE) ]; then \
|
||||
$(ECHO) Generating native api headers for `$(CAT) $$($1_NATIVEAPI_FILE) | $(WC) -l` classes && \
|
||||
$(RM) $$($1_HEADERS)/*.h && \
|
||||
$$($1_JVM) $$($1_JAVAH) "-Xbootclasspath/p:$$($1_JAR)" -d $$($1_HEADERS) @$$($1_NATIVEAPI_FILE) && \
|
||||
$(CP) $$($1_NATIVEAPI_FILE) $$($1_NATIVEAPI_FILE)_prev ; \
|
||||
fi && \
|
||||
$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name "*.notify" $(FIND_DELETE); true) &&) true ; \
|
||||
fi;
|
||||
|
||||
@ -297,7 +302,7 @@ endef
|
||||
define SetupZipArchive
|
||||
# param 1 is for example ZIP_MYSOURCE
|
||||
# param 2,3,4,5,6,7,8,9 are named args.
|
||||
# SRC,ZIP,INCLUDES,EXCLUDES,EXCLUDE_FILES
|
||||
# SRC,ZIP,INCLUDES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
@ -308,11 +313,17 @@ define SetupZipArchive
|
||||
$(if $9,$1_$(strip $9))
|
||||
|
||||
# Find all files in the source tree.
|
||||
$1_ALL_SRCS := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f -a ! -name "_the.*"))
|
||||
$1_SUFFIX_FILTER := $$(patsubst %,-o -name $(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
|
||||
$1_ALL_SRCS := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f -a ! -name "_the.*" \( -name FALSE_DUMMY $$($1_SUFFIX_FILTER) \) ))
|
||||
|
||||
ifneq ($$($1_INCLUDES),)
|
||||
$1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
|
||||
$1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
|
||||
ifneq ($$($1_SUFFIXES),)
|
||||
$1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES),\
|
||||
$$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
|
||||
else
|
||||
$1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
|
||||
endif
|
||||
$1_ALL_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_SRCS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
@ -329,7 +340,7 @@ define SetupZipArchive
|
||||
# Explicitly excluded files can be given with absolute path. The patsubst solution
|
||||
# isn't perfect but the likelyhood of an absolute path to match something in a src
|
||||
# dir is very small.
|
||||
$$($1_ZIP) : $$($1_ALL_SRCS)
|
||||
$$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) Updating $$($1_NAME)
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES)))) ;) true
|
||||
@ -472,7 +483,7 @@ define add_file_to_copy_and_clean
|
||||
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
||||
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ \t]*//;s/[ \t]*$$$$//' \
|
||||
-e 's/\\=/=/' | LANG=C sort > $$@
|
||||
-e 's/\\=/=/' | LANG=C $(SORT) > $$@
|
||||
$(CHMOD) -f ug+w $$@
|
||||
|
||||
# And do not forget this target
|
||||
@ -623,6 +634,7 @@ define SetupJavaCompilation
|
||||
# JAVAC_SOURCE_PATH_UGLY_OVERRIDE:=Don't use this. This forces an explicit -sourcepath to javac.
|
||||
# Its only here until we cleanup some nasty source code pasta in the jdk.
|
||||
# HEADERS:=path to directory where all generated c-headers are written.
|
||||
# DEPENDS:=Extra dependecy
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
@ -650,9 +662,6 @@ $1_JVM := $$($$($1_SETUP)_JVM)
|
||||
$1_JAVAC := $$($$($1_SETUP)_JAVAC)
|
||||
$1_JAVAH := $$($$($1_SETUP)_JAVAH)
|
||||
$1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
|
||||
ifeq (,$$($1_HEADERS))
|
||||
$1_HEADERS := $$($1_BIN)
|
||||
endif
|
||||
|
||||
# Handle addons and overrides.
|
||||
$1_SRC:=$$(call ADD_SRCS,$$($1_SRC))
|
||||
@ -776,24 +785,21 @@ ifeq ($$($1_MODE),SINGLE_THREADED_BATCH)
|
||||
$$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_SRC)))
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS)
|
||||
endif
|
||||
|
||||
# Create a sed expression to remove the source roots and to replace / with .
|
||||
# and remove .java at the end.
|
||||
$1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
|
||||
|
||||
# Here is the batch rules that depends on all the sources.
|
||||
$$($1_BIN)/_the.batch: $$($1_SRCS)
|
||||
$$($1_BIN)/_the.batch: $$($1_SRCS) $$($1_DEPENDS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(RM) $$($1_BIN)/_the.batch $$($1_BIN)/_the.batch.tmp
|
||||
$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
|
||||
$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files in batch $1
|
||||
($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) -implicit:none -sourcepath "$$($1_SRCROOTSC)" -d $$($1_BIN) @$$($1_BIN)/_the.batch.tmp && \
|
||||
$$(if $$($1_JAVAH),\
|
||||
$(CAT) $$($1_BIN)/_the.batch.tmp | $(XARGS) $(GREP) -E "[[:space:]]native[[:space:]]|@GenerateNativeHeader" |\
|
||||
$(GREP) -v '*' | $(GREP) -v '//' | $(CUT) -f 1 -d ':' | $(SORT) -u |\
|
||||
$(SED) $$($1_REWRITE_INTO_CLASSES) > $$($1_BIN)/_the.batch.natives && \
|
||||
if test -s $$($1_BIN)/_the.batch.natives; then \
|
||||
$$($1_JVM) $$($1_JAVAH) "-Xbootclasspath/p:$$($1_BIN)" -d $$($1_HEADERS) @$$($1_BIN)/_the.batch.natives ; \
|
||||
fi &&) \
|
||||
($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) -implicit:none -sourcepath "$$($1_SRCROOTSC)" -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
|
||||
$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
|
||||
else
|
||||
# Ok, we have a modern javac server running!
|
||||
@ -868,6 +874,7 @@ ifneq (,$$($1_JAR))
|
||||
JARMAIN:=$$($1_JARMAIN),\
|
||||
MANIFEST:=$$($1_MANIFEST),\
|
||||
EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR),\
|
||||
JARINDEX:=$$($1_JARINDEX),\
|
||||
HEADERS:=$$($1_HEADERS),\
|
||||
SETUP:=$$($1_SETUP)))
|
||||
endif
|
||||
|
@ -91,6 +91,15 @@ $(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/b
|
||||
> $(BUILDTIMESDIR)/build_time_diff_$1
|
||||
endef
|
||||
|
||||
# Check if the current target is the final target, as specified by
|
||||
# the user on the command line. If so, call PrintEndMessage.
|
||||
define CheckIfFinished
|
||||
$(if $(filter $@,$(MAKECMDGOALS)),$(call PrintEndMessage))
|
||||
# If no taget is given, "all" is default. Check for that, too.
|
||||
# At most one of the tests can be true.
|
||||
$(if $(MAKECMDGOALS),,$(if $(filter $@,all),$(call PrintEndMessage)))
|
||||
endef
|
||||
|
||||
# Indicate that we are done.
|
||||
# Record ending time and print out the total time it took to build.
|
||||
define MakeFinish
|
||||
@ -101,6 +110,7 @@ $(BUILD_LOG_WRAPPER) $(PRINTF) "%s\n##### %-60.60s #####\n%s\n##### %-60.60s ###
|
||||
"########################################################################" \
|
||||
$(if $(REPORT_BUILD_TIMES),"Build time `$(CAT) $(BUILDTIMESDIR)/build_time_diff_$1` for target(s) $2","") \
|
||||
"########################################################################"
|
||||
$(call CheckIfFinished)
|
||||
endef
|
||||
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
@ -126,6 +136,18 @@ define StopTimer
|
||||
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very first thing when running a normal build
|
||||
define AtRootMakeStart
|
||||
$(call PrintStartMessage)
|
||||
$(call StartTimer)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very last thing for targets that are "top level" targets
|
||||
define AtRootMakeEnd
|
||||
$(call StopTimer)
|
||||
$(call CheckIfFinished)
|
||||
endef
|
||||
|
||||
# If the variable that you want to send to stdout for piping into a file or otherwise,
|
||||
# is potentially long, for example the a list of file paths, eg a list of all package directories.
|
||||
# Then you need to use ListPathsSafely, which optimistically splits the output into several shell
|
||||
@ -324,4 +346,51 @@ define ListPathsSafelyNow
|
||||
|
||||
endef
|
||||
|
||||
# The source tips can come from the Mercurial repository, or in the files
|
||||
# $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
|
||||
# directory as the original $(HGDIR) directory.
|
||||
# These should not be := assignments, only used from the root Makefile.
|
||||
HG_VERSION = $(shell $(HG) version 2> /dev/null)
|
||||
HG_DIRECTORY=.hg
|
||||
HGTIP_FILENAME=.hgtip
|
||||
HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
|
||||
REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
|
||||
$(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
|
||||
$(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
|
||||
2> /dev/null)))))
|
||||
|
||||
# Emit the repo:tip pairs to $@
|
||||
define GetSourceTips
|
||||
$(CD) $(SRC_ROOT) ; \
|
||||
for i in $(REPO_LIST) IGNORE ; do \
|
||||
if [ "$${i}" = "IGNORE" ] ; then \
|
||||
continue; \
|
||||
elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
|
||||
$(PRINTF) " %s:%s" \
|
||||
"$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
|
||||
elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
|
||||
$(PRINTF) " %s:%s" \
|
||||
"$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
|
||||
fi; \
|
||||
done >> $@
|
||||
$(PRINTF) "\n" >> $@
|
||||
endef
|
||||
|
||||
# Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk
|
||||
define CreateHgTip
|
||||
$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME);\
|
||||
$(ECHO) $1/$(HGTIP_FILENAME)
|
||||
endef
|
||||
|
||||
define SetupLogging
|
||||
ifneq ($(findstring $(LOG),debug trace),)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
OLD_SHELL:=$$(SHELL)
|
||||
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
|
||||
endif
|
||||
endef
|
||||
|
||||
# Make sure logging is setup for everyone that includes MakeBase.gmk.
|
||||
$(eval $(call SetupLogging))
|
||||
|
||||
endif # _MAKEBASE_GMK
|
||||
|
@ -23,49 +23,144 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Default to sane output from make.
|
||||
# Override with empty string to get insane amount of output.
|
||||
# Override with -d to get even more insane amount of debugging output.
|
||||
# Override with "-d -p" to get it all.
|
||||
VERBOSE=-s
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
# Find out which variables were passed explicitely on the make command line. These
|
||||
# will be passed on to sub-makes, overriding spec.gmk settings.
|
||||
MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))),$(var)=$($(var)))
|
||||
|
||||
define fatal-error
|
||||
# If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
|
||||
$$(if $$(findstring help,$$(MAKECMDGOALS)),,$$(error Cannot continue))
|
||||
endef
|
||||
|
||||
ifeq ($(origin VERBOSE),undefined)
|
||||
# Setup logging according to LOG (but only if VERBOSE is not given)
|
||||
ifeq ($(LOG),)
|
||||
# Set LOG to "warn" as default if not set (and no VERBOSE given)
|
||||
LOG=warn
|
||||
endif
|
||||
ifeq ($(LOG),warn)
|
||||
VERBOSE=-s
|
||||
else ifeq ($(LOG),info)
|
||||
VERBOSE=
|
||||
else ifeq ($(LOG),debug)
|
||||
VERBOSE=
|
||||
else ifeq ($(LOG),trace)
|
||||
VERBOSE=-d -p
|
||||
else
|
||||
$(info Error: LOG must be one of: warn, info, debug or trace.)
|
||||
$(eval $(call fatal-error))
|
||||
endif
|
||||
else
|
||||
ifneq ($(LOG),)
|
||||
# We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
$(info Cannot use LOG=$(LOG) and VERBOSE=$(VERBOSE) at the same time. Choose one.)
|
||||
$(eval $(call fatal-error))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# TODO: Fix duplication in MakeBase.gmk
|
||||
define SetupLogging
|
||||
ifneq ($(findstring $(LOG),debug trace),)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
OLD_SHELL:=$$(SHELL)
|
||||
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call SetupLogging))
|
||||
|
||||
# Find all environment or command line variables that begin with ALT.
|
||||
list_alt_overrides_with_origins = $(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
|
||||
list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
|
||||
ifneq ($(list_alt_overrides),)
|
||||
$(info You have set the following ALT_ variables:)
|
||||
$(foreach var,$(list_alt_overrides), $(info $(var)=$($(var))))
|
||||
$(error Using ALT_ variables is deprecated! Please clean your environment!)
|
||||
|
||||
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
|
||||
makefile_path=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
|
||||
else
|
||||
makefile_path=$(lastword $(MAKEFILE_LIST))
|
||||
endif
|
||||
root_dir=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
|
||||
output_dir=$(root_dir)/build
|
||||
|
||||
# The spec.gmk file contains the variables extracted by the configure script.
|
||||
# It is usually set with SPEC=....spec.gmk on the make command line.
|
||||
# However if you simply type make from the openjdk source root, it will go looking
|
||||
# for a spec file, if only one is found, use it. If more than one is found,
|
||||
# complain. If none is found, request the user to run configure!
|
||||
SPEC ?= $(wildcard $(CURDIR)/../../build/*/spec.gmk)
|
||||
ifneq ($(origin SPEC),undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifeq ($(wildcard $(SPEC)),)
|
||||
$(info Cannot locate spec.gmk, given by SPEC=$(SPEC))
|
||||
$(eval $(call fatal-error))
|
||||
endif
|
||||
ifneq ($(origin CONF),undefined)
|
||||
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($(MAKELEVEL),0)
|
||||
$(info Cannot use CONF=$(CONF) and SPEC=$(SPEC) at the same time. Choose one.)
|
||||
$(eval $(call fatal-error))
|
||||
endif
|
||||
endif
|
||||
# ... OK, we're satisfied, we'll use this SPEC later on
|
||||
else
|
||||
# Find all spec.gmk files in the build output directory
|
||||
all_spec_files=$(wildcard $(output_dir)/*/spec.gmk)
|
||||
ifeq ($(all_spec_files),)
|
||||
$(info No configurations found for $(root_dir)! Please run configure to create a configuration.)
|
||||
$(eval $(call fatal-error))
|
||||
endif
|
||||
# Extract the configuration names from the path
|
||||
all_confs=$(patsubst %/spec.gmk,%,$(patsubst $(output_dir)/%,%,$(all_spec_files)))
|
||||
|
||||
ifeq ($(words $(SPEC)),0)
|
||||
$(error You must run configure!)
|
||||
ifneq ($(origin CONF),undefined)
|
||||
# User have given a CONF= argument.
|
||||
ifeq ($(CONF),)
|
||||
# If given CONF=, match all configurations
|
||||
matching_confs=$(strip $(all_confs))
|
||||
else
|
||||
# Otherwise select those that contain the given CONF string
|
||||
matching_confs=$(strip $(foreach var,$(all_confs),$(if $(findstring $(CONF),$(var)),$(var))))
|
||||
endif
|
||||
ifeq ($(matching_confs),)
|
||||
$(info No configurations found matching CONF=$(CONF))
|
||||
$(info Available configurations:)
|
||||
$(foreach var,$(all_confs),$(info * $(var)))
|
||||
$(eval $(call fatal-error))
|
||||
else
|
||||
ifeq ($(words $(matching_confs)),1)
|
||||
$(info Building '$(matching_confs)' (matching CONF=$(CONF)))
|
||||
else
|
||||
$(info Building the following configurations (matching CONF=$(CONF)):)
|
||||
$(foreach var,$(matching_confs),$(info * $(var)))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
|
||||
SPEC=$(addsuffix /spec.gmk,$(addprefix $(output_dir)/,$(matching_confs)))
|
||||
else
|
||||
# No CONF or SPEC given, check the available configurations
|
||||
ifneq ($(words $(all_spec_files)),1)
|
||||
$(info No CONF or SPEC given, but more than one spec.gmk found in $(output_dir).)
|
||||
$(info Available configurations:)
|
||||
$(foreach var,$(all_confs),$(info * $(var)))
|
||||
$(info Please retry building with CONF=<config> or SPEC=<specfile>)
|
||||
$(eval $(call fatal-error))
|
||||
endif
|
||||
|
||||
# We found exactly one configuration, use it
|
||||
SPEC=$(strip $(all_spec_files))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(words $(SPEC)),1)
|
||||
ifeq ($(MAKECMDGOALS),all-conf)
|
||||
SPECS:=$(shell echo $(SPEC) | sed -e 's|$(CURDIR)/build/||g' -e 's|/spec.gmk|\\n|g' -e 's| ||g')
|
||||
allconf:
|
||||
@echo Building configurations:
|
||||
@printf "$(SPECS)"
|
||||
@$(foreach s,$(SPEC),($(MAKE) SPEC=$s $(VERBOSE) VERBOSE=$(VERBOSE) images) &&) true
|
||||
@echo Done building configurations:
|
||||
@printf "$(SPECS)"
|
||||
.PHONY: all-conf
|
||||
else
|
||||
$(error Since you have more than one output dir configured under build, \
|
||||
you have to either run make from the output dir of your choice \
|
||||
or specify run "make SPEC=build/.../spec.gmk" or run all the build configurations \
|
||||
using "make all-conf")
|
||||
endif
|
||||
# We have multiple configurations to build, call make repeatedly
|
||||
all jdk hotspot jaxws jaxp corba langtools install images packages clean dist-clean:
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@ $(MAKE_ARGS)) &&) true
|
||||
|
||||
.PHONY: all jdk hotspot jaxws jaxp corba langtools install images packages clean dist-clean
|
||||
|
||||
else
|
||||
# This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
|
||||
|
||||
# Now load the spec
|
||||
-include $(SPEC)
|
||||
@ -88,51 +183,101 @@ $(eval $(call ResetTimers))
|
||||
# Clean out any notifications from the previous build.
|
||||
$(shell find $(OUTPUT_ROOT) -name "_the.*.notify" $(FIND_DELETE))
|
||||
|
||||
all: jdk
|
||||
@$(call StopTimer)
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
# If make was called explicitely with -j, don't add a -j ourself to sub-makes, since
|
||||
# this will be inherited automatically by make. Otherwise use our default for sub-makes.
|
||||
# The -j in MAKEFLAGS is only visible when executing a recipe, hence this macro.
|
||||
define GetMakeJobFlag
|
||||
$(if $(findstring -j,$(MAKEFLAGS)),,-j$(NUM_CORES))
|
||||
endef
|
||||
|
||||
langtools: start-timer
|
||||
define CheckEnvironment
|
||||
$(if $(list_alt_overrides),
|
||||
@$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
|
||||
@$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
|
||||
@$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n"
|
||||
)
|
||||
endef
|
||||
|
||||
define PrintStartMessage
|
||||
$(if $(VERBOSE),,@$(ECHO) Running make as $(MAKE) $(MFLAGS) $(MAKE_ARGS))
|
||||
$(call CheckEnvironment)
|
||||
@$(ECHO) "Building OpenJDK for target $(if $(MAKECMDGOALS),'$(MAKECMDGOALS)','all') in configuration '$(CONF_NAME)'"
|
||||
endef
|
||||
|
||||
define PrintEndMessage
|
||||
@$(ECHO) "Finished building OpenJDK for target '$@'"
|
||||
$(call CheckEnvironment)
|
||||
endef
|
||||
|
||||
all: jdk
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
langtools: start-make
|
||||
@$(call MakeStart,langtools,all)
|
||||
@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(NUM_CORES) $(LANGTOOLS_MAKE_ARGS))
|
||||
@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(LANGTOOLS_MAKE_ARGS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,langtools,all)
|
||||
|
||||
corba: langtools
|
||||
@$(call MakeStart,corba,all)
|
||||
@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(NUM_CORES) $(CORBA_MAKE_ARGS))
|
||||
@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(CORBA_MAKE_ARGS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,corba,all)
|
||||
|
||||
jaxp: langtools
|
||||
@$(call MakeStart,jaxp,all)
|
||||
@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(NUM_CORES) $(CORBA_MAKE_ARGS))
|
||||
@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(CORBA_MAKE_ARGS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jaxp,all)
|
||||
|
||||
jaxws: langtools jaxp
|
||||
@$(call MakeStart,jaxws,all)
|
||||
@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(NUM_CORES) $(CORBA_MAKE_ARGS))
|
||||
@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(CORBA_MAKE_ARGS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jaxws,all)
|
||||
|
||||
hotspot: langtools
|
||||
@$(call MakeStart,hotspot,all)
|
||||
@($(CD) $(HOTSPOT_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS))
|
||||
@($(CD) $(HOTSPOT_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,hotspot,all)
|
||||
|
||||
jdk: langtools corba jaxp jaxws hotspot
|
||||
@$(call MakeStart,jdk,all)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(NUM_CORES) $(JDK_MAKE_ARGS))
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(JDK_MAKE_ARGS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jdk,all)
|
||||
|
||||
images install packages: start-timer jdk langtools corba jaxp jaxws hotspot
|
||||
images install packages: source-tips start-make jdk langtools corba jaxp jaxws hotspot
|
||||
@$(call MakeStart,jdk-images,$@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(NUM_CORES) $(JDK_MAKE_ARGS) $@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(JDK_MAKE_ARGS) $(MAKE_ARGS) $@)
|
||||
@$(call MakeFinish,jdk-images,$@)
|
||||
@$(call StopTimer)
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
start-timer:
|
||||
@$(call StartTimer)
|
||||
old-images: source-tips start-make jdk langtools corba jaxp jaxws hotspot
|
||||
@$(call MakeStart,jdk-old-images,$@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(JDK_MAKE_ARGS) $(MAKE_ARGS) $@)
|
||||
@$(call MakeFinish,old-jdk-images,$@)
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
start-make:
|
||||
@$(call AtRootMakeStart)
|
||||
|
||||
.PHONY: jdk hotspot jaxws jaxp corba langtools install images packages start-make
|
||||
|
||||
test: start-make
|
||||
@$(call MakeStart,test,$(if $(TEST),$(TEST),all))
|
||||
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
|
||||
@$(call MakeFinish,test,$(if $(TEST),$(TEST),all))
|
||||
@$(call AtRootMakeEnd)
|
||||
.PHONY: test
|
||||
|
||||
|
||||
# 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.
|
||||
source-tips: $(OUTPUT_ROOT)/source_tips
|
||||
$(OUTPUT_ROOT)/source_tips: FRC
|
||||
@$(MKDIR) -p $(@D)
|
||||
@$(RM) $@
|
||||
@$(call GetSourceTips)
|
||||
|
||||
.PHONY: jdk hotspot jaxws jaxp corba langtools install images packages start-timer
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean:
|
||||
@ -152,25 +297,35 @@ clean-jdk:
|
||||
@$(ECHO) "Cleaned jdk build artifacts (but not langtools,corba,jaxp,jaxws,hotspot nor the build configuration)"
|
||||
.PHONY: clean
|
||||
|
||||
help:
|
||||
$(info )
|
||||
$(info Typical make commands:)
|
||||
$(info make)
|
||||
$(info make VERBOSE= # print all commands)
|
||||
$(info make VERBOSE="-d -p" # debug make as well)
|
||||
$(info make all-conf # build images for all configurations)
|
||||
$(info make clean # remove build artifacts)
|
||||
$(info make dist-clean # you have to rerun configure)
|
||||
# $(info make test # run tests)
|
||||
$(info make images # create the jdk and jre images)
|
||||
$(info make install # install the jdk image)
|
||||
# $(info make modules # EXPERIMENTAL: Migrate JDK into a modularized form!)
|
||||
$(info make packages # create zips and other packages)
|
||||
|
||||
# $(info make eclipse_workspace # Create an Eclipse workspace)
|
||||
# $(info make netbeans_workspace # Create a NetBeans workspace)
|
||||
# $(info make vs_workspace # Create a Visual Studio workspace)
|
||||
|
||||
.PHONY: help
|
||||
|
||||
endif
|
||||
|
||||
# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
|
||||
# If you addd more global targets, please update the fatal-error macro.
|
||||
|
||||
help:
|
||||
$(info )
|
||||
$(info OpenJDK Makefile help)
|
||||
$(info =====================)
|
||||
$(info )
|
||||
$(info Common make targets)
|
||||
$(info . make [all] # Compile all code but do not create images)
|
||||
$(info . make images # Create complete j2sdk and j2re images)
|
||||
$(info . make install # Install the generated images locally)
|
||||
$(info . make clean # Remove all files generated by make, but not those generated by configure)
|
||||
$(info . make dist-clean # Remove all files generated by both make and configure)
|
||||
$(info . make help # Give some help on using make)
|
||||
$(info . make test # Run tests, default is all tests (see TEST below))
|
||||
$(info )
|
||||
$(info Useful make variables)
|
||||
$(info . make CONF= # Build all configurations (note, assignment is empty))
|
||||
$(info . make CONF=<substring> # Build the configuration(s) with a name matching the given substring)
|
||||
$(info )
|
||||
$(info . make LOG=<loglevel> # Change loglevel from warn (default) to the given loglevel)
|
||||
$(info . # Available loglevels are: warn, info, debug and trace)
|
||||
$(info . # To see executed command lines, use LOG=info)
|
||||
$(info )
|
||||
$(info . make test TEST=<test> # Only run the given test or tests, e.g.)
|
||||
$(info . # make test TEST="jdk_lang jdk_net")
|
||||
$(info )
|
||||
.PHONY: help
|
||||
FRC: # Force target
|
||||
|
@ -28,7 +28,7 @@
|
||||
# desired whenever sort is used below!
|
||||
|
||||
ifeq (,$(_MAKEBASE_GMK))
|
||||
$(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
|
||||
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
@ -54,15 +54,22 @@ define add_native_source
|
||||
|
||||
ifneq (,$$(filter %.c,$2))
|
||||
# Compile as a C file
|
||||
$1_$2_FLAGS=$4
|
||||
$1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS)
|
||||
$1_$2_COMP=$5
|
||||
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
|
||||
else ifneq (,$$(filter %.m,$2))
|
||||
# Compile as a objective-c file
|
||||
$1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS)
|
||||
$1_$2_COMP=$5
|
||||
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
|
||||
else
|
||||
# Compile as a C++ file
|
||||
$1_$2_FLAGS=$6
|
||||
$1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS)
|
||||
$1_$2_COMP=$7
|
||||
$1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
|
||||
endif
|
||||
# Generate the .o (.obj) file name and place it in the bin dir.
|
||||
$1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(notdir $2)))
|
||||
$1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(notdir $2))))
|
||||
# Only continue if this object file hasn't been processed already. This lets the first found
|
||||
# source file override any other with the same name.
|
||||
ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
|
||||
@ -80,7 +87,7 @@ define add_native_source
|
||||
$$($1_$2_OBJ) : $2
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
$$(call COMPILING_MSG,$$(notdir $2))
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) -MMD -MF $$($1_$2_DEP) -c $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) -c $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
|
||||
endif
|
||||
ifeq ($(COMPILER_TYPE),CL)
|
||||
$$(call COMPILING_MSG,$$(notdir $2))
|
||||
@ -109,6 +116,8 @@ define SetupNativeCompilation
|
||||
# EXCLUDE_FILES with these names
|
||||
# VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
|
||||
# RC_FLAGS flags for RC.
|
||||
# MAPFILE mapfile
|
||||
# REORDER reorder file
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
@ -154,7 +163,7 @@ define SetupNativeCompilation
|
||||
ifneq ($$($1_EXCLUDE_FILES),)
|
||||
$1_EXCLUDE_FILES:=$$(addprefix %,$$($1_EXCLUDE_FILES))
|
||||
endif
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.c %.cpp,$$($1_ALL_SRCS)))
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.c %.cpp %.m,$$($1_ALL_SRCS)))
|
||||
ifneq (,$$(strip $$($1_INCLUDE_FILES)))
|
||||
$1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
|
||||
endif
|
||||
@ -178,7 +187,7 @@ define SetupNativeCompilation
|
||||
|
||||
# Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
|
||||
# a reproducable order on the input files to the linker).
|
||||
$1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_BIN)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS))))))
|
||||
$1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_BIN)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS)))))))
|
||||
$1 := $$($1_EXPECTED_OBJS)
|
||||
# Are there too many object files on disk? Perhaps because some source file was removed?
|
||||
$1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
|
||||
@ -218,6 +227,11 @@ define SetupNativeCompilation
|
||||
$1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_REORDER))
|
||||
$1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
|
||||
endif
|
||||
|
||||
# Now create a list of the packages that are about to compile. Used when sending source
|
||||
# in a batch to the compiler.
|
||||
$$(shell $(RM) $$($1_BIN)/_the.list_of_sources)
|
||||
@ -233,29 +247,53 @@ define SetupNativeCompilation
|
||||
ifeq ($(HOST_OS_API), winapi)
|
||||
ifneq (,$$($1_VERSIONINFO_RESOURCE))
|
||||
ifneq (,$$($1_LIB))
|
||||
ifeq (dynamic,$$(patsubst %$(SHARED_LIBRARY_SUFFIX),dynamic,$$($1_LIB)))
|
||||
$1_RES:=$$(patsubst %$(SHARED_LIBRARY_SUFFIX),%.res,$$($1_LIB))
|
||||
else
|
||||
$1_RES:=$$(patsubst %$(STATIC_LIBRARY_SUFFIX),%.res,$$($1_LIB))
|
||||
endif
|
||||
$1_BASENAME:=$$(basename $$(notdir $$($1_LIB)))
|
||||
endif
|
||||
ifneq (,$$($1_EXE))
|
||||
$1_RES:=$$(patsubst %$(EXE_SUFFIX),%.res,$$($1_EXE))
|
||||
$1_BASENAME:=$$(basename $$(notdir $$($1_EXE)))
|
||||
endif
|
||||
$1_RES:=$$($1_BIN)/$$($1_BASENAME).res
|
||||
$$($1_RES): $$($1_VERSIONINFO_RESOURCE)
|
||||
$(RC) $$($1_RC_FLAGS) $(CC_OUT_OPTION)$$@ $$($1_VERSIONINFO_RESOURCE)
|
||||
endif
|
||||
ifneq (,$$($1_MANIFEST))
|
||||
$1_PROGRAM:=$$(basename $$(notdir $$($1_EXE)))
|
||||
$1_GEN_MANIFEST:=$$($1_BIN)/$$($1_PROGRAM).manifest
|
||||
IMVERSIONVALUE:=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
|
||||
$$($1_GEN_MANIFEST): $$($1_MANIFEST)
|
||||
$(SED) 's%IMVERSION%$$(IMVERSIONVALUE)%g;s%PROGRAM%$$($1_PROGRAM)%g' $$< > $$@
|
||||
endif
|
||||
endif
|
||||
|
||||
# mapfile doesnt seem to be implemented on macosx (yet??)
|
||||
ifneq ($(HOST_OS),macosx)
|
||||
ifneq ($(HOST_OS),windows)
|
||||
$1_REAL_MAPFILE := $$($1_MAPFILE)
|
||||
ifneq (,$$($1_REORDER))
|
||||
$1_REAL_MAPFILE := $$($1_BIN)/mapfile
|
||||
|
||||
$$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
|
||||
$$(MKDIR) -p $$(@D)
|
||||
$$(CP) $$($1_MAPFILE) $$@.tmp
|
||||
$$(SED) -e 's=OUTPUTDIR=$$($1_BIN)=' $$($1_REORDER) >> $$@.tmp
|
||||
$$(MV) $$@.tmp $$@
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Pickup extra HOST_OS_API dependent variables (posix or winapi) and
|
||||
# (linux,solaris,windows,bsd) for LDFLAGS and LDFLAGS_SUFFIX
|
||||
$1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(HOST_OS_API)) $$($1_LDFLAGS_$(PLATFORM))
|
||||
$1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(HOST_OS_API)) $$($1_LDFLAGS_SUFFIX_$(PLATFORM))
|
||||
ifneq (,$$($1_REAL_MAPFILE))
|
||||
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_LIB))
|
||||
ifeq (dynamic,$$(patsubst %$(SHARED_LIBRARY_SUFFIX),dynamic,$$($1_LIB)))
|
||||
# Generating a dynamic library.
|
||||
$1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$(notdir $$($1_LIB)))
|
||||
$$($1_LIB) : $$($1_EXPECTED_OBJS) $$($1_RES)
|
||||
$$($1_LIB) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
|
||||
$$(call LINKING_MSG,$$(notdir $$($1_LIB)))
|
||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$($1_LIB) \
|
||||
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
|
||||
@ -269,9 +307,13 @@ define SetupNativeCompilation
|
||||
endif
|
||||
ifneq (,$$($1_EXE))
|
||||
# A executable binary has been specified, setup the target for it.
|
||||
$$($1_EXE) : $$($1_EXPECTED_OBJS) $$($1_RES)
|
||||
$$($1_EXE) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
|
||||
$$(call LINKING_EXE_MSG,$$(notdir $$($1_EXE)))
|
||||
$$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_EXE) \
|
||||
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
|
||||
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
|
||||
$$($1_EXTRA_LDFLAGS_SUFFIX)
|
||||
ifneq (,$$($1_GEN_MANIFEST))
|
||||
$(MT) -nologo /manifest $$($1_GEN_MANIFEST) /outputresource:$$@;#1
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
@ -163,3 +163,4 @@ b8cbfb31139f820e5e094ba71449e58159fbe22e jdk8-b38
|
||||
785af00e2827990f149b32ec37f523dbca3efdd1 jdk8-b39
|
||||
56d030e5035fdee5bba6cf318a06287fda5d67ec jdk8-b40
|
||||
113f0d5f0a08aa0947b3edf783b603e7f042748a jdk8-b41
|
||||
79cc42c9c71bbd6630ede681642e98f5e4a841fa jdk8-b42
|
||||
|
@ -143,7 +143,7 @@ ifeq ($(SYSTEM_UNAME), SunOS)
|
||||
REQUIRED_FREE_SPACE=1040000
|
||||
endif
|
||||
# How much RAM does this machine have:
|
||||
MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
|
||||
MB_OF_MEMORY:=$(shell /usr/sbin/prtconf 2>/dev/null | fgrep 'Memory size:' | expand | cut -d' ' -f3)
|
||||
endif
|
||||
|
||||
# Platform settings specific to Linux
|
||||
|
@ -27,13 +27,14 @@
|
||||
# Makefile for building the corba workspace.
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include IdlCompilation.gmk
|
||||
|
||||
default: all
|
||||
|
||||
JAVAC_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
|
||||
-jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
|
||||
# The Corba sources are old and generates a LOT of warnings.
|
||||
@ -105,9 +106,9 @@ $(eval $(call SetupArchive,ARCHIVE_LOGUTIL,$(BUILD_LOGUTIL),\
|
||||
$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/%SystemException.java : \
|
||||
$(CORBA_TOPDIR)/src/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
|
||||
$(CORBA_OUTPUTDIR)/btjars/logutil.jar
|
||||
mkdir -p $(@D)
|
||||
rm -f $(@D)/_the_wrappers.d
|
||||
echo Generating class file from $*.mc
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $(@D)/_the_wrappers.d
|
||||
$(ECHO) Generating class file from $*.mc
|
||||
$(JAVA) -jar $(CORBA_OUTPUTDIR)/btjars/logutil.jar make-class $< $(@D)
|
||||
|
||||
# Generate LogWrapper properties file by concatening resource files
|
||||
@ -120,15 +121,15 @@ $(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/LogStrings.properti
|
||||
$(CORBA_OUTPUTDIR)/logwrappers/ORBUtilSystemException.resource \
|
||||
$(CORBA_OUTPUTDIR)/logwrappers/POASystemException.resource \
|
||||
$(CORBA_OUTPUTDIR)/logwrappers/UtilSystemException.resource
|
||||
mkdir -p $(@D)
|
||||
echo Concatenating 8 resource files into $(@F)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) Concatenating 8 resource files into $(@F)
|
||||
$(CAT) $^ > $@
|
||||
|
||||
# The resources files are generated from lisp-like .mc files.
|
||||
$(CORBA_OUTPUTDIR)/logwrappers/%SystemException.resource : $(CORBA_TOPDIR)/src/share/classes/com/sun/corba/se/spi/logging/data/%.mc $(CORBA_OUTPUTDIR)/btjars/logutil.jar
|
||||
mkdir -p $(@D)
|
||||
rm -f $(@D)/_the_wrappers.d
|
||||
echo Generating resource file from $*.mc
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $(@D)/_the_wrappers.d
|
||||
$(ECHO) Generating resource file from $*.mc
|
||||
$(JAVA) -jar $(CORBA_OUTPUTDIR)/btjars/logutil.jar make-resource $< $(@D)
|
||||
|
||||
|
||||
@ -142,8 +143,8 @@ $(CORBA_OUTPUTDIR)/logwrappers/_the_wrappers.d : $(CORBA_OUTPUTDIR)/btjars/logut
|
||||
$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/POASystemException.java \
|
||||
$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/UtilSystemException.java \
|
||||
$(CORBA_OUTPUTDIR)/logwrappers/com/sun/corba/se/impl/logging/LogStrings.properties
|
||||
mkdir -p $(@D)
|
||||
echo LOGWRAPPERS_ARE_CREATED=yes > $@
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) LOGWRAPPERS_ARE_CREATED=yes > $@
|
||||
|
||||
# Trigger the generation of the logwrappers. After the logwrapper classes and
|
||||
# resources have been created, then the makefile will restart and the newly
|
||||
@ -167,8 +168,8 @@ ifeq ($(LOGWRAPPERS_ARE_CREATED),yes)
|
||||
$(BUILD_IDLS) : $(CORBA_OUTPUTDIR)/btjars/idlj.jar
|
||||
|
||||
$(CORBA_OUTPUTDIR)/gensrc/_the_idls.d : $(BUILD_IDLS) $(CORBA_OUTPUTDIR)/btjars/idlj.jar
|
||||
mkdir -p $(@D)
|
||||
echo IDLS_ARE_CREATED=yes > $@
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) IDLS_ARE_CREATED=yes > $@
|
||||
|
||||
-include $(CORBA_OUTPUTDIR)/gensrc/_the_idls.d
|
||||
|
||||
@ -229,15 +230,16 @@ ifeq ($(LOGWRAPPERS_ARE_CREATED),yes)
|
||||
# The created src.zip now contains .java and .properties files used to create the classes in classes.jar
|
||||
# and is ready for inclusion into the jdk src.zip
|
||||
|
||||
BIN_FILES:=$(CORBA_TOPDIR)/src/share/classes/org/omg/CORBA/orb.idl $(CORBA_TOPDIR)/src/share/classes/org/omg/CORBA/ir.idl
|
||||
BIN_FILES:=$(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/orb.idl \
|
||||
$(CORBA_TOPDIR)/src/share/classes/com/sun/tools/corba/se/idl/ir.idl
|
||||
|
||||
$(CORBA_OUTPUTDIR)/dist/lib/bin.zip : $(BIN_FILES) $(CORBA_OUTPUTDIR)/dist/lib/classes.jar
|
||||
mkdir -p $(CORBA_OUTPUTDIR)/dist/lib
|
||||
mkdir -p $(CORBA_OUTPUTDIR)/lib
|
||||
rm -f $@
|
||||
echo Creating `basename $@`
|
||||
cp $(CORBA_TOPDIR)/src/share/classes/org/omg/CORBA/*.idl $(CORBA_OUTPUTDIR)/lib
|
||||
chmod ug+w $(CORBA_OUTPUTDIR)/lib/*
|
||||
$(MKDIR) -p $(CORBA_OUTPUTDIR)/dist/lib
|
||||
$(MKDIR) -p $(CORBA_OUTPUTDIR)/lib
|
||||
$(RM) -f $@
|
||||
$(ECHO) Creating `basename $@`
|
||||
$(CP) $(BIN_FILES) $(CORBA_OUTPUTDIR)/lib
|
||||
$(CHMOD) ug+w $(CORBA_OUTPUTDIR)/lib/*
|
||||
(cd $(CORBA_OUTPUTDIR); $(ZIP) -q $@ lib/orb.idl lib/ir.idl)
|
||||
|
||||
# The created bin.zip now contains the corba specific binaries: orb.idl, ir.idl
|
||||
@ -252,6 +254,6 @@ ifeq ($(LOGWRAPPERS_ARE_CREATED),yes)
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -rf $(CORBA_OUTPUTDIR)
|
||||
$(RM) -rf $(CORBA_OUTPUTDIR)
|
||||
|
||||
.PHONY: default all clean clobber
|
||||
|
@ -252,3 +252,4 @@ ff9decc8235d5af80ea45fda4ecbe643ea252564 jdk8-b40
|
||||
785573170238f0eae6dc8e22ecf1050fbc9ea055 hs24-b12
|
||||
37add4fa0296705f67481e1fd50e2900cd25e39b jdk8-b41
|
||||
bd568544be7fcd12a9327e6c448592198d57b043 hs24-b13
|
||||
55954061c6e8750ea39a63523fd65d580db6eeb1 jdk8-b42
|
||||
|
@ -163,3 +163,4 @@ cfd288fe1d3e2b700838342e70d71d44ac991af5 jdk8-b36
|
||||
f95fdbe525c88ef0d57dc1390be6582a8af5e07c jdk8-b39
|
||||
9ecfdbd6aed4702674eaede2023b4a19513d6b36 jdk8-b40
|
||||
6f5c0e17415de7a9c74900ef4ba12f47accdf88b jdk8-b41
|
||||
39ee03c1602155ff02e5feb6cd44869452f24cf7 jdk8-b42
|
||||
|
@ -23,12 +23,13 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
-include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
default: all
|
||||
|
||||
JAVAC_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
|
||||
-jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
|
||||
DISABLE_JAXP_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough
|
||||
|
@ -182,7 +182,8 @@ protected static final String PARSER_SETTINGS =
|
||||
EXTERNAL_GENERAL_ENTITIES,
|
||||
EXTERNAL_PARAMETER_ENTITIES,
|
||||
ALLOW_JAVA_ENCODINGS,
|
||||
WARN_ON_DUPLICATE_ENTITYDEF
|
||||
WARN_ON_DUPLICATE_ENTITYDEF,
|
||||
STANDARD_URI_CONFORMANT
|
||||
};
|
||||
|
||||
/** Feature defaults. */
|
||||
@ -192,6 +193,7 @@ protected static final String PARSER_SETTINGS =
|
||||
Boolean.TRUE,
|
||||
Boolean.TRUE,
|
||||
Boolean.FALSE,
|
||||
Boolean.FALSE
|
||||
};
|
||||
|
||||
/** Recognized properties. */
|
||||
|
@ -55,7 +55,7 @@ import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
|
||||
final class CharInfo
|
||||
{
|
||||
/** Given a character, lookup a String to output (e.g. a decorated entity reference). */
|
||||
private HashMap m_charToString;
|
||||
private HashMap m_charToString = new HashMap();
|
||||
|
||||
/**
|
||||
* The name of the HTML entities file.
|
||||
@ -72,50 +72,42 @@ final class CharInfo
|
||||
"com.sun.org.apache.xml.internal.serializer.XMLEntities";
|
||||
|
||||
/** The horizontal tab character, which the parser should always normalize. */
|
||||
static final char S_HORIZONAL_TAB = 0x09;
|
||||
public static final char S_HORIZONAL_TAB = 0x09;
|
||||
|
||||
/** The linefeed character, which the parser should always normalize. */
|
||||
static final char S_LINEFEED = 0x0A;
|
||||
public static final char S_LINEFEED = 0x0A;
|
||||
|
||||
/** The carriage return character, which the parser should always normalize. */
|
||||
static final char S_CARRIAGERETURN = 0x0D;
|
||||
static final char S_SPACE = 0x20;
|
||||
static final char S_QUOTE = 0x22;
|
||||
static final char S_LT = 0x3C;
|
||||
static final char S_GT = 0x3E;
|
||||
static final char S_NEL = 0x85;
|
||||
static final char S_LINE_SEPARATOR = 0x2028;
|
||||
public static final char S_CARRIAGERETURN = 0x0D;
|
||||
|
||||
/** This flag is an optimization for HTML entities. It false if entities
|
||||
* other than quot (34), amp (38), lt (60) and gt (62) are defined
|
||||
* in the range 0 to 127.
|
||||
* @xsl.usage internal
|
||||
*/
|
||||
boolean onlyQuotAmpLtGt;
|
||||
final boolean onlyQuotAmpLtGt;
|
||||
|
||||
/** Copy the first 0,1 ... ASCII_MAX values into an array */
|
||||
static final int ASCII_MAX = 128;
|
||||
private static final int ASCII_MAX = 128;
|
||||
|
||||
/** Array of values is faster access than a set of bits
|
||||
* to quickly check ASCII characters in attribute values,
|
||||
* the value is true if the character in an attribute value
|
||||
* should be mapped to a String.
|
||||
* to quickly check ASCII characters in attribute values.
|
||||
*/
|
||||
private final boolean[] shouldMapAttrChar_ASCII;
|
||||
private boolean[] isSpecialAttrASCII = new boolean[ASCII_MAX];
|
||||
|
||||
/** Array of values is faster access than a set of bits
|
||||
* to quickly check ASCII characters in text nodes,
|
||||
* the value is true if the character in a text node
|
||||
* should be mapped to a String.
|
||||
* to quickly check ASCII characters in text nodes.
|
||||
*/
|
||||
private final boolean[] shouldMapTextChar_ASCII;
|
||||
private boolean[] isSpecialTextASCII = new boolean[ASCII_MAX];
|
||||
|
||||
private boolean[] isCleanTextASCII = new boolean[ASCII_MAX];
|
||||
|
||||
/** An array of bits to record if the character is in the set.
|
||||
* Although information in this array is complete, the
|
||||
* isSpecialAttrASCII array is used first because access to its values
|
||||
* is common and faster.
|
||||
*/
|
||||
private final int array_of_bits[];
|
||||
private int array_of_bits[] = createEmptySetOfIntegers(65535);
|
||||
|
||||
|
||||
// 5 for 32 bit words, 6 for 64 bit words ...
|
||||
@ -146,38 +138,33 @@ final class CharInfo
|
||||
|
||||
|
||||
/**
|
||||
* A base constructor just to explicitly create the fields,
|
||||
* with the exception of m_charToString which is handled
|
||||
* by the constructor that delegates base construction to this one.
|
||||
* <p>
|
||||
* m_charToString is not created here only for performance reasons,
|
||||
* to avoid creating a Hashtable that will be replaced when
|
||||
* making a mutable copy, {@link #mutableCopyOf(CharInfo)}.
|
||||
* Constructor that reads in a resource file that describes the mapping of
|
||||
* characters to entity references.
|
||||
* This constructor is private, just to force the use
|
||||
* of the getCharInfo(entitiesResource) factory
|
||||
*
|
||||
* Resource files must be encoded in UTF-8 and can either be properties
|
||||
* files with a .properties extension assumed. Alternatively, they can
|
||||
* have the following form, with no particular extension assumed:
|
||||
*
|
||||
* <pre>
|
||||
* # First char # is a comment
|
||||
* Entity numericValue
|
||||
* quot 34
|
||||
* amp 38
|
||||
* </pre>
|
||||
*
|
||||
* @param entitiesResource Name of properties or resource file that should
|
||||
* be loaded, which describes that mapping of characters to entity
|
||||
* references.
|
||||
*/
|
||||
private CharInfo()
|
||||
private CharInfo(String entitiesResource, String method)
|
||||
{
|
||||
this.array_of_bits = createEmptySetOfIntegers(65535);
|
||||
this.firstWordNotUsed = 0;
|
||||
this.shouldMapAttrChar_ASCII = new boolean[ASCII_MAX];
|
||||
this.shouldMapTextChar_ASCII = new boolean[ASCII_MAX];
|
||||
this.m_charKey = new CharKey();
|
||||
|
||||
// Not set here, but in a constructor that uses this one
|
||||
// this.m_charToString = new Hashtable();
|
||||
|
||||
this.onlyQuotAmpLtGt = true;
|
||||
|
||||
|
||||
return;
|
||||
this(entitiesResource, method, false);
|
||||
}
|
||||
|
||||
private CharInfo(String entitiesResource, String method, boolean internal)
|
||||
{
|
||||
// call the default constructor to create the fields
|
||||
this();
|
||||
m_charToString = new HashMap();
|
||||
|
||||
ResourceBundle entities = null;
|
||||
boolean noExtraEntities = true;
|
||||
|
||||
@ -203,10 +190,12 @@ final class CharInfo
|
||||
String name = (String) keys.nextElement();
|
||||
String value = entities.getString(name);
|
||||
int code = Integer.parseInt(value);
|
||||
boolean extra = defineEntity(name, (char) code);
|
||||
if (extra)
|
||||
defineEntity(name, (char) code);
|
||||
if (extraEntity(code))
|
||||
noExtraEntities = false;
|
||||
}
|
||||
set(S_LINEFEED);
|
||||
set(S_CARRIAGERETURN);
|
||||
} else {
|
||||
InputStream is = null;
|
||||
|
||||
@ -290,8 +279,8 @@ final class CharInfo
|
||||
|
||||
int code = Integer.parseInt(value);
|
||||
|
||||
boolean extra = defineEntity(name, (char) code);
|
||||
if (extra)
|
||||
defineEntity(name, (char) code);
|
||||
if (extraEntity(code))
|
||||
noExtraEntities = false;
|
||||
}
|
||||
}
|
||||
@ -300,6 +289,8 @@ final class CharInfo
|
||||
}
|
||||
|
||||
is.close();
|
||||
set(S_LINEFEED);
|
||||
set(S_CARRIAGERETURN);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(
|
||||
Utils.messages.createMessage(
|
||||
@ -317,8 +308,31 @@ final class CharInfo
|
||||
}
|
||||
}
|
||||
|
||||
/* initialize the array isCleanTextASCII[] with a cache of values
|
||||
* for use by ToStream.character(char[], int , int)
|
||||
* and the array isSpecialTextASCII[] with the opposite values
|
||||
* (all in the name of performance!)
|
||||
*/
|
||||
for (int ch = 0; ch <ASCII_MAX; ch++)
|
||||
if((((0x20 <= ch || (0x0A == ch || 0x0D == ch || 0x09 == ch)))
|
||||
&& (!get(ch))) || ('"' == ch))
|
||||
{
|
||||
isCleanTextASCII[ch] = true;
|
||||
isSpecialTextASCII[ch] = false;
|
||||
}
|
||||
else {
|
||||
isCleanTextASCII[ch] = false;
|
||||
isSpecialTextASCII[ch] = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
onlyQuotAmpLtGt = noExtraEntities;
|
||||
|
||||
// initialize the array with a cache of the BitSet values
|
||||
for (int i=0; i<ASCII_MAX; i++)
|
||||
isSpecialAttrASCII[i] = get(i);
|
||||
|
||||
/* Now that we've used get(ch) just above to initialize the
|
||||
* two arrays we will change by adding a tab to the set of
|
||||
* special chars for XML (but not HTML!).
|
||||
@ -330,19 +344,8 @@ final class CharInfo
|
||||
*/
|
||||
if (Method.XML.equals(method))
|
||||
{
|
||||
// We choose not to escape the quotation mark as " in text nodes
|
||||
shouldMapTextChar_ASCII[S_QUOTE] = false;
|
||||
isSpecialAttrASCII[S_HORIZONAL_TAB] = true;
|
||||
}
|
||||
|
||||
if (Method.HTML.equals(method)) {
|
||||
// The XSLT 1.0 recommendation says
|
||||
// "The html output method should not escape < characters occurring in attribute values."
|
||||
// So we don't escape '<' in an attribute for HTML
|
||||
shouldMapAttrChar_ASCII['<'] = false;
|
||||
|
||||
// We choose not to escape the quotation mark as " in text nodes.
|
||||
shouldMapTextChar_ASCII[S_QUOTE] = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -350,38 +353,22 @@ final class CharInfo
|
||||
* supplied. Nothing happens if the character reference is already defined.
|
||||
* <p>Unlike internal entities, character references are a string to single
|
||||
* character mapping. They are used to map non-ASCII characters both on
|
||||
* parsing and printing, primarily for HTML documents. '&lt;' is an
|
||||
* parsing and printing, primarily for HTML documents. '<amp;' is an
|
||||
* example of a character reference.</p>
|
||||
*
|
||||
* @param name The entity's name
|
||||
* @param value The entity's value
|
||||
* @return true if the mapping is not one of:
|
||||
* <ul>
|
||||
* <li> '<' to "<"
|
||||
* <li> '>' to ">"
|
||||
* <li> '&' to "&"
|
||||
* <li> '"' to """
|
||||
* </ul>
|
||||
*/
|
||||
private boolean defineEntity(String name, char value)
|
||||
private void defineEntity(String name, char value)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder("&");
|
||||
sb.append(name);
|
||||
sb.append(';');
|
||||
String entityString = sb.toString();
|
||||
|
||||
boolean extra = defineChar2StringMapping(entityString, value);
|
||||
return extra;
|
||||
defineChar2StringMapping(entityString, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* A utility object, just used to map characters to output Strings,
|
||||
* needed because a HashMap needs to map an object as a key, not a
|
||||
* Java primitive type, like a char, so this object gets around that
|
||||
* and it is reusable.
|
||||
*/
|
||||
private final CharKey m_charKey;
|
||||
|
||||
/**
|
||||
* Map a character to a String. For example given
|
||||
* the character '>' this method would return the fully decorated
|
||||
@ -413,21 +400,21 @@ final class CharInfo
|
||||
|
||||
/**
|
||||
* Tell if the character argument that is from
|
||||
* an attribute value has a mapping to a String.
|
||||
* an attribute value should have special treatment.
|
||||
*
|
||||
* @param value the value of a character that is in an attribute value
|
||||
* @return true if the character should have any special treatment,
|
||||
* such as when writing out attribute values,
|
||||
* such as when writing out entity references.
|
||||
* or entity references.
|
||||
* @xsl.usage internal
|
||||
*/
|
||||
final boolean shouldMapAttrChar(int value)
|
||||
final boolean isSpecialAttrChar(int value)
|
||||
{
|
||||
// for performance try the values in the boolean array first,
|
||||
// this is faster access than the BitSet for common ASCII values
|
||||
|
||||
if (value < ASCII_MAX)
|
||||
return shouldMapAttrChar_ASCII[value];
|
||||
return isSpecialAttrASCII[value];
|
||||
|
||||
// rather than java.util.BitSet, our private
|
||||
// implementation is faster (and less general).
|
||||
@ -436,27 +423,48 @@ final class CharInfo
|
||||
|
||||
/**
|
||||
* Tell if the character argument that is from a
|
||||
* text node has a mapping to a String, for example
|
||||
* to map '<' to "<".
|
||||
* text node should have special treatment.
|
||||
*
|
||||
* @param value the value of a character that is in a text node
|
||||
* @return true if the character has a mapping to a String,
|
||||
* such as when writing out entity references.
|
||||
* @return true if the character should have any special treatment,
|
||||
* such as when writing out attribute values,
|
||||
* or entity references.
|
||||
* @xsl.usage internal
|
||||
*/
|
||||
final boolean shouldMapTextChar(int value)
|
||||
final boolean isSpecialTextChar(int value)
|
||||
{
|
||||
// for performance try the values in the boolean array first,
|
||||
// this is faster access than the BitSet for common ASCII values
|
||||
|
||||
if (value < ASCII_MAX)
|
||||
return shouldMapTextChar_ASCII[value];
|
||||
return isSpecialTextASCII[value];
|
||||
|
||||
// rather than java.util.BitSet, our private
|
||||
// implementation is faster (and less general).
|
||||
return get(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to determine if an ASCII character in
|
||||
* a text node (not an attribute value) is "clean".
|
||||
* @param value the character to check (0 to 127).
|
||||
* @return true if the character can go to the writer as-is
|
||||
* @xsl.usage internal
|
||||
*/
|
||||
final boolean isTextASCIIClean(int value)
|
||||
{
|
||||
return isCleanTextASCII[value];
|
||||
}
|
||||
|
||||
// In the future one might want to use the array directly and avoid
|
||||
// the method call, but I think the JIT alreay inlines this well enough
|
||||
// so don't do it (for now) - bjm
|
||||
// public final boolean[] getASCIIClean()
|
||||
// {
|
||||
// return isCleanTextASCII;
|
||||
// }
|
||||
|
||||
|
||||
private static CharInfo getCharInfoBasedOnPrivilege(
|
||||
final String entitiesFileName, final String method,
|
||||
final boolean internal){
|
||||
@ -491,17 +499,15 @@ final class CharInfo
|
||||
{
|
||||
CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName);
|
||||
if (charInfo != null) {
|
||||
return mutableCopyOf(charInfo);
|
||||
return charInfo;
|
||||
}
|
||||
|
||||
// try to load it internally - cache
|
||||
try {
|
||||
charInfo = getCharInfoBasedOnPrivilege(entitiesFileName,
|
||||
method, true);
|
||||
// Put the common copy of charInfo in the cache, but return
|
||||
// a copy of it.
|
||||
m_getCharInfoCache.put(entitiesFileName, charInfo);
|
||||
return mutableCopyOf(charInfo);
|
||||
return charInfo;
|
||||
} catch (Exception e) {}
|
||||
|
||||
// try to load it externally - do not cache
|
||||
@ -528,41 +534,7 @@ final class CharInfo
|
||||
method, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a mutable copy of the cached one.
|
||||
* @param charInfo The cached one.
|
||||
* @return
|
||||
*/
|
||||
private static CharInfo mutableCopyOf(CharInfo charInfo) {
|
||||
CharInfo copy = new CharInfo();
|
||||
|
||||
int max = charInfo.array_of_bits.length;
|
||||
System.arraycopy(charInfo.array_of_bits,0,copy.array_of_bits,0,max);
|
||||
|
||||
copy.firstWordNotUsed = charInfo.firstWordNotUsed;
|
||||
|
||||
max = charInfo.shouldMapAttrChar_ASCII.length;
|
||||
System.arraycopy(charInfo.shouldMapAttrChar_ASCII,0,copy.shouldMapAttrChar_ASCII,0,max);
|
||||
|
||||
max = charInfo.shouldMapTextChar_ASCII.length;
|
||||
System.arraycopy(charInfo.shouldMapTextChar_ASCII,0,copy.shouldMapTextChar_ASCII,0,max);
|
||||
|
||||
// utility field copy.m_charKey is already created in the default constructor
|
||||
|
||||
copy.m_charToString = (HashMap) charInfo.m_charToString.clone();
|
||||
|
||||
copy.onlyQuotAmpLtGt = charInfo.onlyQuotAmpLtGt;
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Table of user-specified char infos.
|
||||
* The table maps entify file names (the name of the
|
||||
* property file without the .properties extension)
|
||||
* to CharInfo objects populated with entities defined in
|
||||
* corresponding property file.
|
||||
*/
|
||||
/** Table of user-specified char infos. */
|
||||
private static HashMap m_getCharInfoCache = new HashMap();
|
||||
|
||||
/**
|
||||
@ -604,8 +576,7 @@ final class CharInfo
|
||||
* the creation of the set.
|
||||
*/
|
||||
private final void set(int i) {
|
||||
setASCIItextDirty(i);
|
||||
setASCIIattrDirty(i);
|
||||
setASCIIdirty(i);
|
||||
|
||||
int j = (i >> SHIFT_PER_WORD); // this word is used
|
||||
int k = j + 1;
|
||||
@ -640,43 +611,24 @@ final class CharInfo
|
||||
return in_the_set;
|
||||
}
|
||||
|
||||
// record if there are any entities other than
|
||||
// quot, amp, lt, gt (probably user defined)
|
||||
/**
|
||||
* This method returns true if there are some non-standard mappings to
|
||||
* entities other than quot, amp, lt, gt, and its only purpose is for
|
||||
* performance.
|
||||
* @param charToMap The value of the character that is mapped to a String
|
||||
* @param outputString The String to which the character is mapped, usually
|
||||
* an entity reference such as "<".
|
||||
* @return true if the mapping is not one of:
|
||||
* <ul>
|
||||
* <li> '<' to "<"
|
||||
* <li> '>' to ">"
|
||||
* <li> '&' to "&"
|
||||
* <li> '"' to """
|
||||
* </ul>
|
||||
* @return true if the entity
|
||||
* @param code The value of the character that has an entity defined
|
||||
* for it.
|
||||
*/
|
||||
private boolean extraEntity(String outputString, int charToMap)
|
||||
private boolean extraEntity(int entityValue)
|
||||
{
|
||||
boolean extra = false;
|
||||
if (charToMap < ASCII_MAX)
|
||||
if (entityValue < 128)
|
||||
{
|
||||
switch (charToMap)
|
||||
switch (entityValue)
|
||||
{
|
||||
case '"' : // quot
|
||||
if (!outputString.equals("""))
|
||||
extra = true;
|
||||
break;
|
||||
case '&' : // amp
|
||||
if (!outputString.equals("&"))
|
||||
extra = true;
|
||||
break;
|
||||
case '<' : // lt
|
||||
if (!outputString.equals("<"))
|
||||
extra = true;
|
||||
break;
|
||||
case '>' : // gt
|
||||
if (!outputString.equals(">"))
|
||||
extra = true;
|
||||
case 34 : // quot
|
||||
case 38 : // amp
|
||||
case 60 : // lt
|
||||
case 62 : // gt
|
||||
break;
|
||||
default : // other entity in range 0 to 127
|
||||
extra = true;
|
||||
@ -686,61 +638,49 @@ final class CharInfo
|
||||
}
|
||||
|
||||
/**
|
||||
* If the character is in the ASCII range then
|
||||
* mark it as needing replacement with
|
||||
* a String on output if it occurs in a text node.
|
||||
* If the character is a printable ASCII character then
|
||||
* mark it as not clean and needing replacement with
|
||||
* a String on output.
|
||||
* @param ch
|
||||
*/
|
||||
private void setASCIItextDirty(int j)
|
||||
private void setASCIIdirty(int j)
|
||||
{
|
||||
if (0 <= j && j < ASCII_MAX)
|
||||
{
|
||||
shouldMapTextChar_ASCII[j] = true;
|
||||
isCleanTextASCII[j] = false;
|
||||
isSpecialTextASCII[j] = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If the character is in the ASCII range then
|
||||
* mark it as needing replacement with
|
||||
* a String on output if it occurs in a attribute value.
|
||||
* If the character is a printable ASCII character then
|
||||
* mark it as and not needing replacement with
|
||||
* a String on output.
|
||||
* @param ch
|
||||
*/
|
||||
private void setASCIIattrDirty(int j)
|
||||
private void setASCIIclean(int j)
|
||||
{
|
||||
if (0 <= j && j < ASCII_MAX)
|
||||
{
|
||||
shouldMapAttrChar_ASCII[j] = true;
|
||||
isCleanTextASCII[j] = true;
|
||||
isSpecialTextASCII[j] = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to register a char to String mapping, for example
|
||||
* to map '<' to "<".
|
||||
* @param outputString The String to map to.
|
||||
* @param inputChar The char to map from.
|
||||
* @return true if the mapping is not one of:
|
||||
* <ul>
|
||||
* <li> '<' to "<"
|
||||
* <li> '>' to ">"
|
||||
* <li> '&' to "&"
|
||||
* <li> '"' to """
|
||||
* </ul>
|
||||
*/
|
||||
boolean defineChar2StringMapping(String outputString, char inputChar)
|
||||
private void defineChar2StringMapping(String outputString, char inputChar)
|
||||
{
|
||||
CharKey character = new CharKey(inputChar);
|
||||
m_charToString.put(character, outputString);
|
||||
set(inputChar); // mark the character has having a mapping to a String
|
||||
|
||||
boolean extraMapping = extraEntity(outputString, inputChar);
|
||||
return extraMapping;
|
||||
|
||||
set(inputChar);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple class for fast lookup of char values, when used with
|
||||
* hashtables. You can set the char, then use it as a key.
|
||||
*
|
||||
* This class is a copy of the one in com.sun.org.apache.xml.internal.utils.
|
||||
* It exists to cut the serializers dependancy on that package.
|
||||
*
|
||||
* @xsl.usage internal
|
||||
*/
|
||||
private static class CharKey extends Object
|
||||
|
@ -58,7 +58,7 @@ public final class ToHTMLStream extends ToStream
|
||||
* Map that tells which XML characters should have special treatment, and it
|
||||
* provides character to entity name lookup.
|
||||
*/
|
||||
private final CharInfo m_htmlcharInfo =
|
||||
private static final CharInfo m_htmlcharInfo =
|
||||
// new CharInfo(CharInfo.HTML_ENTITIES_RESOURCE);
|
||||
CharInfo.getCharInfo(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML);
|
||||
|
||||
@ -1369,7 +1369,7 @@ public final class ToHTMLStream extends ToStream
|
||||
// System.out.println("ch: "+(int)ch);
|
||||
// System.out.println("m_maxCharacter: "+(int)m_maxCharacter);
|
||||
// System.out.println("m_attrCharsMap[ch]: "+(int)m_attrCharsMap[ch]);
|
||||
if (escapingNotNeeded(ch) && (!m_charInfo.shouldMapAttrChar(ch)))
|
||||
if (escapingNotNeeded(ch) && (!m_charInfo.isSpecialAttrChar(ch)))
|
||||
{
|
||||
cleanLength++;
|
||||
}
|
||||
|
@ -919,8 +919,7 @@ abstract public class ToStream extends SerializerBase
|
||||
{
|
||||
// This is the old/fast code here, but is this
|
||||
// correct for all encodings?
|
||||
if (ch >= CharInfo.S_SPACE || (CharInfo.S_LINEFEED == ch ||
|
||||
CharInfo.S_CARRIAGERETURN == ch || CharInfo.S_HORIZONAL_TAB == ch))
|
||||
if (ch >= 0x20 || (0x0A == ch || 0x0D == ch || 0x09 == ch))
|
||||
ret= true;
|
||||
else
|
||||
ret = false;
|
||||
@ -1029,7 +1028,7 @@ abstract public class ToStream extends SerializerBase
|
||||
*
|
||||
* @throws java.io.IOException
|
||||
*/
|
||||
int accumDefaultEntity(
|
||||
protected int accumDefaultEntity(
|
||||
java.io.Writer writer,
|
||||
char ch,
|
||||
int i,
|
||||
@ -1048,7 +1047,7 @@ abstract public class ToStream extends SerializerBase
|
||||
{
|
||||
// if this is text node character and a special one of those,
|
||||
// or if this is a character from attribute value and a special one of those
|
||||
if ((fromTextNode && m_charInfo.shouldMapTextChar(ch)) || (!fromTextNode && m_charInfo.shouldMapAttrChar(ch)))
|
||||
if ((fromTextNode && m_charInfo.isSpecialTextChar(ch)) || (!fromTextNode && m_charInfo.isSpecialAttrChar(ch)))
|
||||
{
|
||||
String outputStringForChar = m_charInfo.getOutputStringForChar(ch);
|
||||
|
||||
@ -1399,6 +1398,7 @@ abstract public class ToStream extends SerializerBase
|
||||
|
||||
if (m_cdataTagOpen)
|
||||
closeCDATA();
|
||||
// the check with _escaping is a bit of a hack for XLSTC
|
||||
|
||||
if (m_disableOutputEscapingStates.peekOrFalse() || (!m_escaping))
|
||||
{
|
||||
@ -1421,173 +1421,82 @@ abstract public class ToStream extends SerializerBase
|
||||
try
|
||||
{
|
||||
int i;
|
||||
char ch1;
|
||||
int startClean;
|
||||
|
||||
// skip any leading whitspace
|
||||
// don't go off the end and use a hand inlined version
|
||||
// of isWhitespace(ch)
|
||||
final int end = start + length;
|
||||
int lastDirtyCharProcessed = start - 1; // last non-clean character that was processed
|
||||
// that was processed
|
||||
final Writer writer = m_writer;
|
||||
boolean isAllWhitespace = true;
|
||||
|
||||
// process any leading whitspace
|
||||
i = start;
|
||||
while (i < end && isAllWhitespace) {
|
||||
char ch1 = chars[i];
|
||||
|
||||
if (m_charInfo.shouldMapTextChar(ch1)) {
|
||||
// The character is supposed to be replaced by a String
|
||||
// so write out the clean whitespace characters accumulated
|
||||
// so far
|
||||
// then the String.
|
||||
writeOutCleanChars(chars, i, lastDirtyCharProcessed);
|
||||
String outputStringForChar = m_charInfo
|
||||
.getOutputStringForChar(ch1);
|
||||
writer.write(outputStringForChar);
|
||||
// We can't say that everything we are writing out is
|
||||
// all whitespace, we just wrote out a String.
|
||||
isAllWhitespace = false;
|
||||
lastDirtyCharProcessed = i; // mark the last non-clean
|
||||
// character processed
|
||||
i++;
|
||||
} else {
|
||||
// The character is clean, but is it a whitespace ?
|
||||
switch (ch1) {
|
||||
// TODO: Any other whitespace to consider?
|
||||
case CharInfo.S_SPACE:
|
||||
// Just accumulate the clean whitespace
|
||||
i++;
|
||||
break;
|
||||
case CharInfo.S_LINEFEED:
|
||||
lastDirtyCharProcessed = processLineFeed(chars, i,
|
||||
lastDirtyCharProcessed, writer);
|
||||
i++;
|
||||
break;
|
||||
case CharInfo.S_CARRIAGERETURN:
|
||||
writeOutCleanChars(chars, i, lastDirtyCharProcessed);
|
||||
writer.write(" ");
|
||||
lastDirtyCharProcessed = i;
|
||||
i++;
|
||||
break;
|
||||
case CharInfo.S_HORIZONAL_TAB:
|
||||
// Just accumulate the clean whitespace
|
||||
i++;
|
||||
break;
|
||||
default:
|
||||
// The character was clean, but not a whitespace
|
||||
// so break the loop to continue with this character
|
||||
// (we don't increment index i !!)
|
||||
isAllWhitespace = false;
|
||||
break;
|
||||
int lastDirty = start - 1; // last character that needed processing
|
||||
for (i = start;
|
||||
((i < end)
|
||||
&& ((ch1 = chars[i]) == 0x20
|
||||
|| (ch1 == 0xA && m_lineSepUse)
|
||||
|| ch1 == 0xD
|
||||
|| ch1 == 0x09));
|
||||
i++)
|
||||
{
|
||||
/*
|
||||
* We are processing leading whitespace, but are doing the same
|
||||
* processing for dirty characters here as for non-whitespace.
|
||||
*
|
||||
*/
|
||||
if (!m_charInfo.isTextASCIIClean(ch1))
|
||||
{
|
||||
lastDirty = processDirty(chars,end, i,ch1, lastDirty, true);
|
||||
i = lastDirty;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* If there is some non-whitespace, mark that we may need
|
||||
* to preserve this. This is only important if we have indentation on.
|
||||
*/
|
||||
if (i < end || !isAllWhitespace)
|
||||
if (i < end)
|
||||
m_ispreserve = true;
|
||||
|
||||
|
||||
// int lengthClean; // number of clean characters in a row
|
||||
// final boolean[] isAsciiClean = m_charInfo.getASCIIClean();
|
||||
|
||||
final boolean isXML10 = XMLVERSION10.equals(getVersion());
|
||||
// we've skipped the leading whitespace, now deal with the rest
|
||||
for (; i < end; i++)
|
||||
{
|
||||
char ch = chars[i];
|
||||
|
||||
if (m_charInfo.shouldMapTextChar(ch)) {
|
||||
// The character is supposed to be replaced by a String
|
||||
// e.g. '&' --> "&"
|
||||
// e.g. '<' --> "<"
|
||||
writeOutCleanChars(chars, i, lastDirtyCharProcessed);
|
||||
String outputStringForChar = m_charInfo.getOutputStringForChar(ch);
|
||||
writer.write(outputStringForChar);
|
||||
lastDirtyCharProcessed = i;
|
||||
}
|
||||
else {
|
||||
if (ch <= 0x1F) {
|
||||
// Range 0x00 through 0x1F inclusive
|
||||
//
|
||||
// This covers the non-whitespace control characters
|
||||
// in the range 0x1 to 0x1F inclusive.
|
||||
// It also covers the whitespace control characters in the same way:
|
||||
// 0x9 TAB
|
||||
// 0xA NEW LINE
|
||||
// 0xD CARRIAGE RETURN
|
||||
//
|
||||
// We also cover 0x0 ... It isn't valid
|
||||
// but we will output "�"
|
||||
|
||||
// The default will handle this just fine, but this
|
||||
// is a little performance boost to handle the more
|
||||
// common TAB, NEW-LINE, CARRIAGE-RETURN
|
||||
switch (ch) {
|
||||
|
||||
case CharInfo.S_HORIZONAL_TAB:
|
||||
// Leave whitespace TAB as a real character
|
||||
{
|
||||
// A tight loop to skip over common clean chars
|
||||
// This tight loop makes it easier for the JIT
|
||||
// to optimize.
|
||||
char ch2;
|
||||
while (i<end
|
||||
&& ((ch2 = chars[i])<127)
|
||||
&& m_charInfo.isTextASCIIClean(ch2))
|
||||
i++;
|
||||
if (i == end)
|
||||
break;
|
||||
case CharInfo.S_LINEFEED:
|
||||
lastDirtyCharProcessed = processLineFeed(chars, i, lastDirtyCharProcessed, writer);
|
||||
break;
|
||||
case CharInfo.S_CARRIAGERETURN:
|
||||
writeOutCleanChars(chars, i, lastDirtyCharProcessed);
|
||||
writer.write(" ");
|
||||
lastDirtyCharProcessed = i;
|
||||
// Leave whitespace carriage return as a real character
|
||||
break;
|
||||
default:
|
||||
writeOutCleanChars(chars, i, lastDirtyCharProcessed);
|
||||
writer.write("&#");
|
||||
writer.write(Integer.toString(ch));
|
||||
writer.write(';');
|
||||
lastDirtyCharProcessed = i;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
else if (ch < 0x7F) {
|
||||
// Range 0x20 through 0x7E inclusive
|
||||
// Normal ASCII chars, do nothing, just add it to
|
||||
// the clean characters
|
||||
|
||||
final char ch = chars[i];
|
||||
/* The check for isCharacterInC0orC1Ranger and
|
||||
* isNELorLSEPCharacter has been added
|
||||
* to support Control Characters in XML 1.1
|
||||
*/
|
||||
if (!isCharacterInC0orC1Range(ch) &&
|
||||
(isXML10 || !isNELorLSEPCharacter(ch)) &&
|
||||
(escapingNotNeeded(ch) && (!m_charInfo.isSpecialTextChar(ch)))
|
||||
|| ('"' == ch))
|
||||
{
|
||||
; // a character needing no special processing
|
||||
}
|
||||
else if (ch <= 0x9F){
|
||||
// Range 0x7F through 0x9F inclusive
|
||||
// More control characters, including NEL (0x85)
|
||||
writeOutCleanChars(chars, i, lastDirtyCharProcessed);
|
||||
writer.write("&#");
|
||||
writer.write(Integer.toString(ch));
|
||||
writer.write(';');
|
||||
lastDirtyCharProcessed = i;
|
||||
}
|
||||
else if (ch == CharInfo.S_LINE_SEPARATOR) {
|
||||
// LINE SEPARATOR
|
||||
writeOutCleanChars(chars, i, lastDirtyCharProcessed);
|
||||
writer.write("
");
|
||||
lastDirtyCharProcessed = i;
|
||||
}
|
||||
else if (m_encodingInfo.isInEncoding(ch)) {
|
||||
// If the character is in the encoding, and
|
||||
// not in the normal ASCII range, we also
|
||||
// just leave it get added on to the clean characters
|
||||
|
||||
}
|
||||
else {
|
||||
// This is a fallback plan, we should never get here
|
||||
// but if the character wasn't previously handled
|
||||
// (i.e. isn't in the encoding, etc.) then what
|
||||
// should we do? We choose to write out an entity
|
||||
writeOutCleanChars(chars, i, lastDirtyCharProcessed);
|
||||
writer.write("&#");
|
||||
writer.write(Integer.toString(ch));
|
||||
writer.write(';');
|
||||
lastDirtyCharProcessed = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastDirty = processDirty(chars,end, i, ch, lastDirty, true);
|
||||
i = lastDirty;
|
||||
}
|
||||
}
|
||||
|
||||
// we've reached the end. Any clean characters at the
|
||||
// end of the array than need to be written out?
|
||||
startClean = lastDirtyCharProcessed + 1;
|
||||
startClean = lastDirty + 1;
|
||||
if (i > startClean)
|
||||
{
|
||||
int lengthClean = i - startClean;
|
||||
@ -1606,32 +1515,6 @@ abstract public class ToStream extends SerializerBase
|
||||
if (m_tracer != null)
|
||||
super.fireCharEvent(chars, start, length);
|
||||
}
|
||||
|
||||
private int processLineFeed(final char[] chars, int i, int lastProcessed, final Writer writer) throws IOException {
|
||||
if (!m_lineSepUse
|
||||
|| (m_lineSepLen ==1 && m_lineSep[0] == CharInfo.S_LINEFEED)){
|
||||
// We are leaving the new-line alone, and it is just
|
||||
// being added to the 'clean' characters,
|
||||
// so the last dirty character processed remains unchanged
|
||||
}
|
||||
else {
|
||||
writeOutCleanChars(chars, i, lastProcessed);
|
||||
writer.write(m_lineSep, 0, m_lineSepLen);
|
||||
lastProcessed = i;
|
||||
}
|
||||
return lastProcessed;
|
||||
}
|
||||
|
||||
private void writeOutCleanChars(final char[] chars, int i, int lastProcessed) throws IOException {
|
||||
int startClean;
|
||||
startClean = lastProcessed + 1;
|
||||
if (startClean < i)
|
||||
{
|
||||
int lengthClean = i - startClean;
|
||||
m_writer.write(chars, startClean, lengthClean);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method checks if a given character is between C0 or C1 range
|
||||
* of Control characters.
|
||||
@ -1751,7 +1634,7 @@ abstract public class ToStream extends SerializerBase
|
||||
*
|
||||
* @throws org.xml.sax.SAXException
|
||||
*/
|
||||
private int accumDefaultEscape(
|
||||
protected int accumDefaultEscape(
|
||||
Writer writer,
|
||||
char ch,
|
||||
int i,
|
||||
@ -1815,15 +1698,16 @@ abstract public class ToStream extends SerializerBase
|
||||
* to write it out as Numeric Character Reference(NCR) regardless of XML Version
|
||||
* being used for output document.
|
||||
*/
|
||||
if (isCharacterInC0orC1Range(ch) || isNELorLSEPCharacter(ch))
|
||||
if (isCharacterInC0orC1Range(ch) ||
|
||||
(XMLVERSION11.equals(getVersion()) && isNELorLSEPCharacter(ch)))
|
||||
{
|
||||
writer.write("&#");
|
||||
writer.write(Integer.toString(ch));
|
||||
writer.write(';');
|
||||
}
|
||||
else if ((!escapingNotNeeded(ch) ||
|
||||
( (fromTextNode && m_charInfo.shouldMapTextChar(ch))
|
||||
|| (!fromTextNode && m_charInfo.shouldMapAttrChar(ch))))
|
||||
( (fromTextNode && m_charInfo.isSpecialTextChar(ch))
|
||||
|| (!fromTextNode && m_charInfo.isSpecialAttrChar(ch))))
|
||||
&& m_elemContext.m_currentElemDepth > 0)
|
||||
{
|
||||
writer.write("&#");
|
||||
@ -2087,86 +1971,28 @@ abstract public class ToStream extends SerializerBase
|
||||
string.getChars(0,len, m_attrBuff, 0);
|
||||
final char[] stringChars = m_attrBuff;
|
||||
|
||||
for (int i = 0; i < len;)
|
||||
for (int i = 0; i < len; )
|
||||
{
|
||||
char ch = stringChars[i];
|
||||
if (escapingNotNeeded(ch) && (!m_charInfo.isSpecialAttrChar(ch)))
|
||||
{
|
||||
writer.write(ch);
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{ // I guess the parser doesn't normalize cr/lf in attributes. -sb
|
||||
// if ((CharInfo.S_CARRIAGERETURN == ch)
|
||||
// && ((i + 1) < len)
|
||||
// && (CharInfo.S_LINEFEED == stringChars[i + 1]))
|
||||
// {
|
||||
// i++;
|
||||
// ch = CharInfo.S_LINEFEED;
|
||||
// }
|
||||
|
||||
if (m_charInfo.shouldMapAttrChar(ch) || !(escapingNotNeeded(ch))) {
|
||||
// The character is supposed to be replaced by a String
|
||||
// e.g. '&' --> "&"
|
||||
// e.g. '<' --> "<"
|
||||
i = accumDefaultEscape(writer, ch, i, stringChars, len, false, true);
|
||||
}
|
||||
else {
|
||||
i++;
|
||||
if (0x0 <= ch && ch <= 0x1F) {
|
||||
// Range 0x00 through 0x1F inclusive
|
||||
// This covers the non-whitespace control characters
|
||||
// in the range 0x1 to 0x1F inclusive.
|
||||
// It also covers the whitespace control characters in the same way:
|
||||
// 0x9 TAB
|
||||
// 0xA NEW LINE
|
||||
// 0xD CARRIAGE RETURN
|
||||
//
|
||||
// We also cover 0x0 ... It isn't valid
|
||||
// but we will output "�"
|
||||
|
||||
// The default will handle this just fine, but this
|
||||
// is a little performance boost to handle the more
|
||||
// common TAB, NEW-LINE, CARRIAGE-RETURN
|
||||
switch (ch) {
|
||||
|
||||
case CharInfo.S_HORIZONAL_TAB:
|
||||
writer.write("	");
|
||||
break;
|
||||
case CharInfo.S_LINEFEED:
|
||||
writer.write(" ");
|
||||
break;
|
||||
case CharInfo.S_CARRIAGERETURN:
|
||||
writer.write(" ");
|
||||
break;
|
||||
default:
|
||||
writer.write("&#");
|
||||
writer.write(Integer.toString(ch));
|
||||
writer.write(';');
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
else if (ch < 0x7F) {
|
||||
// Range 0x20 through 0x7E inclusive
|
||||
// Normal ASCII chars
|
||||
writer.write(ch);
|
||||
}
|
||||
else if (ch <= 0x9F){
|
||||
// Range 0x7F through 0x9F inclusive
|
||||
// More control characters
|
||||
writer.write("&#");
|
||||
writer.write(Integer.toString(ch));
|
||||
writer.write(';');
|
||||
}
|
||||
else if (ch == CharInfo.S_LINE_SEPARATOR) {
|
||||
// LINE SEPARATOR
|
||||
writer.write("
");
|
||||
}
|
||||
else if (m_encodingInfo.isInEncoding(ch)) {
|
||||
// If the character is in the encoding, and
|
||||
// not in the normal ASCII range, we also
|
||||
// just write it out
|
||||
writer.write(ch);
|
||||
}
|
||||
else {
|
||||
// This is a fallback plan, we should never get here
|
||||
// but if the character wasn't previously handled
|
||||
// (i.e. isn't in the encoding, etc.) then what
|
||||
// should we do? We choose to write out a character ref
|
||||
writer.write("&#");
|
||||
writer.write(Integer.toString(ch));
|
||||
writer.write(';');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2936,14 +2762,6 @@ abstract public class ToStream extends SerializerBase
|
||||
closeCDATA();
|
||||
m_cdataTagOpen = false;
|
||||
}
|
||||
if (m_writer != null) {
|
||||
try {
|
||||
m_writer.flush();
|
||||
}
|
||||
catch(IOException e) {
|
||||
// what? me worry?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setContentHandler(ContentHandler ch)
|
||||
|
@ -56,7 +56,7 @@ public final class ToXMLStream extends ToStream
|
||||
* Map that tells which XML characters should have special treatment, and it
|
||||
* provides character to entity name lookup.
|
||||
*/
|
||||
private CharInfo m_xmlcharInfo =
|
||||
private static CharInfo m_xmlcharInfo =
|
||||
// new CharInfo(CharInfo.XML_ENTITIES_RESOURCE);
|
||||
CharInfo.getCharInfo(CharInfo.XML_ENTITIES_RESOURCE, Method.XML);
|
||||
|
||||
@ -329,11 +329,12 @@ public final class ToXMLStream extends ToStream
|
||||
|
||||
/**
|
||||
* Before Xalan 1497, a newline char was printed out if not inside of an
|
||||
* element. The whitespace is not significant if the output is standalone
|
||||
* element. The whitespace is not significant is the output is standalone
|
||||
*/
|
||||
if (m_elemContext.m_currentElemDepth <= 0 && m_isStandalone)
|
||||
writer.write(m_lineSep, 0, m_lineSepLen);
|
||||
|
||||
|
||||
/*
|
||||
* Don't write out any indentation whitespace now,
|
||||
* because there may be non-whitespace text after this.
|
||||
|
@ -163,3 +163,4 @@ ac1ba3b56775e3cdcd91b7a48793b59f6a3c18b5 jdk8-b38
|
||||
7f6b44fd303478caa83575dbc225de187c509c50 jdk8-b39
|
||||
09a0ddda03cb36deb6ee9edf789da12aa4674c6b jdk8-b40
|
||||
f2072b164b0519227833a2994f78e3988ee67827 jdk8-b41
|
||||
1f20f37818a91b66eaeba268d0b785718598ee0e jdk8-b42
|
||||
|
@ -23,12 +23,13 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
default: all
|
||||
|
||||
JAVAC_JARS ?= -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
|
||||
-jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
|
||||
DISABLE_JAXWS_WARNINGS:=-Xlint:all,-varargs,-rawtypes,-deprecation,-unchecked,-serial,-dep-ann,-cast,-fallthrough,-static
|
||||
|
@ -163,3 +163,4 @@ c45f3509a70796c54b48f32910d1caf435763416 jdk8-b38
|
||||
b6f52911752110a2889681923992c7a0baa52ccc jdk8-b39
|
||||
b88fc3359dc7edabfa8a228855d8cebf8843c055 jdk8-b40
|
||||
4eac56f073ea8179b1a35fcd2af9b48b0088be9f jdk8-b41
|
||||
cf5c1f6fbc5ba14163fe0ef8eb8601b33f951372 jdk8-b42
|
||||
|
@ -30,6 +30,22 @@ PRODUCT = oracle
|
||||
#SUBDIRS_MAKEFLAGS += JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation,-path
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
JFR_SRCDIRS_EXIST := $(shell \
|
||||
if [ -d $(CLOSED_SHARE_SRC)/native/oracle/jfr ] ; then \
|
||||
echo true; \
|
||||
else \
|
||||
echo false; \
|
||||
fi)
|
||||
|
||||
JFR =
|
||||
ifndef OPENJDK
|
||||
ifndef JAVASE_EMBEDDED
|
||||
ifeq ($(JFR_SRCDIRS_EXIST), true)
|
||||
JFR = jfr
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# build com/oracle/security/ucrypto on Solaris platform for non-OpenJDK builds
|
||||
UCRYPTO =
|
||||
ifndef OPENJDK
|
||||
@ -38,13 +54,6 @@ ifndef OPENJDK
|
||||
endif
|
||||
endif
|
||||
|
||||
JFR =
|
||||
ifndef OPENJDK
|
||||
ifndef JAVASE_EMBEDDED
|
||||
JFR = jfr
|
||||
endif
|
||||
endif
|
||||
|
||||
SUBDIRS = $(JFR) net nio util $(UCRYPTO)
|
||||
|
||||
include $(BUILDDIR)/common/Subdirs.gmk
|
||||
|
@ -99,6 +99,9 @@ CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
|
||||
# variable names because the incoming option value can be overridden
|
||||
# in some situations, e.g., a VARIANT != OPT build.
|
||||
|
||||
ADD_GNU_DEBUGLINK = $(ABS_BUILDTOOLBINDIR)/add_gnu_debuglink
|
||||
FIX_EMPTY_SEC_HDR_FLAGS = $(ABS_BUILDTOOLBINDIR)/fix_empty_sec_hdr_flags
|
||||
|
||||
ifeq ($(VARIANT), OPT)
|
||||
FULL_DEBUG_SYMBOLS ?= 1
|
||||
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
|
||||
@ -113,26 +116,11 @@ _JUNK_ := $(shell \
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
# Default OBJCOPY comes from the SUNWbinutils package:
|
||||
DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
|
||||
ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
|
||||
# On Solaris AMD64/X64, gobjcopy is not happy and fails:
|
||||
#
|
||||
# usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
|
||||
# BFD: stKPaiop: Not enough room for program headers, try linking with -N
|
||||
# /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
|
||||
# BFD: stKPaiop: Not enough room for program headers, try linking with -N
|
||||
# /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
|
||||
# BFD: stKPaiop: Not enough room for program headers, try linking with -N
|
||||
# /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
|
||||
_JUNK_ := $(shell \
|
||||
echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
|
||||
OBJCOPY=
|
||||
else
|
||||
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
|
||||
ifneq ($(ALT_OBJCOPY),)
|
||||
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
|
||||
# disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
|
||||
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
|
||||
endif
|
||||
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
|
||||
ifneq ($(ALT_OBJCOPY),)
|
||||
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
|
||||
# disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
|
||||
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
|
||||
endif
|
||||
|
||||
# Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
|
||||
@ -243,18 +231,21 @@ endif
|
||||
# optimization flags as used by FASTDEBUG. We also want all the
|
||||
# debug info in one place (-xs).
|
||||
#
|
||||
CFLAGS_COMMON=
|
||||
CXXFLAGS_COMMON=
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
|
||||
ifeq ($(VARIANT), OPT)
|
||||
CC_OPT = -g -xs $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
|
||||
CXX_OPT = -g0 -xs $(CXX_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
|
||||
OPTIMIZATION_LEVEL = $(FASTDEBUG_OPTIMIZATION_LEVEL)
|
||||
CFLAGS_COMMON += -g -xs
|
||||
CXXFLAGS_COMMON += -g0 -xs
|
||||
endif
|
||||
CFLAGS_DEBUG_OPTION += -xs
|
||||
CXXFLAGS_DEBUG_OPTION += -xs
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS_COMMON = -L$(OBJDIR)
|
||||
CFLAGS_COMMON += -L$(OBJDIR)
|
||||
|
||||
# Do not allow C99 language features like declarations in code etc.
|
||||
CFLAGS_COMMON += -xc99=%none
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1995, 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
|
||||
@ -297,6 +297,7 @@ BUILDTOOLJARDIR = $(OUTPUTDIR)/btjars
|
||||
ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
|
||||
# for generated tool class files
|
||||
BUILDTOOLBINDIR = $(OUTPUTDIR)/btbins
|
||||
ABS_BUILDTOOLBINDIR = $(ABS_OUTPUTDIR)/btbins
|
||||
# for generated java source files
|
||||
GENSRCDIR = $(OUTPUTDIR)/gensrc
|
||||
# for generated C source files (not javah)
|
||||
|
@ -245,6 +245,12 @@ ifneq ($(PLATFORM), macosx)
|
||||
ARFLAGS = -r
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
|
||||
$(ACTUAL_LIBRARY):: $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder)
|
||||
@$(prep-target)
|
||||
@$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), OPTIMIZATION_LEVEL=$(OPTIMIZATION_LEVEL)"
|
||||
@ -260,11 +266,29 @@ endif # WRITE_LIBVERSION
|
||||
ifneq ($(PLATFORM), macosx)
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
# empty section headers until a fixed $(OBJCOPY) is available.
|
||||
# An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
# This problem has only been seen on Solaris X64, but we call this tool
|
||||
# on all Solaris builds just in case.
|
||||
#
|
||||
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
(set -e ; \
|
||||
$(CD) $(@D) ; \
|
||||
$(OBJCOPY) --only-keep-debug $(@F) $(LIBRARY).debuginfo ; \
|
||||
$(OBJCOPY) --add-gnu-debuglink=$(LIBRARY).debuginfo $(@F) ; \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(@F) ; \
|
||||
$(OBJCOPY) --only-keep-debug $(@F) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
|
||||
$(ADD_GNU_DEBUGLINK) $(LIB_PREFIX)$(LIBRARY).debuginfo $(@F) ; \
|
||||
)
|
||||
else # PLATFORM != solaris
|
||||
(set -e ; \
|
||||
$(CD) $(@D) ; \
|
||||
$(OBJCOPY) --only-keep-debug $(@F) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
|
||||
$(OBJCOPY) --add-gnu-debuglink=$(LIB_PREFIX)$(LIBRARY).debuginfo $(@F) ; \
|
||||
)
|
||||
endif # PLATFORM == solaris
|
||||
ifeq ($(STRIP_POLICY),all_strip)
|
||||
$(STRIP) $@
|
||||
else
|
||||
@ -281,8 +305,8 @@ endif # WRITE_LIBVERSION
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
(set -e ; \
|
||||
$(CD) $(@D) ; \
|
||||
$(ZIPEXE) -q $(LIBRARY).diz $(LIBRARY).debuginfo ; \
|
||||
$(RM) $(LIBRARY).debuginfo ; \
|
||||
$(ZIPEXE) -q $(LIB_PREFIX)$(LIBRARY).diz $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
|
||||
$(RM) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
|
||||
)
|
||||
endif
|
||||
endif # LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
|
||||
|
@ -230,6 +230,13 @@ else
|
||||
#
|
||||
# This rule only applies on unix. It supports quantify and its ilk.
|
||||
#
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
|
||||
$(ACTUAL_PROGRAM):: $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(ACTUAL_PROGRAM):: $(FILES_o)
|
||||
@$(prep-target)
|
||||
@set -- $?; \
|
||||
@ -244,11 +251,29 @@ else
|
||||
ifneq ($(PLATFORM), macosx)
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
# empty section headers until a fixed $(OBJCOPY) is available.
|
||||
# An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
# This problem has only been seen on Solaris X64, but we call this tool
|
||||
# on all Solaris builds just in case.
|
||||
#
|
||||
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
(set -e ; \
|
||||
$(CD) $(@D) ; \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(@F) ; \
|
||||
$(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
|
||||
$(ADD_GNU_DEBUGLINK) $(@F).debuginfo $(@F) ; \
|
||||
)
|
||||
else # PLATFORM != solaris
|
||||
(set -e ; \
|
||||
$(CD) $(@D) ; \
|
||||
$(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
|
||||
$(OBJCOPY) --add-gnu-debuglink=$(@F).debuginfo $(@F) ; \
|
||||
)
|
||||
endif # PLATFORM == solaris
|
||||
ifeq ($(STRIP_POLICY),all_strip)
|
||||
$(STRIP) $@
|
||||
else
|
||||
|
@ -69,7 +69,6 @@ FILES_c = \
|
||||
jdk_util_md.c \
|
||||
check_version.c \
|
||||
java_props_md.c \
|
||||
DriverManager.c \
|
||||
ConstantPool.c \
|
||||
MessageUtils.c \
|
||||
GC.c \
|
||||
|
@ -482,6 +482,7 @@ JAVA_JAVA_java = \
|
||||
sun/misc/JavaNioAccess.java \
|
||||
sun/misc/Perf.java \
|
||||
sun/misc/PerfCounter.java \
|
||||
sun/misc/Hashing.java \
|
||||
sun/net/www/protocol/jar/Handler.java \
|
||||
sun/net/www/protocol/jar/JarURLConnection.java \
|
||||
sun/net/www/protocol/file/Handler.java \
|
||||
|
@ -232,7 +232,6 @@ SUNWprivate_1.1 {
|
||||
Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
|
||||
Java_java_security_AccessController_getStackAccessControlContext;
|
||||
Java_java_security_AccessController_getInheritedAccessControlContext;
|
||||
Java_java_sql_DriverManager_getCallerClassLoader;
|
||||
Java_java_util_ResourceBundle_getClassContext;
|
||||
Java_java_util_TimeZone_getSystemTimeZoneID;
|
||||
Java_java_util_TimeZone_getSystemGMTOffsetID;
|
||||
|
@ -55,6 +55,9 @@ FILES_java += \
|
||||
sun/nio/ch/DevPollArrayWrapper.java \
|
||||
sun/nio/ch/DevPollSelectorImpl.java \
|
||||
sun/nio/ch/DevPollSelectorProvider.java \
|
||||
sun/nio/ch/EventPortSelectorImpl.java \
|
||||
sun/nio/ch/EventPortSelectorProvider.java \
|
||||
sun/nio/ch/EventPortWrapper.java \
|
||||
sun/nio/ch/InheritedChannel.java \
|
||||
sun/nio/ch/PollSelectorProvider.java \
|
||||
sun/nio/ch/PollSelectorImpl.java \
|
||||
|
@ -39,7 +39,6 @@ SUNWprivate_1.1 {
|
||||
Java_sun_nio_ch_EPollArrayWrapper_epollCreate;
|
||||
Java_sun_nio_ch_EPollArrayWrapper_epollCtl;
|
||||
Java_sun_nio_ch_EPollArrayWrapper_epollWait;
|
||||
Java_sun_nio_ch_EPollArrayWrapper_fdLimit;
|
||||
Java_sun_nio_ch_EPollArrayWrapper_init;
|
||||
Java_sun_nio_ch_EPollArrayWrapper_interrupt;
|
||||
Java_sun_nio_ch_EPollArrayWrapper_offsetofData;
|
||||
@ -87,6 +86,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_nio_ch_IOUtil_configureBlocking;
|
||||
Java_sun_nio_ch_IOUtil_drain;
|
||||
Java_sun_nio_ch_IOUtil_fdVal;
|
||||
Java_sun_nio_ch_IOUtil_fdLimit;
|
||||
Java_sun_nio_ch_IOUtil_initIDs;
|
||||
Java_sun_nio_ch_IOUtil_makePipe;
|
||||
Java_sun_nio_ch_IOUtil_randomBytes;
|
||||
|
@ -36,7 +36,6 @@ SUNWprivate_1.1 {
|
||||
Java_sun_nio_ch_DatagramDispatcher_readv0;
|
||||
Java_sun_nio_ch_DatagramDispatcher_write0;
|
||||
Java_sun_nio_ch_DatagramDispatcher_writev0;
|
||||
Java_sun_nio_ch_DevPollArrayWrapper_fdLimit;
|
||||
Java_sun_nio_ch_DevPollArrayWrapper_init;
|
||||
Java_sun_nio_ch_DevPollArrayWrapper_interrupt;
|
||||
Java_sun_nio_ch_DevPollArrayWrapper_poll0;
|
||||
@ -74,6 +73,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_nio_ch_InheritedChannel_soType0;
|
||||
Java_sun_nio_ch_IOUtil_configureBlocking;
|
||||
Java_sun_nio_ch_IOUtil_drain;
|
||||
Java_sun_nio_ch_IOUtil_fdLimit;
|
||||
Java_sun_nio_ch_IOUtil_fdVal;
|
||||
Java_sun_nio_ch_IOUtil_initIDs;
|
||||
Java_sun_nio_ch_IOUtil_makePipe;
|
||||
@ -112,13 +112,13 @@ SUNWprivate_1.1 {
|
||||
Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
|
||||
Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
|
||||
Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
|
||||
Java_sun_nio_ch_SolarisEventPort_init;
|
||||
Java_sun_nio_ch_SolarisEventPort_portCreate;
|
||||
Java_sun_nio_ch_SolarisEventPort_portClose;
|
||||
Java_sun_nio_ch_SolarisEventPort_portAssociate;
|
||||
Java_sun_nio_ch_SolarisEventPort_portGet;
|
||||
Java_sun_nio_ch_SolarisEventPort_portGetn;
|
||||
Java_sun_nio_ch_SolarisEventPort_portSend;
|
||||
Java_sun_nio_ch_SolarisEventPort_port_1create;
|
||||
Java_sun_nio_ch_SolarisEventPort_port_1close;
|
||||
Java_sun_nio_ch_SolarisEventPort_port_1associate;
|
||||
Java_sun_nio_ch_SolarisEventPort_port_1dissociate;
|
||||
Java_sun_nio_ch_SolarisEventPort_port_1get;
|
||||
Java_sun_nio_ch_SolarisEventPort_port_1getn;
|
||||
Java_sun_nio_ch_SolarisEventPort_port_1send;
|
||||
Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
|
||||
Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
|
||||
Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
|
||||
|
@ -89,6 +89,7 @@ jprt.make.rule.core.test.targets= \
|
||||
${jprt.my.test.target.set:TESTNAME=jdk_text}, \
|
||||
${jprt.my.test.target.set:TESTNAME=jdk_tools1}, \
|
||||
${jprt.my.test.target.set:TESTNAME=jdk_tools2}, \
|
||||
${jprt.my.test.target.set:TESTNAME=jdk_jfr}, \
|
||||
${jprt.my.test.target.set:TESTNAME=jdk_misc}
|
||||
|
||||
# All vm test targets (testset=all)
|
||||
|
@ -50,6 +50,7 @@
|
||||
<fileset dir="${classes.dir}">
|
||||
<include name="sun/tools/jconsole/**/*.class"/>
|
||||
<include name="com/sun/tools/jconsole/**/*.class"/>
|
||||
<include name="sun/tools/jconsole/resources/*.properties"/>
|
||||
<include name="sun/tools/jconsole/resources/*.gif"/>
|
||||
<include name="sun/tools/jconsole/resources/*.png"/>
|
||||
</fileset>
|
||||
|
File diff suppressed because one or more lines are too long
@ -90,6 +90,12 @@ else # PLATFORM unix
|
||||
|
||||
endif # PLATFORM
|
||||
|
||||
# Turn off aliasing with GCC for ExtensionSubtables.cpp
|
||||
ifeq ($(PLATFORM), linux)
|
||||
CXXFLAGS += $(CXXFLAGS_$(@F))
|
||||
CXXFLAGS_ExtensionSubtables.o = -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
#In the non-OpenJDK mode we need to build T2K
|
||||
ifndef OPENJDK
|
||||
t2k:
|
||||
|
@ -30,17 +30,22 @@
|
||||
MANIFEST = sun/tools/jconsole/manifest
|
||||
|
||||
PNG_FILES = \
|
||||
sun/tools/jconsole/resources/brandlogo.png \
|
||||
sun/tools/jconsole/resources/collapse-winlf.png \
|
||||
sun/tools/jconsole/resources/connected16.png \
|
||||
sun/tools/jconsole/resources/connected24.png \
|
||||
sun/tools/jconsole/resources/disconnected16.png \
|
||||
sun/tools/jconsole/resources/disconnected24.png \
|
||||
sun/tools/jconsole/resources/expand-winlf.png \
|
||||
sun/tools/jconsole/resources/masthead-left.png \
|
||||
sun/tools/jconsole/resources/masthead-right.png
|
||||
sun/tools/jconsole/resources/brandlogo.png \
|
||||
sun/tools/jconsole/resources/collapse-winlf.png \
|
||||
sun/tools/jconsole/resources/connected16.png \
|
||||
sun/tools/jconsole/resources/connected24.png \
|
||||
sun/tools/jconsole/resources/disconnected16.png \
|
||||
sun/tools/jconsole/resources/disconnected24.png \
|
||||
sun/tools/jconsole/resources/expand-winlf.png \
|
||||
sun/tools/jconsole/resources/masthead-left.png \
|
||||
sun/tools/jconsole/resources/masthead-right.png
|
||||
|
||||
GIF_FILES = \
|
||||
sun/tools/jconsole/resources/mbean.gif \
|
||||
sun/tools/jconsole/resources/mbeanserverdelegate.gif \
|
||||
sun/tools/jconsole/resources/xobject.gif
|
||||
sun/tools/jconsole/resources/mbean.gif \
|
||||
sun/tools/jconsole/resources/mbeanserverdelegate.gif \
|
||||
sun/tools/jconsole/resources/xobject.gif
|
||||
|
||||
PROP_FILES = \
|
||||
sun/tools/jconsole/resources/messages.properties \
|
||||
sun/tools/jconsole/resources/messages_ja.properties \
|
||||
sun/tools/jconsole/resources/messages_zh_CN.properties
|
||||
|
@ -53,21 +53,21 @@ AUTO_FILES_JAVA_DIRS = sun/tools/jconsole \
|
||||
|
||||
FILES_png = $(PNG_FILES:%.png=$(CLASSBINDIR)/%.png)
|
||||
FILES_gif = $(GIF_FILES:%.gif=$(CLASSBINDIR)/%.gif)
|
||||
|
||||
FILES_prop = $(PROP_FILES:%.properties=$(CLASSBINDIR)/%.properties)
|
||||
build: $(GENSRCDIR)/sun/tools/jconsole/Version.java
|
||||
|
||||
#
|
||||
# Resources
|
||||
#
|
||||
LOCALE_SET_DEFINITION = jdk
|
||||
RESOURCE_BUNDLES_JAVA = $(PKGDIR)/resources/JConsoleResources.java
|
||||
RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES = $(PKGDIR)/resources/messages.properties
|
||||
|
||||
#
|
||||
# Rules.
|
||||
#
|
||||
include $(BUILDDIR)/common/Classes.gmk
|
||||
|
||||
build: $(FILES_png) $(FILES_gif) $(TEMPDIR)/manifest $(JARFILE)
|
||||
build: $(FILES_png) $(FILES_gif) $(FILES_prop) $(TEMPDIR)/manifest $(JARFILE)
|
||||
|
||||
$(GENSRCDIR)/sun/tools/jconsole/Version.java: \
|
||||
$(SHARE_SRC)/classes/sun/tools/jconsole/Version.java.template
|
||||
@ -85,7 +85,7 @@ $(TEMPDIR)/manifest: $(SHARE_SRC)/classes/$(PKGDIR)/manifest
|
||||
# Extra rule to build jconsole.jar
|
||||
#
|
||||
|
||||
$(JARFILE): $(LIBDIR) $(FILES_class) $(FILES_png) $(FILES_gif) $(TEMPDIR)/manifest
|
||||
$(JARFILE): $(LIBDIR) $(FILES_class) $(FILES_png) $(FILES_gif) $(FILES_prop) $(TEMPDIR)/manifest
|
||||
$(BOOT_JAR_CMD) -cfm $(JARFILE) $(TEMPDIR)/manifest \
|
||||
-C $(CLASSBINDIR) sun/tools/jconsole \
|
||||
-C $(CLASSBINDIR) com/sun/tools/jconsole \
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1998, 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
|
||||
@ -58,6 +58,11 @@ ifndef DISABLE_NIMBUS
|
||||
SUBDIRS += generate_nimbus
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
# temporary tools to work around gobjcopy bugs
|
||||
SUBDIRS += add_gnu_debuglink fix_empty_sec_hdr_flags
|
||||
endif
|
||||
|
||||
include $(BUILDDIR)/common/Subdirs.gmk
|
||||
|
||||
all build clean clobber::
|
||||
|
32
jdk/makefiles/com/oracle/security/ucrypto/FILES_c.gmk → jdk/make/tools/add_gnu_debuglink/Makefile
32
jdk/makefiles/com/oracle/security/ucrypto/FILES_c.gmk → jdk/make/tools/add_gnu_debuglink/Makefile
@ -4,9 +4,7 @@
|
||||
#
|
||||
# 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.
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
@ -21,10 +19,28 @@
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
|
||||
ifndef OPENJDK
|
||||
FILES_c = \
|
||||
nativeFunc.c \
|
||||
nativeCrypto.c
|
||||
endif
|
||||
# Rules to build add_gnu_debuglink, used by various Makefiles on Solaris
|
||||
|
||||
BUILDDIR = ../..
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
# Default name
|
||||
PROGRAM = add_gnu_debuglink
|
||||
ADD_GNU_DEBUGLINK_PROG = $(ABS_BUILDTOOLBINDIR)/$(PROGRAM)
|
||||
|
||||
ADD_GNU_DEBUGLINK_SRC = add_gnu_debuglink.c
|
||||
ADD_GNU_DEBUGLINK_FLAGS =
|
||||
LIBS_ADD_GNU_DEBUGLINK += -lelf
|
||||
|
||||
all: $(ADD_GNU_DEBUGLINK)
|
||||
|
||||
$(ADD_GNU_DEBUGLINK_PROG): $(ADD_GNU_DEBUGLINK_SRC)
|
||||
$(MKDIR) -p $(BUILDTOOLBINDIR)
|
||||
$(CC) -g -o $@ $< $(ADD_GNU_DEBUGLINK_FLAGS) $(LIBS_ADD_GNU_DEBUGLINK)
|
||||
|
||||
clean::
|
||||
$(RM) $(ADD_GNU_DEBUGLINK_PROG)
|
||||
|
285
jdk/make/tools/add_gnu_debuglink/add_gnu_debuglink.c
Normal file
285
jdk/make/tools/add_gnu_debuglink/add_gnu_debuglink.c
Normal file
@ -0,0 +1,285 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Name: add_gnu_debuglink.c
|
||||
*
|
||||
* Description: Add a ".gnu_debuglink" section that refers to the specified
|
||||
* debug_info_path to the specified ELF object.
|
||||
*
|
||||
* This program is adapted from the example program shown on the
|
||||
* elf(3elf) man page and from code from the Solaris compiler
|
||||
* driver.
|
||||
*/
|
||||
|
||||
/*
|
||||
* needed to define SHF_EXCLUDE
|
||||
*/
|
||||
#define ELF_TARGET_ALL
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <libelf.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void failure(void);
|
||||
static unsigned int gnu_debuglink_crc32(unsigned int crc, unsigned char *buf,
|
||||
size_t len);
|
||||
|
||||
void
|
||||
main(int argc, char ** argv) {
|
||||
/* new ELF section name */
|
||||
static char SEC_NAME[] = ".gnu_debuglink";
|
||||
|
||||
unsigned char buffer[8 * 1024]; /* I/O buffer */
|
||||
int buffer_len; /* buffer length */
|
||||
char * debug_info_path; /* debug info path */
|
||||
void * ehdr; /* ELF header */
|
||||
Elf * elf; /* ELF descriptor */
|
||||
char * elf_ident; /* ELF identity string */
|
||||
char * elf_obj; /* elf_obj file */
|
||||
int fd; /* descriptor for files */
|
||||
unsigned int file_crc = 0; /* CRC for debug info file */
|
||||
int is_elfclass64; /* is an ELFCLASS64 file? */
|
||||
Elf_Data * link_dat; /* ELF data for new debug info link */
|
||||
Elf_Data * name_dat; /* ELF data for new section name */
|
||||
Elf_Scn * new_scn; /* new ELF section descriptor */
|
||||
void * new_shdr; /* new ELF section header */
|
||||
Elf_Scn * scn; /* ELF section descriptor */
|
||||
void * shdr; /* ELF section header */
|
||||
|
||||
if (argc != 3) {
|
||||
(void) fprintf(stderr, "Usage: %s debug_info_path elf_obj\n", argv[0]);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
debug_info_path = argv[1]; /* save for later */
|
||||
if ((fd = open(debug_info_path, O_RDONLY)) == -1) {
|
||||
(void) fprintf(stderr, "%s: cannot open file.\n", debug_info_path);
|
||||
exit(3);
|
||||
}
|
||||
|
||||
(void) printf("Computing CRC for '%s'\n", debug_info_path);
|
||||
(void) fflush(stdout);
|
||||
/* compute CRC for the debug info file */
|
||||
for (;;) {
|
||||
int len = read(fd, buffer, sizeof buffer);
|
||||
if (len <= 0) {
|
||||
break;
|
||||
}
|
||||
file_crc = gnu_debuglink_crc32(file_crc, buffer, len);
|
||||
}
|
||||
(void) close(fd);
|
||||
|
||||
/* open the elf_obj */
|
||||
elf_obj = argv[2];
|
||||
if ((fd = open(elf_obj, O_RDWR)) == -1) {
|
||||
(void) fprintf(stderr, "%s: cannot open file.\n", elf_obj);
|
||||
exit(4);
|
||||
}
|
||||
|
||||
(void) printf("Opening '%s' for update\n", elf_obj);
|
||||
(void) fflush(stdout);
|
||||
(void) elf_version(EV_CURRENT); /* coordinate ELF versions */
|
||||
|
||||
/* obtain the ELF descriptors from the input file */
|
||||
if ((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL) {
|
||||
failure();
|
||||
}
|
||||
|
||||
/* determine if ELFCLASS64 or not? */
|
||||
elf_ident = elf_getident(elf, NULL);
|
||||
is_elfclass64 = (elf_ident[EI_CLASS] == ELFCLASS64);
|
||||
|
||||
/* get the ELF header */
|
||||
if (is_elfclass64) {
|
||||
ehdr = elf64_getehdr(elf);
|
||||
} else {
|
||||
ehdr = elf32_getehdr(elf);
|
||||
}
|
||||
if (ehdr == NULL) {
|
||||
failure();
|
||||
}
|
||||
|
||||
/* get the ELF section descriptor */
|
||||
if (is_elfclass64) {
|
||||
scn = elf_getscn(elf, ((Elf64_Ehdr *) ehdr)->e_shstrndx);
|
||||
} else {
|
||||
scn = elf_getscn(elf, ((Elf32_Ehdr *) ehdr)->e_shstrndx);
|
||||
}
|
||||
if (scn == NULL) {
|
||||
failure();
|
||||
}
|
||||
|
||||
/* get the section header */
|
||||
if (is_elfclass64) {
|
||||
shdr = elf64_getshdr(scn);
|
||||
} else {
|
||||
shdr = elf32_getshdr(scn);
|
||||
}
|
||||
if (shdr == NULL) {
|
||||
failure();
|
||||
}
|
||||
|
||||
(void) printf("Adding ELF data for new section name\n");
|
||||
(void) fflush(stdout);
|
||||
name_dat = elf_newdata(scn);
|
||||
name_dat->d_buf = (void *) SEC_NAME;
|
||||
if (is_elfclass64) {
|
||||
name_dat->d_off = ((Elf64_Shdr *) shdr)->sh_size + 1;
|
||||
} else {
|
||||
name_dat->d_off = ((Elf32_Shdr *) shdr)->sh_size + 1;
|
||||
}
|
||||
name_dat->d_align = 1;
|
||||
name_dat->d_size = strlen(SEC_NAME) + 1;
|
||||
|
||||
new_scn = elf_newscn(elf);
|
||||
|
||||
if (is_elfclass64) {
|
||||
new_shdr = elf64_getshdr(new_scn);
|
||||
((Elf64_Shdr *) new_shdr)->sh_flags = SHF_EXCLUDE;
|
||||
((Elf64_Shdr *) new_shdr)->sh_type = SHT_PROGBITS;
|
||||
((Elf64_Shdr *) new_shdr)->sh_name = ((Elf64_Shdr *) shdr)->sh_size;
|
||||
((Elf64_Shdr *) new_shdr)->sh_addralign = 1;
|
||||
((Elf64_Shdr *) shdr)->sh_size += (strlen(SEC_NAME) + 1);
|
||||
} else {
|
||||
new_shdr = elf32_getshdr(new_scn);
|
||||
((Elf32_Shdr *) new_shdr)->sh_flags = SHF_EXCLUDE;
|
||||
((Elf32_Shdr *) new_shdr)->sh_type = SHT_PROGBITS;
|
||||
((Elf32_Shdr *) new_shdr)->sh_name = ((Elf32_Shdr *) shdr)->sh_size;
|
||||
((Elf32_Shdr *) new_shdr)->sh_addralign = 1;
|
||||
((Elf32_Shdr *) shdr)->sh_size += (strlen(SEC_NAME) + 1);
|
||||
}
|
||||
|
||||
(void) printf("Adding ELF data for debug_info_path value\n");
|
||||
(void) fflush(stdout);
|
||||
(void) memset(buffer, 0, sizeof buffer);
|
||||
buffer_len = strlen(debug_info_path) + 1; /* +1 for NUL */
|
||||
(void) strncpy((char *) buffer, debug_info_path, buffer_len);
|
||||
if (buffer_len % 4 != 0) {
|
||||
/* not on a 4 byte boundary so pad to the next one */
|
||||
buffer_len += (4 - buffer_len % 4);
|
||||
}
|
||||
/* save the CRC */
|
||||
(void) memcpy(&buffer[buffer_len], &file_crc, sizeof file_crc);
|
||||
buffer_len += sizeof file_crc;
|
||||
|
||||
link_dat = elf_newdata(new_scn);
|
||||
link_dat->d_type = ELF_T_BYTE;
|
||||
link_dat->d_size = buffer_len;
|
||||
link_dat->d_buf = buffer;
|
||||
link_dat->d_align = 1;
|
||||
|
||||
(void) printf("Saving updates to '%s'\n", elf_obj);
|
||||
(void) fflush(stdout);
|
||||
(void) elf_update(elf, ELF_C_NULL); /* recalc ELF memory structures */
|
||||
(void) elf_update(elf, ELF_C_WRITE); /* write out changes to ELF obj */
|
||||
(void) elf_end(elf); /* done with ELF obj */
|
||||
(void) close(fd);
|
||||
|
||||
(void) printf("Done updating '%s'\n", elf_obj);
|
||||
(void) fflush(stdout);
|
||||
exit(0);
|
||||
} /* end main */
|
||||
|
||||
|
||||
static void
|
||||
failure() {
|
||||
(void) fprintf(stderr, "%s\n", elf_errmsg(elf_errno()));
|
||||
exit(5);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The CRC used in gnu_debuglink, retrieved from
|
||||
* http://sourceware.org/gdb/current/onlinedocs/gdb/Separate-Debug-Files.html#Separate-Debug-Files.
|
||||
*/
|
||||
|
||||
static unsigned int
|
||||
gnu_debuglink_crc32(unsigned int crc, unsigned char *buf, size_t len) {
|
||||
static const unsigned int crc32_table[256] = {
|
||||
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
|
||||
0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
|
||||
0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
|
||||
0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
|
||||
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
|
||||
0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
|
||||
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
|
||||
0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
|
||||
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
|
||||
0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
|
||||
0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
|
||||
0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
|
||||
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
|
||||
0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
|
||||
0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
|
||||
0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
|
||||
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
|
||||
0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
|
||||
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
|
||||
0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
|
||||
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
|
||||
0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
|
||||
0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
|
||||
0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
|
||||
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
|
||||
0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
|
||||
0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
|
||||
0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
|
||||
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
|
||||
0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
|
||||
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
|
||||
0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
|
||||
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
|
||||
0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
|
||||
0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
|
||||
0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
|
||||
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
|
||||
0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
|
||||
0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
|
||||
0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
|
||||
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
|
||||
0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
|
||||
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
|
||||
0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
|
||||
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
|
||||
0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
|
||||
0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
|
||||
0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
|
||||
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
|
||||
0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
|
||||
0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
|
||||
0x2d02ef8d
|
||||
};
|
||||
|
||||
unsigned char *end;
|
||||
|
||||
crc = ~crc & 0xffffffff;
|
||||
for (end = buf + len; buf < end; ++buf) {
|
||||
crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
|
||||
}
|
||||
return ~crc & 0xffffffff;
|
||||
}
|
@ -4,9 +4,7 @@
|
||||
#
|
||||
# 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.
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
@ -21,34 +19,28 @@
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
|
||||
# Rules to build fix_empty_sec_hdr_flags, used by various Makefiles on Solaris
|
||||
|
||||
BUILDDIR = ../..
|
||||
PRODUCT = oracle
|
||||
#SUBDIRS_MAKEFLAGS += JAVAC_MAX_WARNINGS=true
|
||||
#SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true
|
||||
#SUBDIRS_MAKEFLAGS += JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation,-path
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
# build com/oracle/security/ucrypto on Solaris platform for non-OpenJDK builds
|
||||
UCRYPTO =
|
||||
ifndef OPENJDK
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
UCRYPTO = security/ucrypto
|
||||
endif
|
||||
endif
|
||||
# Default name
|
||||
PROGRAM = fix_empty_sec_hdr_flags
|
||||
FIX_EMPTY_SEC_HDR_FLAGS_PROG = $(ABS_BUILDTOOLBINDIR)/$(PROGRAM)
|
||||
|
||||
JFR =
|
||||
ifndef OPENJDK
|
||||
ifndef JAVASE_EMBEDDED
|
||||
JFR = jfr
|
||||
endif
|
||||
endif
|
||||
FIX_EMPTY_SEC_HDR_FLAGS_SRC = fix_empty_sec_hdr_flags.c
|
||||
FIX_EMPTY_SEC_HDR_FLAGS_FLAGS =
|
||||
LIBS_FIX_EMPTY_SEC_HDR_FLAGS += -lelf
|
||||
|
||||
SUBDIRS = $(JFR) $(UCRYPTO)
|
||||
all: $(FIX_EMPTY_SEC_HDR_FLAGS)
|
||||
|
||||
include $(BUILDDIR)/common/Subdirs.gmk
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS_PROG): $(FIX_EMPTY_SEC_HDR_FLAGS_SRC)
|
||||
$(MKDIR) -p $(BUILDTOOLBINDIR)
|
||||
$(CC) -g -o $@ $< $(FIX_EMPTY_SEC_HDR_FLAGS_FLAGS) $(LIBS_FIX_EMPTY_SEC_HDR_FLAGS)
|
||||
|
||||
all build clean clobber::
|
||||
$(SUBDIRS-loop)
|
||||
clean::
|
||||
$(RM) $(FIX_EMPTY_SEC_HDR_FLAGS_PROG)
|
||||
|
181
jdk/make/tools/fix_empty_sec_hdr_flags/fix_empty_sec_hdr_flags.c
Normal file
181
jdk/make/tools/fix_empty_sec_hdr_flags/fix_empty_sec_hdr_flags.c
Normal file
@ -0,0 +1,181 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Name: fix_empty_sec_hdr_flags.c
|
||||
*
|
||||
* Description: Remove the SHF_ALLOC flag from "empty" section headers.
|
||||
* An "empty" section header has sh_addr == 0 and sh_size == 0.
|
||||
*
|
||||
* This program is adapted from the example program shown on the
|
||||
* elf(3elf) man page and from code from the Solaris compiler
|
||||
* driver.
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <libelf.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void failure(void);
|
||||
|
||||
void
|
||||
main(int argc, char ** argv) {
|
||||
void * ehdr; /* ELF header */
|
||||
unsigned int i; /* section counter */
|
||||
int fd; /* descriptor for file */
|
||||
Elf * elf; /* ELF descriptor */
|
||||
char * elf_ident; /* ELF identity string */
|
||||
char * elf_obj; /* elf_obj file */
|
||||
int fix_count; /* number of flags fixed */
|
||||
int is_elfclass64; /* is an ELFCLASS64 file? */
|
||||
Elf_Scn * scn; /* ELF section descriptor */
|
||||
void * shdr; /* ELF section header */
|
||||
Elf_Data * shstrtab; /* ELF section header string table */
|
||||
|
||||
if (argc != 2) {
|
||||
(void) fprintf(stderr, "Usage: %s elf_obj\n", argv[0]);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
/* open the elf_obj */
|
||||
elf_obj = argv[1];
|
||||
if ((fd = open(elf_obj, O_RDWR)) == -1) {
|
||||
(void) fprintf(stderr, "%s: cannot open file.\n", elf_obj);
|
||||
exit(3);
|
||||
}
|
||||
|
||||
(void) printf("Opening '%s' for update\n", elf_obj);
|
||||
(void) fflush(stdout);
|
||||
(void) elf_version(EV_CURRENT); /* coordinate ELF versions */
|
||||
|
||||
/* obtain the ELF descriptors from the input file */
|
||||
if ((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL) {
|
||||
failure();
|
||||
}
|
||||
|
||||
/* determine if ELFCLASS64 or not? */
|
||||
elf_ident = elf_getident(elf, NULL);
|
||||
is_elfclass64 = (elf_ident[EI_CLASS] == ELFCLASS64);
|
||||
|
||||
/* get the ELF header */
|
||||
if (is_elfclass64) {
|
||||
ehdr = elf64_getehdr(elf);
|
||||
} else {
|
||||
ehdr = elf32_getehdr(elf);
|
||||
}
|
||||
if (ehdr == NULL) {
|
||||
failure();
|
||||
}
|
||||
|
||||
/* get the ELF section descriptor */
|
||||
if (is_elfclass64) {
|
||||
scn = elf_getscn(elf, ((Elf64_Ehdr *) ehdr)->e_shstrndx);
|
||||
} else {
|
||||
scn = elf_getscn(elf, ((Elf32_Ehdr *) ehdr)->e_shstrndx);
|
||||
}
|
||||
if (scn == NULL) {
|
||||
failure();
|
||||
}
|
||||
|
||||
/* get the section header string table */
|
||||
shstrtab = elf_getdata(scn, NULL);
|
||||
if (shstrtab == NULL) {
|
||||
failure();
|
||||
}
|
||||
|
||||
fix_count = 0;
|
||||
|
||||
/* traverse the sections of the input file */
|
||||
for (i = 1, scn = NULL; scn = elf_nextscn(elf, scn); i++) {
|
||||
int has_flag_set; /* is SHF_ALLOC flag set? */
|
||||
int is_empty; /* is section empty? */
|
||||
char * name; /* short hand pointer */
|
||||
|
||||
/* get the section header */
|
||||
if (is_elfclass64) {
|
||||
shdr = elf64_getshdr(scn);
|
||||
} else {
|
||||
shdr = elf32_getshdr(scn);
|
||||
}
|
||||
if (shdr == NULL) {
|
||||
failure();
|
||||
}
|
||||
|
||||
if (is_elfclass64) {
|
||||
name = (char *)shstrtab->d_buf + ((Elf64_Shdr *) shdr)->sh_name;
|
||||
} else {
|
||||
name = (char *)shstrtab->d_buf + ((Elf32_Shdr *) shdr)->sh_name;
|
||||
}
|
||||
|
||||
if (is_elfclass64) {
|
||||
has_flag_set = ((Elf64_Shdr *) shdr)->sh_flags & SHF_ALLOC;
|
||||
is_empty = ((Elf64_Shdr *) shdr)->sh_addr == 0 &&
|
||||
((Elf64_Shdr *) shdr)->sh_size == 0;
|
||||
} else {
|
||||
has_flag_set = ((Elf32_Shdr *) shdr)->sh_flags & SHF_ALLOC;
|
||||
is_empty = ((Elf32_Shdr *) shdr)->sh_addr == 0 &&
|
||||
((Elf32_Shdr *) shdr)->sh_size == 0;
|
||||
}
|
||||
|
||||
if (is_empty && has_flag_set) {
|
||||
(void) printf("section[%u] '%s' is empty, "
|
||||
"but SHF_ALLOC flag is set.\n", i, name);
|
||||
(void) printf("Clearing the SHF_ALLOC flag.\n");
|
||||
|
||||
if (is_elfclass64) {
|
||||
((Elf64_Shdr *) shdr)->sh_flags &= ~SHF_ALLOC;
|
||||
} else {
|
||||
((Elf32_Shdr *) shdr)->sh_flags &= ~SHF_ALLOC;
|
||||
}
|
||||
fix_count++;
|
||||
}
|
||||
} /* end for each ELF section */
|
||||
|
||||
if (fix_count > 0) {
|
||||
(void) printf("Saving %d updates to '%s'\n", fix_count, elf_obj);
|
||||
(void) fflush(stdout);
|
||||
(void) elf_update(elf, ELF_C_NULL); /* recalc ELF memory structures */
|
||||
(void) elf_update(elf, ELF_C_WRITE); /* write out changes to ELF obj */
|
||||
} else {
|
||||
(void) printf("No SHF_ALLOC flags needed to be cleared.\n");
|
||||
}
|
||||
|
||||
(void) elf_end(elf); /* done with ELF obj */
|
||||
(void) close(fd);
|
||||
|
||||
(void) printf("Done %s '%s'\n",
|
||||
(fix_count > 0) ? "updating" : "with", elf_obj);
|
||||
(void) fflush(stdout);
|
||||
exit(0);
|
||||
} /* end main */
|
||||
|
||||
|
||||
static void
|
||||
failure() {
|
||||
(void) fprintf(stderr, "%s\n", elf_errmsg(elf_errno()));
|
||||
exit(6);
|
||||
}
|
@ -134,9 +134,9 @@ define SetupDemo
|
||||
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/,$7)))
|
||||
ifneq ($7,)
|
||||
$(JDK_OUTPUTDIR)/newdemo/$2/$1/% : $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%
|
||||
mkdir -p $$(@D)
|
||||
cp $$< $$@
|
||||
chmod -f ug+w $$@
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(CP) $$< $$@
|
||||
$(CHMOD) -f ug+w $$@
|
||||
|
||||
BUILD_DEMOS += $$($1_COPY_TARGETS)
|
||||
endif
|
||||
@ -155,7 +155,7 @@ $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/_the.services : \
|
||||
cd META-INF/services && \
|
||||
$(JAR) uf $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
|
||||
$(RM) -r $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/_the.tmp
|
||||
touch $@
|
||||
$(TOUCH) $@
|
||||
|
||||
BUILD_DEMOS+=$(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/_the.services
|
||||
|
||||
@ -167,12 +167,12 @@ $(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*))
|
||||
$(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html))
|
||||
$(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*))
|
||||
$(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*))
|
||||
$(eval $(call SetupDemo,jconsole-plugin,scripting,-cp $(JDK_OUTPUTDIR)/lib/jconsole.jar,,,,*.xml *.txt))
|
||||
$(eval $(call SetupDemo,jconsole-plugin,scripting,-cp $(JDK_OUTPUTDIR)/lib/jconsole.jar,,,,*.xml *.txt,,,,Main-Class: \n))
|
||||
$(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*))
|
||||
$(eval $(call SetupDemo,JTop,management,-cp $(JDK_OUTPUTDIR)/lib/jconsole.jar,JTop,,,README*))
|
||||
$(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*))
|
||||
$(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*))
|
||||
$(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java))
|
||||
$(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java,,,,Main-Class: \n))
|
||||
|
||||
ifndef OPENJDK
|
||||
$(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*))
|
||||
@ -188,9 +188,9 @@ ifndef OPENJDK
|
||||
$(JDK_OUTPUTDIR)/newdemo/nbproject/%,\
|
||||
$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/demo/nbproject/ -type f))
|
||||
$(JDK_OUTPUTDIR)/newdemo/nbproject/% : $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
|
||||
mkdir -p $(@D)
|
||||
cp $< $@
|
||||
chmod -f ug+w $@
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
$(CHMOD) -f ug+w $@
|
||||
endif
|
||||
|
||||
##################################################################################################
|
||||
@ -231,6 +231,7 @@ define SetupJVMTIDemo
|
||||
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
|
||||
LANG:=$$(BUILD_DEMO_JVMTI_$1_LANG),\
|
||||
CFLAGS:=$(CFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3,\
|
||||
CXXFLAGS:=$(CXXFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3,\
|
||||
LDFLAGS:=$(LDFLAGS_JDKLIB),\
|
||||
LDFLAGS_SUFFIX:=$$($1_EXTRA_CXX),\
|
||||
LDFLAGS_SUFFIX_posix:=$5,\
|
||||
@ -255,7 +256,7 @@ define SetupJVMTIDemo
|
||||
BIN:=$(JDK_OUTPUTDIR)/newdemoclasses/jvmti/$1,\
|
||||
COPY:=$(PATTERNS_TO_COPY),\
|
||||
JAR:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/$1.jar,\
|
||||
JARMAIN:=,\
|
||||
EXTRA_MANIFEST_ATTR:=Main-Class: \n,\
|
||||
MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf))
|
||||
|
||||
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jvmti/$1/$1.jar
|
||||
@ -290,11 +291,11 @@ JPDA_SOURCES:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes/com/sun/tools/exam
|
||||
JPDA_FILES:=$(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES))
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/jpda/src.zip : $(JPDA_SOURCES)
|
||||
mkdir -p $(@D)
|
||||
$(MKDIR) -p $(@D)
|
||||
(cd $(JDK_TOPDIR)/src/share/classes && $(ZIP) -qru $@ com -i "com/sun/tools/example/*")
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/jpda/examples.jar : $(JPDA_SOURCES)
|
||||
mkdir -p $(@D)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $(@D)/_the.sources
|
||||
$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources)
|
||||
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
|
||||
@ -304,7 +305,7 @@ $(JDK_OUTPUTDIR)/newdemo/jpda/examples.jar : $(JPDA_SOURCES)
|
||||
(cd $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example && $(JAR) uf $@ README)
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/jpda/com/sun/tools/example/README : $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README
|
||||
mkdir -p $(@D)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
||||
@ -314,12 +315,12 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jpda/src.zip $(JDK_OUTPUTDIR)/newdemo/jp
|
||||
##################################################################################################
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/management/index.html : $(JDK_TOPDIR)/src/share/demo/management/index.html
|
||||
mkdir -p $(@D)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/jvmti/index.html : $(JDK_TOPDIR)/src/share/demo/jvmti/index.html
|
||||
mkdir -p $(@D)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
||||
@ -329,24 +330,102 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/management/index.html \
|
||||
##################################################################################################
|
||||
|
||||
# The netbeans project files are copied into the demo directory.
|
||||
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%,\
|
||||
$(JDK_OUTPUTDIR)/newdemo/nbproject/%,\
|
||||
$(shell $(FIND) $(JDK_TOPDIR)/src/share/demo/nbproject/ -type f))
|
||||
|
||||
NETBEANS_DEMO_PROJECTS_FILES=$(shell $(FIND) $(JDK_TOPDIR)/src/share/demo/nbproject -type f)
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/_the.nbproject: $(NETBEANS_DEMO_PROJECTS_FILES)
|
||||
$(MKDIR) -p $(JDK_OUTPUTDIR)/newdemo
|
||||
$(RM) -rf $(JDK_OUTPUTDIR)/newdemo/nbproject
|
||||
echo Copying Netbeans demo projects
|
||||
(cd $(JDK_TOPDIR)/src/share/demo && cp -r nbproject $(JDK_OUTPUTDIR)/newdemo)
|
||||
touch $@
|
||||
$(JDK_OUTPUTDIR)/newdemo/nbproject/% : $(JDK_TOPDIR)/src/share/demo/nbproject/%
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
||||
##################################################################################################
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/README : $(JDK_TOPDIR)/src/share/demo/README
|
||||
mkdir -p $(@D)
|
||||
cp $< $@
|
||||
$(JDK_OUTPUTDIR)/newdemo/README: $(JDK_TOPDIR)/src/share/demo/README
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/README
|
||||
|
||||
##################################################################################################
|
||||
|
||||
all: $(BUILD_DEMOS) $(JDK_OUTPUTDIR)/newdemo/_the.nbproject $(JDK_OUTPUTDIR)/newdemo/README
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller/% : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/%
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/jni/Poller/README.txt : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/README.txt
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/jni/Poller/Poller.jar : \
|
||||
$(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller/Poller.c
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR,\
|
||||
SETUP:=GENERATE_USINGJDKBYTECODE, \
|
||||
SRC:=$(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
|
||||
BIN:=$(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller, \
|
||||
HEADERS:=$(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller, \
|
||||
JAR:=$(JDK_OUTPUTDIR)/newdemo/jni/Poller/Poller.jar, \
|
||||
MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf, \
|
||||
SRCZIP:=$(JDK_OUTPUTDIR)/newdemo/jni/Poller/src.zip, \
|
||||
COPY := README.txt Poller.c, \
|
||||
JARMAIN := Client))
|
||||
|
||||
|
||||
|
||||
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/newdemo/jni/Poller/src.zip \
|
||||
$(JDK_OUTPUTDIR)/newdemo/jni/Poller/README.txt
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER,\
|
||||
SRC:=$(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
|
||||
LANG := C, \
|
||||
CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
|
||||
-I$(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller, \
|
||||
LDFLAGS:=$(LDFLAGS_JDKLIB), \
|
||||
BIN:=$(JDK_OUTPUTDIR)/newdemoobjs/jni/Poller,\
|
||||
LIB:=$(JDK_OUTPUTDIR)/newdemoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)))
|
||||
|
||||
#
|
||||
# We can only compile native code after jar has been build (since we depend on generated .h files)
|
||||
#
|
||||
$(JDK_OUTPUTDIR)/newdemoobjs/jni/Poller/Poller.o : $(JDK_OUTPUTDIR)/newdemo/jni/Poller/Poller.jar
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) : \
|
||||
$(JDK_OUTPUTDIR)/newdemoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
|
||||
|
||||
endif
|
||||
|
||||
##################################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
DB_DEMO_ZIPFILE := $(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/db -name "*demo*.zip")
|
||||
|
||||
$(JDK_OUTPUTDIR)/newdemo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -rf $(JDK_OUTPUTDIR)/newdemo/db $(JDK_OUTPUTDIR)/newdemo/demo
|
||||
$(CD) $(JDK_OUTPUTDIR)/newdemo && $(UNZIP) -o $<
|
||||
$(MV) $(JDK_OUTPUTDIR)/newdemo/demo $(JDK_OUTPUTDIR)/newdemo/db
|
||||
$(TOUCH) $@
|
||||
|
||||
# Copy this after the unzip above to avoid race with directory creation and mv command.
|
||||
$(JDK_OUTPUTDIR)/newdemo/db/README-JDK-DEMOS.html: \
|
||||
$(JDK_TOPDIR)/src/closed/share/db/README-JDK-DEMOS.html \
|
||||
| $(JDK_OUTPUTDIR)/newdemo/_the.db.unzipped
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) '$<' '$@'
|
||||
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/_the.db.unzipped $(JDK_OUTPUTDIR)/newdemo/db/README-JDK-DEMOS.html
|
||||
endif
|
||||
|
||||
##################################################################################################
|
||||
|
||||
all: $(BUILD_DEMOS)
|
||||
|
||||
.PHONY: all
|
||||
|
@ -32,36 +32,44 @@ include JavaCompilation.gmk
|
||||
# Setup the java compilers for the JDK build.
|
||||
include Setup.gmk
|
||||
|
||||
EXCLUDES:= sun/dc \
|
||||
sun/security/pkcs11 \
|
||||
com/sun/pept \
|
||||
JARS :=
|
||||
EXFILES :=
|
||||
EXCLUDES :=
|
||||
|
||||
##########################################################################################
|
||||
|
||||
EXCLUDES += com/sun/pept \
|
||||
com/sun/tools/example/trace\
|
||||
com/sun/tools/example/debug/bdi\
|
||||
com/sun/tools/example/debug/event\
|
||||
com/sun/tools/example/debug/gui \
|
||||
javax/crypto \
|
||||
com/oracle/security
|
||||
|
||||
ifeq ($(PLATFORM)-$(ARCH_DATA_MODEL),windows-64)
|
||||
EXCLUDES += sun/security/pkcs11
|
||||
endif
|
||||
|
||||
ifdef OPENJDK
|
||||
EXCLUDES+= com/sun/jmx/snmp \
|
||||
EXCLUDES+= sun/dc \
|
||||
com/sun/jmx/snmp \
|
||||
sun/management/snmp \
|
||||
com/sun/script
|
||||
endif
|
||||
|
||||
ifndef OPENJDK
|
||||
# There exists two versions of this file...
|
||||
EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
|
||||
endif
|
||||
|
||||
ifneq ($(PLATFORM),solaris)
|
||||
# Exclude Solaris nio and two security related files in src/share/classes
|
||||
EXFILES:=SolarisAclFileAttributeView.java \
|
||||
EXFILES += SolarisAclFileAttributeView.java \
|
||||
SolarisFileStore.java \
|
||||
SolarisFileSystem.java \
|
||||
SolarisFileSystemProvider.java \
|
||||
SolarisNativeDispatcher.java \
|
||||
SolarisUserDefinedFileAttributeView.java \
|
||||
SolarisWatchService.java \
|
||||
DevPollArrayWrapper.java \
|
||||
DevPollSelectorImpl.java \
|
||||
DevPollSelectorProvider.java \
|
||||
SolarisAsynchronousChannelProvider.java \
|
||||
SolarisEventPort.java \
|
||||
SolarisAclFileAttributeView.java \
|
||||
SolarisFileStore.java \
|
||||
SolarisFileSystem.java \
|
||||
@ -75,8 +83,11 @@ ifneq ($(PLATFORM),solaris)
|
||||
sun/tools/attach/SolarisVirtualMachine.java
|
||||
endif
|
||||
|
||||
# Why?
|
||||
EXFILES+=WrapperGenerator.java
|
||||
# In the old build, this isn't excluded on macosx, even though it probably
|
||||
# should be.
|
||||
ifneq ($(PLATFORM),macosx)
|
||||
EXFILES+=WrapperGenerator.java
|
||||
endif
|
||||
|
||||
ifneq ($(PLATFORM),windows)
|
||||
# Exclude Window security related files in src/share/classes
|
||||
@ -86,14 +97,20 @@ ifneq ($(PLATFORM),windows)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),windows)
|
||||
# Does nio channels exist on Windows?
|
||||
EXCLUDES+=sun/nio/ch
|
||||
# Don't build GTK L&F on Windows
|
||||
EXCLUDES+= com/sun/java/swing/plaf/gtk
|
||||
endif
|
||||
|
||||
ifneq ($(PLATFORM),linux)
|
||||
EXCLUDES+=com/sun/java/swing/plaf/gtk
|
||||
EXFILES+=sun/tools/attach/LinuxAttachProvider.java \
|
||||
sun/tools/attach/LinuxVirtualMachine.java
|
||||
sun/tools/attach/LinuxVirtualMachine.java \
|
||||
sun/nio/fs/LinuxDosFileAttributeView.java \
|
||||
sun/nio/fs/LinuxFileStore.java \
|
||||
sun/nio/fs/LinuxFileSystem.java \
|
||||
sun/nio/fs/LinuxFileSystemProvider.java \
|
||||
sun/nio/fs/LinuxNativeDispatcher.java \
|
||||
sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
|
||||
sun/nio/fs/LinuxWatchService.java
|
||||
endif
|
||||
|
||||
ifneq ($(PLATFORM),macosx)
|
||||
@ -105,19 +122,6 @@ ifneq ($(PLATFORM),macosx)
|
||||
sun/tools/attach/BsdVirtualMachine.java
|
||||
endif
|
||||
|
||||
# Generated nimbus files that apparently should not be compiled...
|
||||
EXFILES+=InternalFrameTitlePanePainter.java \
|
||||
OptionPaneMessageAreaPainter.java \
|
||||
ScrollBarPainter.java \
|
||||
SliderPainter.java \
|
||||
SpinnerPainter.java \
|
||||
SplitPanePainter.java \
|
||||
TabbedPanePainter.java
|
||||
|
||||
# New class /java/lang/annotation/ContainerAnnotation.java is not included in old
|
||||
# build
|
||||
EXFILES+=java/lang/annotation/ContainerAnnotation.java
|
||||
|
||||
# Exclude BreakIterator classes that are just used in compile process to generate
|
||||
# data files and shouldn't go in the product
|
||||
EXFILES+=sun/text/resources/BreakIteratorRules.java \
|
||||
@ -130,16 +134,17 @@ endif
|
||||
|
||||
ifdef OPENJDK
|
||||
EXCLUDES+=sun/java2d/cmm/kcms
|
||||
else
|
||||
EXCLUDES+=sun/java2d/cmm/lcms
|
||||
endif
|
||||
|
||||
# Not used on windows
|
||||
ifneq ($(PLATFORM), windows)
|
||||
# Used on windows and macosx
|
||||
ifeq (,$(filter $(PLATFORM), windows macosx))
|
||||
EXFILES+=sun/awt/AWTCharset.java
|
||||
endif
|
||||
|
||||
# Exclude some generated AWT files that were implicitly not included by the old build.
|
||||
ifneq ($(PLATFORM), macosx)
|
||||
#
|
||||
# Not in rt.jar on solaris and linux...(windows not checked)
|
||||
# in rt.jar on macosx ??
|
||||
EXFILES+=sun/awt/X11/ScreenFormat.java \
|
||||
sun/awt/X11/XArc.java \
|
||||
sun/awt/X11/XChar2b.java \
|
||||
@ -182,19 +187,15 @@ EXFILES+=sun/awt/X11/ScreenFormat.java \
|
||||
sun/awt/X11/XdbeSwapInfo.java \
|
||||
sun/awt/X11/XmbTextItem.java \
|
||||
sun/awt/X11/XwcTextItem.java
|
||||
|
||||
# Exclude sun/security files that should go in a separate jar
|
||||
EXFILES+=sun/security/ec/ECDHKeyAgreement.java \
|
||||
sun/security/ec/ECDSASignature.java \
|
||||
sun/security/ec/ECKeyPairGenerator.java \
|
||||
sun/security/ec/SunEC$1.java \
|
||||
sun/security/ec/SunEC.java \
|
||||
sun/security/ec/SunECEntries.java
|
||||
endif
|
||||
|
||||
# Exclude another implicitly not included file.
|
||||
EXFILES+=sun/util/locale/AsciiUtil.java
|
||||
|
||||
ifeq ($(PLATFORM), linux)
|
||||
ifeq (,$(filter $(PLATFORM), solaris macosx))
|
||||
#
|
||||
# only solaris and macosx
|
||||
#
|
||||
EXFILES+=sun/nio/fs/PollingWatchService.java
|
||||
endif
|
||||
|
||||
@ -205,11 +206,42 @@ EXFILES+=-linux-arm.java \
|
||||
|
||||
# TODO: Is this necessary?
|
||||
ifeq ($(PLATFORM), windows)
|
||||
EXFILES+=sun/nio/ch/AbstractPollSelectorImpl.java \
|
||||
sun/nio/ch/DevPollArrayWrapper.java \
|
||||
sun/nio/ch/DevPollSelectorImpl.java \
|
||||
sun/nio/ch/DevPollSelectorProvider.java \
|
||||
sun/nio/ch/InheritedChannel.java \
|
||||
sun/nio/ch/PollSelectorProvider.java \
|
||||
sun/nio/ch/PollSelectorImpl.java \
|
||||
sun/nio/ch/Port.java \
|
||||
sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
|
||||
sun/nio/ch/SolarisAsynchronousChannelProvider.java \
|
||||
sun/nio/ch/SolarisEventPort.java \
|
||||
sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
|
||||
sun/nio/ch/UnixAsynchronousSocketChannelImpl.java
|
||||
EXFILES+=sun/net/sdp/SdpProvider.java
|
||||
else
|
||||
EXFILES+=sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java
|
||||
endif
|
||||
|
||||
ifdef DISABLE_NIMBUS
|
||||
# TODO: need to check when it happens
|
||||
# Exclude nimus if disabled
|
||||
EXCLUDES+= javax/swing/plaf/nimbus \
|
||||
com/sun/java/swing/plaf/nimbus
|
||||
else
|
||||
#
|
||||
# These are never put into rt.jar
|
||||
#
|
||||
EXFILES+= javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
|
||||
javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
|
||||
javax/swing/plaf/nimbus/ScrollBarPainter.java \
|
||||
javax/swing/plaf/nimbus/SliderPainter.java \
|
||||
javax/swing/plaf/nimbus/SpinnerPainter.java \
|
||||
javax/swing/plaf/nimbus/SplitPanePainter.java \
|
||||
javax/swing/plaf/nimbus/TabbedPanePainter.java
|
||||
endif
|
||||
|
||||
# Acquire a list of files that should be copied straight over to the classes.
|
||||
include CopyIntoClasses.gmk
|
||||
# Now we have COPY_PATTERNS, COPY_FILES and COPY_EXTRA
|
||||
@ -219,25 +251,105 @@ ifndef OPENJDK
|
||||
$(JDK_TOPDIR)/src/closed/$(LEGACY_HOST_OS_API)/classes
|
||||
endif
|
||||
|
||||
MACOSX_SRC_DIRS :=
|
||||
ifeq ($(PLATFORM),macosx)
|
||||
MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/classes
|
||||
|
||||
# this files are duplicated in MACOSX_SRC_DIRS
|
||||
EXFILES+= $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java \
|
||||
$(JDK_TOPDIR)/src/solaris/classes/sun/java2d/BackBufferCapsProvider.java \
|
||||
$(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \
|
||||
$(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java
|
||||
endif
|
||||
|
||||
# The exception handling of swing beaninfo
|
||||
# These resources violates the convention of having code and resources together under
|
||||
# $(JDK_TOPDIR)/src/.../classes directories
|
||||
$(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%.gif: $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo/images/%.gif
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_JDK,\
|
||||
SETUP:=GENERATE_JDKBYTECODE,\
|
||||
SRC:=$(JDK_TOPDIR)/src/share/classes \
|
||||
$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes \
|
||||
$(MACOSX_SRC_DIRS) \
|
||||
$(JDK_OUTPUTDIR)/gensrc \
|
||||
$(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/beaninfo \
|
||||
$(CLOSED_SRC_DIRS),\
|
||||
EXCLUDES:=$(EXCLUDES),\
|
||||
EXCLUDE_FILES:=$(EXFILES),\
|
||||
BIN:=$(JDK_OUTPUTDIR)/newclasses,\
|
||||
BIN:=$(JDK_OUTPUTDIR)/classes,\
|
||||
COPY:=$(COPY_PATTERNS),\
|
||||
COPY_FILES:=$(COPY_FILES),\
|
||||
JAR:=$(JDK_OUTPUTDIR)/newrt.jar,\
|
||||
HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers))
|
||||
|
||||
##########################################################################################
|
||||
# Special handling of header file generation for classes in the jigsaw base module which
|
||||
# currently can't add the annotaion GenerateNativeHeaders. For these specific classes the
|
||||
# java file and the class have the same names which enables shortcutting the dependencies.
|
||||
|
||||
JDK_BASE_HEADER_CLASSES:=java.lang.Integer \
|
||||
java.lang.Long \
|
||||
java.net.SocketOptions \
|
||||
sun.nio.ch.IOStatus
|
||||
|
||||
JDK_BASE_HEADER_JAVA_FILES:=$(patsubst %,$(JDK_TOPDIR)/src/share/classes/%.java,\
|
||||
$(subst .,/,$(JDK_BASE_HEADER_CLASSES)))
|
||||
|
||||
ifeq ($(PLATFORM),windows)
|
||||
JDK_BASE_HEADER_CLASSES_WINDOWS:=sun.nio.ch.PollArrayWrapper
|
||||
JDK_BASE_HEADER_CLASSES+=$(JDK_BASE_HEADER_CLASSES_WINDOWS)
|
||||
JDK_BASE_HEADER_JAVA_FILES+=$(patsubst %,$(JDK_TOPDIR)/src/windows/classes/%.java,\
|
||||
$(subst .,/,$(JDK_BASE_HEADER_CLASSES_WINDOWS)))
|
||||
endif
|
||||
|
||||
# Set prereqs to the java files since make doesn't know about the class files. Add BUILD_JDK
|
||||
# as an order only dependency to avoid race with the java compilation.
|
||||
$(JDK_OUTPUTDIR)/classes/_the.jdk.base.headers: $(JDK_BASE_HEADER_JAVA_FILES) | $(BUILD_JDK)
|
||||
$(ECHO) Generating headers for jdk base classes
|
||||
$(JAVAH) -bootclasspath $(JDK_OUTPUTDIR)/classes -d $(JDK_OUTPUTDIR)/gensrc_headers \
|
||||
$(JDK_BASE_HEADER_CLASSES)
|
||||
$(TOUCH) $@
|
||||
|
||||
##########################################################################################
|
||||
|
||||
#
|
||||
# This is an empty jar (only contains manifest) and fits poorly into framework...
|
||||
# create simple rule instead
|
||||
#
|
||||
MANAGEMENT_AGENT_JAR_DEPS := $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/management-agent.jar : $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
|
||||
$(JAR) cfm $@ $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
|
||||
|
||||
JARS += $(JDK_OUTPUTDIR)/lib/management-agent.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_ALTCLASSES_JAR,\
|
||||
SETUP:=GENERATE_JDKBYTECODE,\
|
||||
SRC:=$(JDK_TOPDIR)/src/closed/share/altclasses, \
|
||||
BIN:=$(JDK_OUTPUTDIR)/altclasses_classes,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/alt-rt.jar))
|
||||
|
||||
$(BUILD_ALTCLASSES_JAR): $(BUILD_JDK)
|
||||
JARS += $(JDK_OUTPUTDIR)/lib/alt-rt.jar
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin:
|
||||
$(MKDIR) -p $(@D)
|
||||
$(TOUCH) $@
|
||||
|
||||
##########################################################################################
|
||||
|
||||
# copy with -a to preserve timestamps so dependencies down the line aren't messed up
|
||||
all: $(BUILD_JDK) $(JDK_OUTPUTDIR)/newrt.jar $(COPY_EXTRA)
|
||||
(cd $(JDK_OUTPUTDIR); \
|
||||
$(CP) -rp newclasses/* classes; \
|
||||
$(FIND) classes -name "_the.*" $(FIND_DELETE); \
|
||||
$(TOUCH) $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin)
|
||||
all: $(BUILD_JDK) $(JARS) $(COPY_EXTRA) $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
|
||||
$(JDK_OUTPUTDIR)/classes/_the.jdk.base.headers
|
||||
|
||||
.PHONY: all
|
||||
|
@ -41,6 +41,16 @@ define SetupLauncher
|
||||
# Parameter 3 are extra LDFLAGS
|
||||
# Parameter 4 are extra LDFLAGS_SUFFIX_posix
|
||||
# Parameter 5 are extra LDFLAGS_SUFFIX_winapi
|
||||
|
||||
$1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/jli.lib
|
||||
ifneq ($6,)
|
||||
$1_WINDOWS_JLI_LIB:=$6
|
||||
endif
|
||||
$1_VERSION_INFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc
|
||||
ifneq ($8,)
|
||||
$1_VERSION_INFO_RESOURCE:=$8
|
||||
endif
|
||||
|
||||
$(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\
|
||||
SRC:=$(JDK_TOPDIR)/src/share/bin,\
|
||||
INCLUDE_FILES:=main.c,\
|
||||
@ -61,19 +71,22 @@ define SetupLauncher
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN,../lib/$(LIBARCH)/jli) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN,../jre/lib/$(LIBARCH)/jli) \
|
||||
$3,\
|
||||
LDFLAGS_linux:=$(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/launchers/mapfile-$(ARCH)),\
|
||||
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(ARCH), \
|
||||
LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX),\
|
||||
LDFLAGS_SUFFIX_posix:=$4 -lc,\
|
||||
LDFLAGS_SUFFIX_winapi:=$5,\
|
||||
BIN:=$(JDK_OUTPUTDIR)/newobjs/$1_objs,\
|
||||
EXE:=$(JDK_OUTPUTDIR)/newobjs/$1$(EXE_SUFFIX),\
|
||||
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
|
||||
LDFLAGS_SUFFIX_winapi:=$$($1_WINDOWS_JLI_LIB) \
|
||||
$(JDK_OUTPUTDIR)/objs/java.lib advapi32.lib $5,\
|
||||
BIN:=$(JDK_OUTPUTDIR)/objs/$1_objs,\
|
||||
EXE:=$(JDK_OUTPUTDIR)/objs/$1$(EXE_SUFFIX),\
|
||||
VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\
|
||||
RC_FLAGS:=$(RC_FLAGS)\
|
||||
/D "JDK_FNAME=$1$(EXE_SUFFIX)" \
|
||||
/D "JDK_INTERNAL_NAME=$1" \
|
||||
/D "JDK_FTYPE=0x1L")
|
||||
/D "JDK_FTYPE=0x1L" \
|
||||
$7,\
|
||||
MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest)
|
||||
|
||||
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/newobjs/$1$(EXE_SUFFIX) $(JDK_OUTPUTDIR)/bin/$1$(EXE_SUFFIX)
|
||||
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/$1$(EXE_SUFFIX)
|
||||
endef
|
||||
|
||||
##########################################################################################
|
||||
@ -84,8 +97,23 @@ ifeq ($(PLATFORM),macosx)
|
||||
XLIBS:=
|
||||
endif
|
||||
|
||||
ifdef OPENJDK
|
||||
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons"
|
||||
else
|
||||
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
|
||||
endif
|
||||
|
||||
$(eval $(call SetupLauncher,java,\
|
||||
-DEXPAND_CLASSPATH_WILDCARDS))
|
||||
-DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
|
||||
$(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
|
||||
$(JDK_TOPDIR)/src/windows/resource/java.rc))
|
||||
|
||||
ifeq ($(HOST_OS),windows)
|
||||
$(eval $(call SetupLauncher,javaw,\
|
||||
-DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
|
||||
$(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
|
||||
$(JDK_TOPDIR)/src/windows/resource/java.rc))
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
THREAD_LIB:=-lthread
|
||||
@ -257,61 +285,114 @@ endif
|
||||
##########################################################################################
|
||||
# The order of the object files on the link command line affects the size of the resulting
|
||||
# binary (at least on linux) which causes the size to differ between old and new build.
|
||||
UNPACKEXE_ZIPOBJS = $(JDK_OUTPUTDIR)/newobjs/libzip/zcrc32$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/newobjs/libzip/deflate$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/newobjs/libzip/trees$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/newobjs/libzip/zadler32$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/newobjs/libzip/compress$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/newobjs/libzip/zutil$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/newobjs/libzip/inflate$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/newobjs/libzip/infback$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/newobjs/libzip/inftrees$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/newobjs/libzip/inffast$(OBJ_SUFFIX)
|
||||
ifeq ($(USE_EXTERNAL_LIBZ), true)
|
||||
UNPACKEXE_ZIPOBJS := -lz
|
||||
else
|
||||
UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
|
||||
$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
|
||||
|
||||
|
||||
$(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX): $(UNPACKEXE_ZIPOBJS)
|
||||
|
||||
endif
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
|
||||
SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
|
||||
EXCLUDE_FILES:=jni.cpp,\
|
||||
LANG:=C++,\
|
||||
LANG:=C,\
|
||||
CFLAGS:=$(CXXFLAGS_JDKEXE) $(CXX_O_FLAG_NORM) \
|
||||
-DFULL \
|
||||
-I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\
|
||||
CFLAGS_release:=-DPRODUCT,\
|
||||
CFLAGS_linux:=-fPIC,\
|
||||
MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200, \
|
||||
LDFLAGS:=$(LDFLAGS_JDKEXE) \
|
||||
$(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libunpack/mapfile-vers-unpack200) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_SUFFIX:=$(UNPACKEXE_ZIPOBJS) $(LIBCXX),\
|
||||
LDFLAGS_SUFFIX_solaris:=-lc,\
|
||||
BIN:=$(JDK_OUTPUTDIR)/newobjs/unpackexe,\
|
||||
EXE:=$(JDK_OUTPUTDIR)/newobjs/unpack200$(EXE_SUFFIX),\
|
||||
BIN:=$(JDK_OUTPUTDIR)/objs/unpackexe,\
|
||||
EXE:=$(JDK_OUTPUTDIR)/objs/unpack200$(EXE_SUFFIX),\
|
||||
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
|
||||
RC_FLAGS:=$(RC_FLAGS)\
|
||||
/D "JDK_FNAME=unpack200.exe" \
|
||||
/D "JDK_INTERNAL_NAME=unpack200" \
|
||||
/D "JDK_FTYPE=0x1L"))
|
||||
|
||||
$(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX): $(UNPACKEXE_ZIPOBJS)
|
||||
|
||||
ifeq ($(HOST_OS_API),winapi)
|
||||
UNPACK_MANIFEST:=$(JDK_OUTPUTDIR)/newobjs/unpackexe/unpack200.exe.manifest
|
||||
IMVERSIONVALUE=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
|
||||
SED_ALL_MANIFEST=$(SED) -e 's%IMVERSION%$(IMVERSIONVALUE)%g'
|
||||
|
||||
$(UNPACK_MANIFEST): $(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest
|
||||
$(CAT) $< | $(SED_ALL_MANIFEST) > $@
|
||||
|
||||
# Adding a dependency to spec file might be a good idea here, to force rerun on version change.
|
||||
$(JDK_OUTPUTDIR)/newobjs/unpackexe/unpack200.exe.manifest.mt: $(UNPACK_MANIFEST)
|
||||
$(MT) /manifest $< /outputresource:$(JDK_OUTPUTDIR)/newobjs/unpack200$(EXE_SUFFIX);#1
|
||||
touch $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/newobjs/unpackexe/unpack200.exe.manifest.mt: $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX)
|
||||
endif
|
||||
/D "JDK_FTYPE=0x1L",\
|
||||
MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
|
||||
|
||||
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
|
||||
BUILD_JEXEC :=
|
||||
BUILD_JEXEC_SRC :=
|
||||
BUILD_JEXEC_INC :=
|
||||
BUILD_JEXEC_DST := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/jexec$(EXE_SUFFIX)
|
||||
|
||||
#
|
||||
# UNHANDLED:
|
||||
# - COMPILE_APPROACH = normal
|
||||
#
|
||||
|
||||
#
|
||||
# jdk/make/java/Makefile
|
||||
#
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
BUILD_JEXEC := 1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), linux)
|
||||
BUILD_JEXEC := 1
|
||||
endif # PLATFORM
|
||||
|
||||
#
|
||||
# jdk/make/java/jexec/Makefile
|
||||
#
|
||||
ifeq ($(BUILD_JEXEC), 1)
|
||||
|
||||
ifeq ($(PLATFORM),windows)
|
||||
else ifeq ($(PLATFORM),macosx)
|
||||
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
|
||||
else
|
||||
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), linux)
|
||||
BUILD_JEXEC_DST := $(JDK_OUTPUTDIR)/lib/jexec$(EXE_SUFFIX)
|
||||
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Note that the two Makefile's seems to contradict each other,
|
||||
# and that src/macosx/bin/jexec.c seems unused
|
||||
#
|
||||
ifneq ($(BUILD_JEXEC_SRC),)
|
||||
$(eval $(call SetupNativeCompilation,BUILD_JEXEC,\
|
||||
SRC:=$(BUILD_JEXEC_SRC),\
|
||||
INCLUDE_FILES:=jexec.c,\
|
||||
LANG:=C,\
|
||||
CFLAGS:=$(CFLAGS_JDKEXE) $(C_O_FLAG_NORM) \
|
||||
$(BUILD_JEXEC_INC), \
|
||||
LDFLAGS:=$(LDFLAGS_JDKEXE), \
|
||||
BIN:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
|
||||
EXE:=$(BUILD_JEXEC_DST)))
|
||||
|
||||
BUILD_LAUNCHERS += $(BUILD_JEXEC_DST)
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
#
|
||||
# The java-rmi.cgi script in bin/ only gets delivered in certain situations
|
||||
#
|
||||
@ -335,22 +416,25 @@ endif
|
||||
ifeq ($(HOST_OS_API),winapi)
|
||||
$(eval $(call SetupLauncher,java-rmi,\
|
||||
-DEXPAND_CLASSPATH_WILDCARDS,\
|
||||
$(call SET_SHARED_LIBRARY_MAPFILE,makefiles/java/main/java/mapfile-$(ARCH))))
|
||||
$(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(ARCH))))
|
||||
|
||||
$(JAVA_RMI_CGI): $(JDK_OUTPUTDIR)/newobjs/java-rmi$(EXE_SUFFIX)
|
||||
$(JAVA_RMI_CGI): $(JDK_OUTPUTDIR)/objs/java-rmi$(EXE_SUFFIX)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
|
||||
else
|
||||
$(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
$(CHMOD) a+x $@
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
$(JDK_OUTPUTDIR)/bin/% : $(JDK_OUTPUTDIR)/newobjs/%
|
||||
echo Copying $(@F)
|
||||
$(JDK_OUTPUTDIR)/bin/% : $(JDK_OUTPUTDIR)/objs/%
|
||||
$(ECHO) Copying $(@F)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
$(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -24,9 +24,15 @@
|
||||
#
|
||||
|
||||
INCLUDEDIR = $(JDK_OUTPUTDIR)/include
|
||||
# TODO: Platform dir needs to be "win32" on windows /erikj
|
||||
|
||||
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM)
|
||||
|
||||
ifeq ($(PLATFORM), windows)
|
||||
PLATFORM_INCLUDE = $(INCLUDEDIR)/win32
|
||||
else ifeq ($(PLATFORM), macosx)
|
||||
PLATFORM_INCLUDE = $(INCLUDEDIR)/darwin
|
||||
endif
|
||||
|
||||
#
|
||||
# Copy exported header files to outputdir.
|
||||
#
|
||||
@ -41,12 +47,12 @@ H_TARGET_FILES =$(INCLUDEDIR)/jdwpTransport.h \
|
||||
|
||||
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
$(PLATFORM_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/javavm/export/%.h
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES = $(H_TARGET_FILES)
|
||||
@ -58,7 +64,7 @@ SERVICETAG_LIBDIR = $(LIBDIR)/servicetag
|
||||
|
||||
$(SERVICETAG_LIBDIR)/jdk_header.png: $(JDK_TOPDIR)/src/share/classes/com/sun/servicetag/resources/jdk_header.png
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
$(CHMOD) 444 $@
|
||||
|
||||
@ -73,13 +79,13 @@ MGMT_TARGET_FILES = $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
|
||||
|
||||
$(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
$(CHMOD) 644 $@
|
||||
|
||||
$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
$(CHMOD) 444 $@
|
||||
|
||||
@ -91,7 +97,7 @@ LOGGING_LIB_SRC = $(JDK_TOPDIR)/src/share/lib
|
||||
|
||||
$(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(LIBDIR)/logging.properties
|
||||
@ -104,9 +110,9 @@ PSFONTPROPFILE_SRC_DIR = $(JDK_TOPDIR)/src/share/classes/sun/print
|
||||
PSFONTPROPFILE_SRCS = $(wildcard $(PSFONTPROPFILE_SRC_DIR)/*.properties*)
|
||||
PSFONTPROPFILE_TARGET_FILES = $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS))
|
||||
|
||||
$(PSFONTPROPFILE_TARGET_FILES): $(PSFONTPROPFILE_SRCS)
|
||||
$(LIBDIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES)
|
||||
@ -119,7 +125,7 @@ PLATFORM_LIB_SRC = $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
|
||||
|
||||
$(LIBDIR)/flavormap.properties: $(PLATFORM_LIB_SRC)/flavormap.properties
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(LIBDIR)/flavormap.properties
|
||||
@ -129,7 +135,7 @@ CURSORS_PLATFORM_LIB_SRC = $(PLATFORM_LIB_SRC)/images/cursors
|
||||
|
||||
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_PLATFORM_LIB_SRC)/cursors.properties
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties
|
||||
@ -142,9 +148,9 @@ CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB
|
||||
endif # PLATFORM
|
||||
CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
|
||||
|
||||
$(CURSORS_TARGET_FILES): $(CURSORS_SRC_FILES)
|
||||
$(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(CURSORS_TARGET_FILES)
|
||||
@ -155,13 +161,39 @@ CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
|
||||
|
||||
$(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(LIBDIR)/content-types.properties
|
||||
|
||||
##########################################################################################
|
||||
|
||||
CALENDARS_SRC := $(JDK_TOPDIR)/src/share/lib
|
||||
|
||||
$(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(LIBDIR)/calendars.properties
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifeq ($(PLATFORM),windows)
|
||||
|
||||
TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
|
||||
|
||||
$(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(LIBDIR)/tzmappings
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm
|
||||
|
||||
ifdef OPENJDK
|
||||
@ -175,7 +207,7 @@ ICCPROFILE_TARGET_FILES:=$(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(
|
||||
|
||||
$(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
$(CHMOD) 444 $@
|
||||
|
||||
@ -209,8 +241,11 @@ ifdef OPENJDK
|
||||
endif
|
||||
endif
|
||||
|
||||
$(FREETYPE_LIB):
|
||||
$(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
|
||||
$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
|
||||
ifeq ($(BUILD_OS), windows)
|
||||
$(CHMOD) +rx $@
|
||||
endif
|
||||
|
||||
COPY_FILES += $(FREETYPE_LIB)
|
||||
endif
|
||||
@ -223,10 +258,336 @@ ifeq ($(PLATFORM),windows)
|
||||
MSVCRNN_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCRNN_DLL))
|
||||
$(MSVCRNN_TARGET): $(MSVCRNN_DLL)
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(MSVCRNN_TARGET)
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
HPROF_SRC=$(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
|
||||
|
||||
$(LIBDIR)/jvm.hprof.txt : $(HPROF_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(LIBDIR)/jvm.hprof.txt
|
||||
|
||||
##########################################################################################
|
||||
|
||||
#
|
||||
# How to install jvm.cfg.
|
||||
#
|
||||
ifeq ($(JVM_VARIANT_ZERO), true)
|
||||
JVMCFG_ARCH := zero
|
||||
else
|
||||
JVMCFG_ARCH := $(ARCH)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),macosx)
|
||||
ifeq ($(JVMCFG_ARCH),amd64)
|
||||
JVMCFG_ARCH := x86_64
|
||||
endif
|
||||
JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
|
||||
JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib
|
||||
else
|
||||
JVMCFG_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/$(JVMCFG_ARCH)/jvm.cfg
|
||||
JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)
|
||||
endif
|
||||
|
||||
JVMCFG := $(JVMCFG_DIR)/jvm.cfg
|
||||
|
||||
|
||||
ifeq ($(ARCH_DATA_MODEL),32)
|
||||
# On 32 bit machines, we can have client and/or server libjvms installed.
|
||||
# Since the currently committed jvm.cfg expects clientANDserver, we need
|
||||
# to patch the jvm.cfg when we have built only a client or only a server.
|
||||
# This should also support -kernel, -zero and -zeroshark.
|
||||
ifeq ($(JVM_VARIANTS),$(COMMA)client$(COMMA))
|
||||
# Create a patched jvm.cfg to use -client by default and alias -server to -client.
|
||||
$(JVMCFG):
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $(JVMCFG)
|
||||
$(PRINTF) "-client KNOWN\n">$(JVMCFG)
|
||||
$(PRINTF) "-server IGNORE\n">>$(JVMCFG)
|
||||
$(PRINTF) "-hotspot ALIASED_TO -client\n">>$(JVMCFG)
|
||||
$(PRINTF) "-classic WARN\n">>$(JVMCFG)
|
||||
$(PRINTF) "-native ERROR\n">>$(JVMCFG)
|
||||
$(PRINTF) "-green ERROR\n">>$(JVMCFG)
|
||||
|
||||
else
|
||||
ifeq ($(JVM_VARIANTS),$(COMMA)server$(COMMA))
|
||||
# Create a patched jvm.cfg to use -server by default and alias -client to -server.
|
||||
|
||||
$(JVMCFG):
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $(JVMCFG)
|
||||
$(PRINTF) "-server KNOWN\n">$(JVMCFG)
|
||||
$(PRINTF) "-client IGNORE\n">>$(JVMCFG)
|
||||
$(PRINTF) "-hotspot IGNORE\n">>$(JVMCFG)
|
||||
$(PRINTF) "-classic WARN\n">>$(JVMCFG)
|
||||
$(PRINTF) "-native ERROR\n">>$(JVMCFG)
|
||||
$(PRINTF) "-green ERROR\n">>$(JVMCFG)
|
||||
else
|
||||
# Use the default jvm.cfg for this 32 bit setup.
|
||||
$(JVMCFG): $(JVMCFG_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
endif
|
||||
endif
|
||||
else
|
||||
# Use the default jvm.cfg for this 64 bit setup.
|
||||
$(JVMCFG): $(JVMCFG_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
endif
|
||||
|
||||
COPY_FILES += $(JVMCFG)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security
|
||||
PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-solaris
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), windows)
|
||||
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-windows
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-macosx
|
||||
endif
|
||||
|
||||
$(PROPS_DST): $(PROPS_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(PROPS_DST)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
POLICY_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.policy
|
||||
POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
|
||||
|
||||
$(POLICY_DST): $(POLICY_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(POLICY_DST)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
CACERTS_SRC := $(CACERTS_FILE)
|
||||
CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts
|
||||
|
||||
$(CACERTS_DST): $(CACERTS_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(CACERTS_DST)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
BLACKLIST_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
|
||||
BLACKLIST_DST := $(JDK_OUTPUTDIR)/lib/security/blacklist
|
||||
|
||||
TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
|
||||
TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
|
||||
|
||||
$(BLACKLIST_DST): $(BLACKLIST_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(BLACKLIST_DST)
|
||||
|
||||
$(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(TRUSTEDLIBS_DST)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts
|
||||
SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
|
||||
SHARED_FONTS_FILES := \
|
||||
LucidaTypewriterRegular.ttf \
|
||||
LucidaTypewriterBold.ttf \
|
||||
LucidaBrightRegular.ttf \
|
||||
LucidaBrightDemiBold.ttf \
|
||||
LucidaBrightItalic.ttf \
|
||||
LucidaBrightDemiItalic.ttf \
|
||||
LucidaSansRegular.ttf \
|
||||
LucidaSansDemiBold.ttf \
|
||||
|
||||
SHARED_FONTS_SRC := $(foreach F,$(SHARED_FONTS_FILES),$(SHARED_FONTS_SRC_DIR)/$(F))
|
||||
SHARED_FONTS_DST := $(foreach F,$(SHARED_FONTS_FILES),$(SHARED_FONTS_DST_DIR)/$(F))
|
||||
|
||||
$(SHARED_FONTS_DST_DIR)/%.ttf : $(SHARED_FONTS_SRC_DIR)/%.ttf
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
$(SHARED_FONTS_DST_DIR)/fonts.dir : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(SHARED_FONTS_DST) $(SHARED_FONTS_DST_DIR)/fonts.dir
|
||||
|
||||
ifeq ($(PLATFORM), linux)
|
||||
|
||||
# The oblique fonts are only needed/wanted on Linux.
|
||||
|
||||
OBL_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts/oblique
|
||||
OBL_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/oblique-fonts
|
||||
OBL_FONTS_FILES := LucidaTypewriterOblique.ttf LucidaTypewriterBoldOblique.ttf \
|
||||
LucidaSansOblique.ttf LucidaSansDemiOblique.ttf
|
||||
|
||||
OBL_FONTS_SRC := $(foreach F,$(OBL_FONTS_FILES),$(OBL_FONTS_SRC_DIR)/$(F))
|
||||
OBL_FONTS_DST := $(foreach F,$(OBL_FONTS_FILES),$(OBL_FONTS_DST_DIR)/$(F))
|
||||
|
||||
$(OBL_FONTS_DST_DIR)/%.ttf : $(OBL_FONTS_SRC_DIR)/%.ttf
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
$(OBL_FONTS_DST_DIR)/fonts.dir : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
|
||||
|
||||
endif # linux
|
||||
endif # OPENJDK
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
JS_RESOURCES_FILES := Messages.properties Messages_fr.properties
|
||||
JS_RESOURCES_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/classes/sun/org/mozilla/javascript/internal/resources
|
||||
JS_RESOURCES_DST_DIR := $(JDK_OUTPUTDIR)/classes/sun/org/mozilla/javascript/internal/resources
|
||||
|
||||
JS_RESOURCES_SRC := $(foreach F,$(JS_RESOURCES_FILES),$(JS_RESOURCES_SRC_DIR)/$(F))
|
||||
JS_RESOURCES_DST := $(foreach F,$(JS_RESOURCES_FILES),$(JS_RESOURCES_DST_DIR)/$(F))
|
||||
|
||||
$(JS_RESOURCES_DST_DIR)/% : $(JS_RESOURCES_SRC_DIR)/%
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(JS_RESOURCES_DST)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
#
|
||||
# Solaris X11 Direct Graphics Access library
|
||||
#
|
||||
|
||||
_DGALIBS_sparc = \
|
||||
libxinerama.so \
|
||||
libjdgaSUNWcg6.so \
|
||||
libjdgaSUNWffb.so \
|
||||
libjdgaSUNWm64.so \
|
||||
libjdgaSUNWafb.so
|
||||
|
||||
_DGALIBS_sparcv9 = \
|
||||
libxinerama.so \
|
||||
libjdgaSUNWcg6.so \
|
||||
libjdgaSUNWffb.so \
|
||||
libjdgaSUNWm64.so \
|
||||
libjdgaSUNWafb.so
|
||||
|
||||
_DGALIBS_i586 = # no i586 library yet
|
||||
|
||||
_DGALIBS_amd64 = # no amd64 library yet
|
||||
|
||||
DGALIBS = $(_DGALIBS_$(ARCH):%=$(JDK_OUTPUTDIR)/lib/$(LIBARCH)/%)
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(ARCH)/libxinerama.so
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(ARCH)/libjdgaSUNW%.so
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libjdgaSUNWffb.so
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(LN) -s $< $@
|
||||
|
||||
COPY_FILES += $(DGALIBS)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
|
||||
SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
|
||||
SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
|
||||
|
||||
$(SUNPKCS11_CFG_DST) : $(SUNPKCS11_CFG_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(SUNPKCS11_CFG_DST)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
|
||||
UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/ucrypto-solaris.cfg
|
||||
UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
|
||||
|
||||
$(UCRYPTO_CFG_DST) : $(UCRYPTO_CFG_SRC)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(UCRYPTO_CFG_DST)
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/sound.properties : $(JDK_TOPDIR)/src/share/lib/sound.properties
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $(@)
|
||||
|
||||
COPY_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
|
||||
|
||||
##########################################################################################
|
||||
|
@ -83,6 +83,83 @@ COPY_FILES += \
|
||||
COPY_FILES += \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/net/idn/uidna.spp
|
||||
|
||||
#
|
||||
# Swing plaf resources
|
||||
#
|
||||
SWING_PLAF_WINDOWS_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows
|
||||
COPY_FILES += \
|
||||
$(wildcard $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/*.gif) \
|
||||
$(wildcard $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/*.png)
|
||||
|
||||
ifndef OPENJDK
|
||||
SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/com/sun/java/swing/plaf/windows
|
||||
# Filter out JavaCup32.png from OpenJDK
|
||||
COPY_FILES := $(filter-out $(SWING_PLAF_WINDOWS_RESOURCES_DIR)/icons/JavaCup32.png, $(COPY_FILES))
|
||||
# Alter JavaCup32.png from ClosedJDK
|
||||
COPY_FILES += \
|
||||
$(SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED)/icons/JavaCup32.png
|
||||
endif
|
||||
|
||||
SWING_PLAF_BASIC_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/basic
|
||||
COPY_FILES += \
|
||||
$(wildcard $(SWING_PLAF_BASIC_RESOURCES_DIR)/icons/*.png)
|
||||
|
||||
ifndef OPENJDK
|
||||
SWING_PLAF_BASIC_RESOURCES_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/javax/swing/plaf/basic
|
||||
# Filter out JavaCup16.png from OpenJDK
|
||||
COPY_FILES := $(filter-out $(SWING_PLAF_BASIC_RESOURCES_DIR)/icons/JavaCup16.png, $(COPY_FILES))
|
||||
# Alter JavaCup16.png from ClosedJDK
|
||||
COPY_FILES += \
|
||||
$(SWING_PLAF_BASIC_RESOURCES_DIR_CLOSED)/icons/JavaCup16.png
|
||||
endif
|
||||
|
||||
ifdef OPENJDK
|
||||
SWING_PLAF_MOTIF_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif
|
||||
COPY_FILES += \
|
||||
$(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.gif) \
|
||||
$(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR)/icons/*.png)
|
||||
else
|
||||
SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/com/sun/java/swing/plaf/motif
|
||||
COPY_FILES += \
|
||||
$(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED)/icons/*.gif) \
|
||||
$(wildcard $(SWING_PLAF_MOTIF_RESOURCES_DIR_CLOSED)/icons/*.png)
|
||||
endif
|
||||
|
||||
SWING_PLAF_METAL_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/metal
|
||||
COPY_FILES += \
|
||||
$(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/*.gif) \
|
||||
$(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/*.png) \
|
||||
$(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.gif) \
|
||||
$(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.png) \
|
||||
$(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/sounds/*.wav)
|
||||
|
||||
ifneq ($(PLATFORM), windows)
|
||||
# Only copy GTK resources on Solaris/Linux
|
||||
SWING_PLAF_GTK_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk
|
||||
COPY_FILES += \
|
||||
$(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/icons/*.gif) \
|
||||
$(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/icons/*.png) \
|
||||
$(wildcard $(SWING_PLAF_GTK_RESOURCES_DIR)/resources/metacity/SwingFallbackTheme/metacity-1/*.xml)
|
||||
endif
|
||||
# END: Swing plaf resources
|
||||
|
||||
# The exception handling of swing beaninfo
|
||||
# These resources violates the convention of having code and resources together under
|
||||
# $(JDK_TOPDIR)/src/.../classes directories
|
||||
SWING_BEANINFO_RESOURCES_SRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo/images
|
||||
SWING_BEANINFO_RESOURCES_SRC = $(wildcard $(SWING_BEANINFO_RESOURCES_SRC_DIR)/*.gif)
|
||||
OUT_BEANINFO_RESOURCES = $(addprefix $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/,\
|
||||
$(shell $(PRINTF) "$(SWING_BEANINFO_RESOURCES_SRC)\n" | $(SED) -e 's|/[^ ]*/beaninfo/images/||g'))
|
||||
|
||||
COPY_EXTRA += $(OUT_BEANINFO_RESOURCES)
|
||||
# END: Swing beaninfo resources
|
||||
|
||||
# Swing text resources
|
||||
SWING_TEXT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/text
|
||||
COPY_FILES += \
|
||||
$(SWING_TEXT_RESOURCEDIR)/html/default.css \
|
||||
$(wildcard $(SWING_TEXT_RESOURCEDIR)/rtf/charsets/*.txt)
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
# Copy the META-INF/services configuration files that are scattered around the source tree
|
||||
@ -94,7 +171,7 @@ COPY_FILES += \
|
||||
# are uncommented and the configuration file is stored in the output META-INF directory.
|
||||
|
||||
# Make sure the output directory is created.
|
||||
$(shell $(MKDIR) -p $(JDK_OUTPUTDIR)/newclasses/META-INF/services)
|
||||
$(shell $(MKDIR) -p $(JDK_OUTPUTDIR)/classes/META-INF/services)
|
||||
# Find all META-INF/services/* files
|
||||
ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
|
||||
ALL_META-INF_DIRS_hostapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes -type d -a -name META-INF)
|
||||
@ -107,12 +184,22 @@ else
|
||||
ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_share)
|
||||
endif
|
||||
# Filter out META-INF dirs that shouldn't be included
|
||||
ALL_META-INF_DIRS:=$(filter-out %sun/nio/cs/ext/META-INF,$(ALL_META-INF_DIRS))
|
||||
ifdef OPENJDK
|
||||
ALL_META-INF_DIRS:=$(filter-out %com/sun/script/javascript/META-INF,$(ALL_META-INF_DIRS))
|
||||
endif
|
||||
|
||||
ifndef OPENJDK
|
||||
ifneq ($(PLATFORM), macosx)
|
||||
ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc/META-INF
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef OPENJDK
|
||||
ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/java2d/cmm/kcms/META-INF
|
||||
endif
|
||||
|
||||
SRC_SERVICES_FILES:=$(wildcard $(addsuffix /services/*,$(ALL_META-INF_DIRS)))
|
||||
|
||||
ifdef OPENJDK
|
||||
SRC_SERVICES_FILES:=$(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES))
|
||||
SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.PCMM,$(SRC_SERVICES_FILES))
|
||||
@ -120,16 +207,17 @@ else
|
||||
SRC_SERVICES_FILES:=$(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES))
|
||||
SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.PCMM,$(SRC_SERVICES_FILES))
|
||||
endif
|
||||
|
||||
# The number of services files are relatively few. If the increase in numbers, then
|
||||
# we have to use ListPathsSafelyNow here.
|
||||
# Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/newclasses/META-INF/services/yyyy
|
||||
# Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/classes/META-INF/services/yyyy
|
||||
# The \n in the printf command is needed to make sed work on Solaris.
|
||||
OUT_SERVICES_FILES:=$(addprefix $(JDK_OUTPUTDIR)/newclasses/META-INF/services/,\
|
||||
OUT_SERVICES_FILES:=$(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\
|
||||
$(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
|
||||
OUT_SERVICES_FILES_COLON:=$(addsuffix :,$(OUT_SERVICES_FILES))
|
||||
# Exception handling for print services with no META-INF directory
|
||||
SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/*)
|
||||
OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/newclasses/META-INF/services/,\
|
||||
OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\
|
||||
$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/%,%,\
|
||||
$(SRC_SERVICES_FILES_PRINT)))
|
||||
OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :,$(OUT_SERVICES_FILES_PRINT))
|
||||
@ -148,3 +236,45 @@ $(foreach i,$(META-INF_RULES_SERVICES),$(eval $(call addto_meta-inf_services,$i)
|
||||
|
||||
COPY_EXTRA += $(OUT_SERVICES_FILES)
|
||||
COPY_EXTRA += $(OUT_SERVICES_FILES_PRINT)
|
||||
|
||||
###
|
||||
|
||||
$(JDK_OUTPUTDIR)/classes/sun/nio/cs/ext/sjis0213.dat : $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs/ext/sjis0213.dat
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $(@)
|
||||
|
||||
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/nio/cs/ext/sjis0213.dat
|
||||
|
||||
###
|
||||
|
||||
JAVAX_SOUND_SRC := $(JDK_TOPDIR)/src/share/classes/com/sun/media/sound/services
|
||||
|
||||
JAVAX_SOUND_SRC_FILES := \
|
||||
javax.sound.midi.spi.MidiDeviceProvider \
|
||||
javax.sound.midi.spi.MidiFileReader \
|
||||
javax.sound.midi.spi.MidiFileWriter \
|
||||
javax.sound.midi.spi.SoundbankReader \
|
||||
javax.sound.sampled.spi.AudioFileReader \
|
||||
javax.sound.sampled.spi.AudioFileWriter \
|
||||
javax.sound.sampled.spi.FormatConversionProvider
|
||||
|
||||
COPY_EXTRA += $(foreach F,$(notdir $(JAVAX_SOUND_SRC_FILES)),$(JDK_OUTPUTDIR)/classes/META-INF/services/${F})
|
||||
|
||||
ifeq ($(PLATFORM)-$(ARCH),windows-ia64)
|
||||
JAVAX_SOUND_SRC_FILES += windows-ia64/javax.sound.sampled.spi.MixerProvider
|
||||
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
|
||||
else ifeq ($(PLATFORM),windows)
|
||||
JAVAX_SOUND_SRC_FILES += windows-i586/javax.sound.sampled.spi.MixerProvider
|
||||
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
|
||||
else ifeq ($(PLATFORM)-$(ARCH),linux-i586)
|
||||
JAVAX_SOUND_SRC_FILES += linux-i586/javax.sound.sampled.spi.MixerProvider
|
||||
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
|
||||
else
|
||||
JAVAX_SOUND_SRC_FILES += javax.sound.sampled.spi.MixerProvider
|
||||
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
|
||||
endif
|
||||
|
||||
JAVAX_SOUND_RULES := $(foreach F,$(JAVAX_SOUND_SRC_FILES),$(JDK_OUTPUTDIR)/classes/META-INF/services/$(notdir $F):$(JAVAX_SOUND_SRC)/$F)
|
||||
|
||||
$(foreach R,$(JAVAX_SOUND_RULES),$(eval $(call addto_meta-inf_services,$R)))
|
||||
|
@ -46,7 +46,7 @@ ifndef OPENJDK
|
||||
SAMPLE_TARGET += $(SAMPLE_CLOSED_TARGET)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
ifneq (, $(filter $(PLATFORM), solaris macosx))
|
||||
SAMPLE_SOLARIS_SOURCE := $(shell $(FIND) $(SAMPLE_SOLARIS_SOURCE_DIR) -type f -print)
|
||||
SAMPLE_SOLARIS_TARGET := $(subst $(SAMPLE_SOLARIS_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOLARIS_SOURCE))
|
||||
SAMPLE_TARGET += $(SAMPLE_SOLARIS_TARGET)
|
||||
@ -54,17 +54,17 @@ endif
|
||||
|
||||
$(SAMPLE_TARGET_DIR)/dtrace/%: $(SAMPLE_SOLARIS_SOURCE_DIR)/dtrace/%
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
$(SAMPLE_TARGET_DIR)/webservices/%: $(SAMPLE_CLOSED_SOURCE_DIR)/webservices/%
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
$(SAMPLE_TARGET_DIR)/%: $(SAMPLE_SOURCE_DIR)/%
|
||||
$(MKDIR) -p $(@D)
|
||||
rm -f $@
|
||||
$(RM) -f $@
|
||||
$(CP) $< $@
|
||||
|
||||
COPY_FILES += $(SAMPLE_TARGET)
|
||||
|
809
jdk/makefiles/CreateJars.gmk
Normal file
809
jdk/makefiles/CreateJars.gmk
Normal file
@ -0,0 +1,809 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
default: all
|
||||
|
||||
include Tools.gmk
|
||||
|
||||
|
||||
MAINMANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf
|
||||
BEANMANIFEST := $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest
|
||||
|
||||
JARS:=
|
||||
|
||||
##########################################################################################
|
||||
|
||||
JCONSOLE_JAR_DEPS := \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/classes/sun/tools/jconsole/ -name "_the.package") \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/classes/com/sun/tools/jconsole/ -name "_the.package")
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,$(JCONSOLE_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes,\
|
||||
SUFFIXES:=.class .gif .png,\
|
||||
INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
|
||||
JARMAIN:=sun.tools.jconsole.JConsole,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/jconsole.jar,\
|
||||
SKIP_METAINF:=true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/jconsole.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
DNS_JAR_DEPS := \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/classes/sun/net/spi/nameservice/dns/ -name "_the.package") \
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_DNS_JAR,$(DNS_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes,\
|
||||
INCLUDES:=sun/net/spi/nameservice/dns,\
|
||||
EXTRA_FILES:=META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/ext/dnsns.jar,\
|
||||
SKIP_METAINF:=true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/ext/dnsns.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
LOCALEDATA_INCLUDE_PATTERNS := \
|
||||
sun/text/resources/*_ar* \
|
||||
sun/text/resources/*_hi* \
|
||||
sun/text/resources/*_iw* \
|
||||
sun/text/resources/*_iw* \
|
||||
sun/text/resources/*_ja* \
|
||||
sun/text/resources/*_ko* \
|
||||
sun/text/resources/*_th.* \
|
||||
sun/text/resources/*_th_* \
|
||||
sun/text/resources/*_vi* \
|
||||
sun/text/resources/*_zh* \
|
||||
sun/text/resources/*Data_th \
|
||||
sun/text/resources/thai_dict \
|
||||
sun/util/resources/*_ar* \
|
||||
sun/util/resources/*_hi* \
|
||||
sun/util/resources/*_iw* \
|
||||
sun/util/resources/*_iw* \
|
||||
sun/util/resources/*_ja* \
|
||||
sun/util/resources/*_ko* \
|
||||
sun/util/resources/*_th_* \
|
||||
sun/util/resources/*_th.* \
|
||||
sun/util/resources/*_vi* \
|
||||
sun/util/resources/*_zh*
|
||||
|
||||
LOCALEDATA_INCLUDES := $(patsubst $(JDK_OUTPUTDIR)/classes/%,%,\
|
||||
$(foreach i,$(LOCALEDATA_INCLUDE_PATTERNS), $(wildcard $(JDK_OUTPUTDIR)/classes/$i)))
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes,\
|
||||
SUFFIXES:=.class _dict _th,\
|
||||
INCLUDES:=$(LOCALEDATA_INCLUDES),\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/ext/localedata.jar,\
|
||||
SKIP_METAINF:=true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/ext/localedata.jar
|
||||
|
||||
##########################################################################################
|
||||
# rt.jar and resources.jar are being built in the same way as in the old build. They require
|
||||
# the files to be in a certain order and converting that is not easy and will not be needed
|
||||
# in jigsaw anyway.
|
||||
|
||||
# Exclude list for rt.jar and resources.jar
|
||||
RT_JAR_EXCLUDES := \
|
||||
com/sun/javadoc \
|
||||
com/sun/jdi \
|
||||
com/sun/jarsigner \
|
||||
com/sun/source \
|
||||
com/sun/istack/internal/tools \
|
||||
META-INF/services/com.sun.jdi.connect.Connector \
|
||||
META-INF/services/com.sun.jdi.connect.spi.TransportService \
|
||||
META-INF/services/com.sun.tools.xjc.Plugin \
|
||||
com/sun/tools \
|
||||
sun/jvmstat \
|
||||
sun/nio/cs/ext \
|
||||
sun/awt/HKSCS.class \
|
||||
sun/awt/motif/X11GB2312\$$$$Decoder.class \
|
||||
sun/awt/motif/X11GB2312\$$$$Encoder.class \
|
||||
sun/awt/motif/X11GB2312.class \
|
||||
sun/awt/motif/X11GBK\$$$$Encoder.class \
|
||||
sun/awt/motif/X11GBK.class \
|
||||
sun/awt/motif/X11KSC5601\$$$$Decoder.class \
|
||||
sun/awt/motif/X11KSC5601\$$$$Encoder.class \
|
||||
sun/awt/motif/X11KSC5601.class \
|
||||
META-INF/services/java.nio.charset.spi.CharsetProvider \
|
||||
sun/rmi/rmic \
|
||||
sun/tools/asm \
|
||||
sun/tools/java \
|
||||
sun/tools/javac \
|
||||
com/sun/tools/classfile \
|
||||
com/sun/tools/javap \
|
||||
sun/tools/jcmd \
|
||||
sun/tools/jconsole \
|
||||
sun/tools/jps \
|
||||
sun/tools/jstat \
|
||||
sun/tools/jstatd \
|
||||
sun/tools/native2ascii \
|
||||
sun/tools/serialver \
|
||||
sun/tools/tree \
|
||||
sun/tools/util \
|
||||
sun/security/tools/JarBASE64Encoder.class \
|
||||
sun/security/tools/JarSigner.class \
|
||||
sun/security/tools/JarSignerParameters.class \
|
||||
sun/security/tools/JarSignerResources.class \
|
||||
sun/security/tools/JarSignerResources_ja.class \
|
||||
sun/security/tools/JarSignerResources_zh_CN.class \
|
||||
sun/security/tools/SignatureFile\$$$$Block.class \
|
||||
sun/security/tools/SignatureFile.class \
|
||||
sun/security/tools/TimestampedSigner.class \
|
||||
sun/security/provider/Sun.class \
|
||||
sun/security/rsa/SunRsaSign.class \
|
||||
sun/security/ssl \
|
||||
sun/security/ec/ECDHKeyAgreement.class \
|
||||
sun/security/ec/ECDSASignature\$$$$Raw.class \
|
||||
sun/security/ec/ECDSASignature\$$$$SHA1.class \
|
||||
sun/security/ec/ECDSASignature\$$$$SHA224.class \
|
||||
sun/security/ec/ECDSASignature\$$$$SHA256.class \
|
||||
sun/security/ec/ECDSASignature\$$$$SHA384.class \
|
||||
sun/security/ec/ECDSASignature\$$$$SHA512.class \
|
||||
sun/security/ec/ECDSASignature.class \
|
||||
sun/security/ec/ECKeyPairGenerator.class \
|
||||
sun/security/ec/SunEC\$$$$1.class \
|
||||
sun/security/ec/SunEC.class \
|
||||
sun/security/ec/SunECEntries.class \
|
||||
sun/security/pkcs11 \
|
||||
com/sun/net/ssl/internal/ssl \
|
||||
javax/crypto \
|
||||
sun/security/internal \
|
||||
com/sun/crypto/provider \
|
||||
META-INF/services/com.sun.tools.attach.spi.AttachProvider \
|
||||
com/sun/tools/attach \
|
||||
org/relaxng/datatype \
|
||||
com/sun/codemodel \
|
||||
com/sun/xml/internal/dtdparser \
|
||||
com/sun/xml/internal/rngom \
|
||||
com/sun/xml/internal/xsom \
|
||||
com/sun/tools/script/shell \
|
||||
sun/tools/attach \
|
||||
sun/tools/jstack \
|
||||
sun/tools/jinfo \
|
||||
sun/tools/jmap \
|
||||
sun/net/spi/nameservice/dns \
|
||||
META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
|
||||
javax/swing/beaninfo \
|
||||
javax/swing/AbstractButtonBeanInfo.class \
|
||||
javax/swing/BoxBeanInfo.class \
|
||||
javax/swing/JAppletBeanInfo.class \
|
||||
javax/swing/JButtonBeanInfo.class \
|
||||
javax/swing/JCheckBoxBeanInfo.class \
|
||||
javax/swing/JCheckBoxMenuItemBeanInfo.class \
|
||||
javax/swing/JColorChooserBeanInfo.class \
|
||||
javax/swing/JComboBoxBeanInfo.class \
|
||||
javax/swing/JComponentBeanInfo.class \
|
||||
javax/swing/JDesktopPaneBeanInfo.class \
|
||||
javax/swing/JDialogBeanInfo.class \
|
||||
javax/swing/JEditorPaneBeanInfo.class \
|
||||
javax/swing/JFileChooserBeanInfo.class \
|
||||
javax/swing/JFormattedTextFieldBeanInfo.class \
|
||||
javax/swing/JFrameBeanInfo.class \
|
||||
javax/swing/JInternalFrameBeanInfo.class \
|
||||
javax/swing/JLabelBeanInfo.class \
|
||||
javax/swing/JLayeredPaneBeanInfo.class \
|
||||
javax/swing/JListBeanInfo.class \
|
||||
javax/swing/JMenuBarBeanInfo.class \
|
||||
javax/swing/JMenuBeanInfo.class \
|
||||
javax/swing/JMenuItemBeanInfo.class \
|
||||
javax/swing/JOptionPaneBeanInfo.class \
|
||||
javax/swing/JPanelBeanInfo.class \
|
||||
javax/swing/JPasswordFieldBeanInfo.class \
|
||||
javax/swing/JPopupMenuBeanInfo.class \
|
||||
javax/swing/JProgressBarBeanInfo.class \
|
||||
javax/swing/JRadioButtonBeanInfo.class \
|
||||
javax/swing/JRadioButtonMenuItemBeanInfo.class \
|
||||
javax/swing/JScrollBarBeanInfo.class \
|
||||
javax/swing/JScrollPaneBeanInfo.class \
|
||||
javax/swing/JSeparatorBeanInfo.class \
|
||||
javax/swing/JSliderBeanInfo.class \
|
||||
javax/swing/JSpinnerBeanInfo.class \
|
||||
javax/swing/JSplitPaneBeanInfo.class \
|
||||
javax/swing/JTabbedPaneBeanInfo.class \
|
||||
javax/swing/JTableBeanInfo.class \
|
||||
javax/swing/JTextAreaBeanInfo.class \
|
||||
javax/swing/JTextFieldBeanInfo.class \
|
||||
javax/swing/JTextPaneBeanInfo.class \
|
||||
javax/swing/JToggleButtonBeanInfo.class \
|
||||
javax/swing/JToolBarBeanInfo.class \
|
||||
javax/swing/JTreeBeanInfo.class \
|
||||
javax/swing/JWindowBeanInfo.class \
|
||||
javax/swing/SwingBeanInfoBase.class \
|
||||
javax/swing/text/JTextComponentBeanInfo.class \
|
||||
sun/swing/BeanInfoUtils.class \
|
||||
$(LOCALEDATA_INCLUDES)
|
||||
|
||||
ifndef OPENJDK
|
||||
ifndef JAVASE_EMBEDDED
|
||||
RT_JAR_EXCLUDES += \
|
||||
com/oracle/jrockit/jfr \
|
||||
oracle/jrockit/jfr
|
||||
endif
|
||||
endif
|
||||
|
||||
# Find all files in the classes dir to use as dependencies. This could be more fine granular.
|
||||
ALL_FILES_IN_CLASSES := $(shell $(FIND) $(JDK_OUTPUTDIR)/classes -type f \
|
||||
| $(GREP) -v -e '/_the\.*' -e '^_the\.*')
|
||||
|
||||
RT_JAR_MANIFEST_FILE := $(JDK_OUTPUTDIR)/lib/_the.rt.jar_manifest
|
||||
RESOURCE_JAR_MANIFEST_FILE := $(JDK_OUTPUTDIR)/lib/_the.resources.jar_manifest
|
||||
|
||||
$(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
|
||||
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
|
||||
$(MAINMANIFEST) >> $@
|
||||
$(ECHO) >> $@
|
||||
$(CAT) $(BEANMANIFEST) >> $@
|
||||
|
||||
$(RESOURCE_JAR_MANIFEST_FILE): $(MAINMANIFEST)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
|
||||
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
|
||||
$(MAINMANIFEST) >> $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/_the.jars.exclude:
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@)
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/_the.jars.contents: $(BUILD_TOOLS) $(JDK_OUTPUTDIR)/lib/_the.jars.exclude \
|
||||
$(ALL_FILES_IN_CLASSES)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@.temp
|
||||
($(CD) $(JDK_OUTPUTDIR)/classes && \
|
||||
$(TOOL_JARREORDER) \
|
||||
-o $@.temp $(JDK_OUTPUTDIR)/lib/classlist $(JDK_OUTPUTDIR)/lib/_the.jars.exclude . )
|
||||
$(MV) $@.temp $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents: $(JDK_OUTPUTDIR)/lib/_the.jars.contents
|
||||
$(GREP) -e '\.class$$' $(JDK_OUTPUTDIR)/lib/_the.jars.contents > $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents: $(JDK_OUTPUTDIR)/lib/_the.jars.contents
|
||||
$(GREP) -v -e '\.class$$' -e '/_the\.*' -e '^_the\.*' $(JDK_OUTPUTDIR)/lib/_the.jars.contents > $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/rt.jar: $(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE)
|
||||
$(ECHO) Creating rt.jar
|
||||
$(CD) $(JDK_OUTPUTDIR)/classes && \
|
||||
$(JAR) cfm $@ $(RT_JAR_MANIFEST_FILE) \
|
||||
@$(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/resources.jar: $(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents \
|
||||
$(RESOURCE_JAR_MANIFEST_FILE)
|
||||
$(ECHO) Creating resources.jar
|
||||
$(CD) $(JDK_OUTPUTDIR)/classes && \
|
||||
$(JAR) cfm $@ $(RESOURCE_JAR_MANIFEST_FILE) \
|
||||
@$(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/rt.jar $(JDK_OUTPUTDIR)/lib/resources.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
CHARSETS_JAR_DEPS :=
|
||||
|
||||
ifneq ($(HOST_OS), windows)
|
||||
CHARSETS_EXTRA_FILES:=sun/awt/motif/X11GBK.class \
|
||||
sun/awt/motif/X11GB2312\$$$$Decoder.class \
|
||||
sun/awt/motif/X11GB2312.class \
|
||||
sun/awt/motif/X11KSC5601\$$$$Decoder.class \
|
||||
sun/awt/motif/X11KSC5601\$$$$Encoder.class \
|
||||
sun/awt/motif/X11GB2312\$$$$Encoder.class \
|
||||
sun/awt/motif/X11GBK\$$$$Encoder.class \
|
||||
sun/awt/motif/X11KSC5601.class
|
||||
endif
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,$(CHARSETS_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes, \
|
||||
SUFFIXES:=.class .dat,\
|
||||
INCLUDES:=sun/nio/cs/ext,\
|
||||
EXTRA_FILES := sun/awt/HKSCS.class \
|
||||
$(CHARSETS_EXTRA_FILES) \
|
||||
META-INF/services/java.nio.charset.spi.CharsetProvider, \
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/charsets.jar, \
|
||||
SKIP_METAINF := true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/charsets.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
$(eval $(call SetupArchive,BUILD_JFR_JAR,,\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes,\
|
||||
INCLUDES:=com/oracle/jrockit/jfr \
|
||||
oracle/jrockit/jfr,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/jfr.jar,\
|
||||
SKIP_METAINF:=true,\
|
||||
MANIFEST:=$(MAINMANIFEST)))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/jfr.jar
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_JSSE_JAR,,\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes,\
|
||||
INCLUDES:=sun/security/provider/Sun.class \
|
||||
sun/security/rsa/SunRsaSign.class \
|
||||
sun/security/ssl \
|
||||
com/sun/net/ssl/internal/ssl,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/jsse.jar,\
|
||||
SKIP_METAINF:=true,\
|
||||
MANIFEST:=$(MAINMANIFEST)))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/jsse.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifneq ($(PLATFORM)-$(ARCH_DATA_MODEL),windows-64)
|
||||
SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
|
||||
|
||||
$(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
|
||||
@$(ECHO) "\n>>>Installing prebuilt SunPKCS11 provider..."
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
else
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,$(SUNPKCS11_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes, \
|
||||
SUFFIXES:=.class,\
|
||||
INCLUDES:=sun/security/pkcs11,\
|
||||
JAR:=$(SUNPKCS11_JAR_DST), \
|
||||
SKIP_METAINF := true))
|
||||
|
||||
endif
|
||||
|
||||
JARS += $(SUNPKCS11_JAR_DST)
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
|
||||
|
||||
$(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
|
||||
@$(ECHO) "\n>>>Installing prebuilt SunEC provider..."
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
else
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes, \
|
||||
SUFFIXES:=.class,\
|
||||
INCLUDES:=sun/security/ec,\
|
||||
EXCLUDE_FILES := sun/security/ec/ECKeyFactory.class \
|
||||
sun/security/ec/ECParameters.class \
|
||||
sun/security/ec/ECPrivateKeyImpl.class \
|
||||
sun/security/ec/ECPublicKeyImpl.class \
|
||||
sun/security/ec/NamedCurve.class \
|
||||
sun/security/ec/ECKeyFactory*,\
|
||||
JAR:=$(SUNEC_JAR_DST), \
|
||||
SKIP_METAINF := true))
|
||||
|
||||
endif
|
||||
|
||||
JARS += $(SUNEC_JAR_DST)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,,\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes,\
|
||||
SUFFIXES:=BeanInfo.class .gif,\
|
||||
INCLUDES:=javax/swing sun/swing,\
|
||||
EXCLUDES:=javax/swing/plaf,\
|
||||
EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/dt.jar,\
|
||||
SKIP_METAINF:=true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/dt.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar
|
||||
|
||||
ifndef OPENJDK
|
||||
SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
|
||||
|
||||
$(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_SRC)
|
||||
@$(ECHO) "\n>>>Installing prebuilt SunJCE provider..."
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
else
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,$(SUNJCE_PROVIDER_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes, \
|
||||
SUFFIXES:=.class,\
|
||||
INCLUDES:= com/sun/crypto/provider,\
|
||||
JAR:=$(SUNJCE_PROVIDER_JAR_DST), \
|
||||
MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
|
||||
EXTRA_MANIFEST_ATTR := Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
|
||||
SKIP_METAINF := true))
|
||||
endif
|
||||
|
||||
JARS += $(SUNJCE_PROVIDER_JAR_DST)
|
||||
|
||||
JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
|
||||
|
||||
$(JCE_JAR_DST) : $(JCE_JAR_SRC)
|
||||
@$(ECHO) "\n>>>Installing prebuilt jce.jar..."
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
else
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_JCE_JAR,$(JCE_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes, \
|
||||
SUFFIXES:=.class,\
|
||||
INCLUDES:= javax/crypto sun/security/internal,\
|
||||
JAR:=$(JCE_JAR_DST), \
|
||||
MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
|
||||
EXTRA_MANIFEST_ATTR := Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
|
||||
SKIP_METAINF := true))
|
||||
endif
|
||||
|
||||
JARS += $(JCE_JAR_DST)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifdef OPENJDK
|
||||
|
||||
#
|
||||
# TODO fix so that SetupArchive does not write files into SRCS
|
||||
# then we don't need this extra copying
|
||||
#
|
||||
US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
|
||||
US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
|
||||
US_EXPORT_POLICY_JAR_TMP := $(JDK_OUTPUTDIR)/US_export_policy_jar.tmp
|
||||
|
||||
$(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
|
||||
SRCS:=$(US_EXPORT_POLICY_JAR_TMP), \
|
||||
SUFFIXES:= .policy,\
|
||||
JAR:=$(US_EXPORT_POLICY_JAR_DST), \
|
||||
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
|
||||
SKIP_METAINF := true))
|
||||
|
||||
JARS += $(US_EXPORT_POLICY_JAR_DST)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
|
||||
ifdef OPENJDK
|
||||
|
||||
#
|
||||
# TODO fix so that SetupArchive does not write files into SRCS
|
||||
# then we don't need this extra copying
|
||||
#
|
||||
LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
|
||||
LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
|
||||
LOCAL_POLICY_JAR_TMP := $(JDK_OUTPUTDIR)/local_policy_jar.tmp
|
||||
|
||||
LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy $(LOCAL_POLICY_JAR_TMP)/default_local.policy
|
||||
|
||||
$(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
|
||||
SRCS:=$(LOCAL_POLICY_JAR_TMP),\
|
||||
SUFFIXES:= .policy,\
|
||||
JAR:=$(LOCAL_POLICY_JAR_DST), \
|
||||
EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
|
||||
SKIP_METAINF := true))
|
||||
|
||||
JARS += $(LOCAL_POLICY_JAR_DST)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifeq ($(PLATFORM),windows)
|
||||
|
||||
SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
|
||||
|
||||
ifndef OPENJDK
|
||||
SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
|
||||
|
||||
$(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_SRC)
|
||||
@$(ECHO) "\n>>>Installing prebuilt SunMSCAPI provider..."
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
else
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,$(SUNMSCAPI_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes, \
|
||||
SUFFIXES:=.class,\
|
||||
INCLUDES:= sun/security/mscapi,\
|
||||
JAR:=$(SUNMSCAPI_JAR_DST), \
|
||||
MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
|
||||
EXTRA_MANIFEST_ATTR := Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
|
||||
SKIP_METAINF := true))
|
||||
endif
|
||||
|
||||
JARS += $(SUNMSCAPI_JAR_DST)
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
ifndef OPENJDK
|
||||
|
||||
UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
|
||||
UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
|
||||
|
||||
$(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC)
|
||||
@$(ECHO) "\n>>>Installing prebuilt OracleUcrypto provider..."
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
JARS += $(UCRYPTO_JAR_DST)
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
TOOLS_JAR_INCLUDES := \
|
||||
sun/tools/asm \
|
||||
sun/tools/jar \
|
||||
sun/tools/java \
|
||||
sun/tools/javac \
|
||||
sun/tools/jcmd \
|
||||
sun/tools/jps \
|
||||
sun/tools/jstat \
|
||||
sun/tools/jstatd \
|
||||
sun/tools/native2ascii \
|
||||
sun/tools/serialver \
|
||||
sun/tools/tree \
|
||||
sun/tools/util \
|
||||
sun/security/tools/JarBASE64Encoder.class \
|
||||
sun/security/tools/JarSigner.class \
|
||||
sun/security/tools/JarSignerParameters.class \
|
||||
sun/security/tools/JarSignerResources.class \
|
||||
sun/security/tools/JarSignerResources_ja.class \
|
||||
sun/security/tools/JarSignerResources_zh_CN.class \
|
||||
sun/security/tools/SignatureFile* \
|
||||
sun/security/tools/TimestampedSigner.class \
|
||||
sun/rmi/rmic \
|
||||
sun/applet \
|
||||
sun/jvmstat \
|
||||
com/sun/javadoc \
|
||||
com/sun/jdi \
|
||||
com/sun/jarsigner \
|
||||
com/sun/source \
|
||||
com/sun/tools/classfile \
|
||||
com/sun/tools/doclets \
|
||||
com/sun/tools/example/debug/expr \
|
||||
com/sun/tools/example/debug/tty \
|
||||
com/sun/tools/extcheck \
|
||||
com/sun/tools/hat \
|
||||
com/sun/tools/javac \
|
||||
com/sun/tools/javadoc \
|
||||
com/sun/tools/javah \
|
||||
com/sun/tools/javap \
|
||||
com/sun/tools/corba \
|
||||
com/sun/tools/internal/xjc \
|
||||
com/sun/tools/internal/ws \
|
||||
com/sun/istack/internal/tools \
|
||||
com/sun/tools/internal/jxc/ap \
|
||||
com/sun/tools/internal/ws/wscompile/plugin/at_generated \
|
||||
com/sun/codemodel \
|
||||
com/sun/tools/internal/jxc \
|
||||
com/sun/xml/internal/rngom \
|
||||
com/sun/xml/internal/xsom \
|
||||
org/relaxng/datatype \
|
||||
com/sun/xml/internal/dtdparser \
|
||||
com/sun/tools/jdi \
|
||||
com/sun/tools/script/shell \
|
||||
com/sun/tools/attach \
|
||||
sun/tools/attach \
|
||||
sun/tools/jstack \
|
||||
sun/tools/jinfo \
|
||||
sun/tools/jmap
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_TOOLS_JAR,$(TOOLS_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes,\
|
||||
SUFFIXES:=.class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
|
||||
Tool aliasmap options,\
|
||||
INCLUDES:=$(TOOLS_JAR_INCLUDES),\
|
||||
EXTRA_FILES:=META-INF/services/com.sun.jdi.connect.Connector \
|
||||
META-INF/services/com.sun.jdi.connect.spi.TransportService \
|
||||
META-INF/services/com.sun.tools.attach.spi.AttachProvider \
|
||||
META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
|
||||
META-INF/services/com.sun.tools.internal.xjc.Plugin,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/tools.jar,\
|
||||
SKIP_METAINF:=true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/tools.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
include $(JDK_TOPDIR)/makefiles/docs/CORE_PKGS.gmk
|
||||
include $(JDK_TOPDIR)/makefiles/docs/NON_CORE_PKGS.gmk
|
||||
|
||||
# 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.
|
||||
EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
|
||||
com.sun.java.swing.plaf.motif \
|
||||
com.sun.java.swing.plaf.gtk
|
||||
|
||||
#
|
||||
# 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).
|
||||
#
|
||||
EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
|
||||
com.oracle.net \
|
||||
com.oracle.nio
|
||||
|
||||
$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(JDK_OUTPUTDIR)/lib/rt.jar
|
||||
$(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
|
||||
$(JAVA) \
|
||||
-Xbootclasspath/a:$(JDK_OUTPUTDIR)/classes \
|
||||
$(JAVAC_JARS) \
|
||||
-XDprocess.packages -proc:only \
|
||||
-processor com.sun.tools.javac.sym.CreateSymbols \
|
||||
-Acom.sun.tools.javac.sym.Jar=$(JDK_OUTPUTDIR)/lib/rt.jar \
|
||||
-Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
|
||||
$(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
|
||||
$(TOUCH) $@
|
||||
|
||||
MAKE_SURE_DIR_EXISTS_DUMMY := $(shell $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols)
|
||||
$(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
|
||||
SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
|
||||
INCLUDES:=META-INF/sym,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/ct.sym))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/ct.sym
|
||||
|
||||
##########################################################################################
|
||||
|
||||
SRC_ZIP_INCLUDES = \
|
||||
java/applet \
|
||||
java/awt \
|
||||
java/beans \
|
||||
java/io \
|
||||
java/lang \
|
||||
java/math \
|
||||
java/net \
|
||||
java/nio \
|
||||
java/rmi \
|
||||
java/security \
|
||||
java/sql \
|
||||
java/text \
|
||||
java/util \
|
||||
com/sun/corba \
|
||||
com/sun/image/codec/jpeg \
|
||||
com/sun/imageio \
|
||||
com/sun/java/swing \
|
||||
com/sun/javadoc \
|
||||
com/sun/jmx \
|
||||
com/sun/source \
|
||||
com/sun/naming \
|
||||
com/sun/security/auth \
|
||||
com/sun/security/jgss \
|
||||
javax/accessibility \
|
||||
javax/annotation \
|
||||
javax/script \
|
||||
javax/imageio \
|
||||
javax/lang \
|
||||
javax/management \
|
||||
javax/naming \
|
||||
javax/print \
|
||||
javax/rmi \
|
||||
javax/security \
|
||||
javax/sound \
|
||||
javax/sql \
|
||||
javax/swing \
|
||||
javax/tools \
|
||||
javax/xml \
|
||||
com/sun/org/apache \
|
||||
com/sun/java_cup \
|
||||
com/sun/jlex \
|
||||
org/ietf \
|
||||
org/omg \
|
||||
org/w3c/dom \
|
||||
org/xml/sax \
|
||||
sunw
|
||||
|
||||
SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes
|
||||
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
|
||||
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/impsrc
|
||||
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
|
||||
ifndef OPENJDK
|
||||
SRC_ZIP_SRCS += $(JDK_TOPDIR)/src/closed/share/classes
|
||||
endif
|
||||
|
||||
# Need to copy launcher src files into desired directory structure
|
||||
# before zipping the sources.
|
||||
LAUNCHER_SRC_FILES := $(wildcard $(JDK_TOPDIR)/src/share/bin/*) \
|
||||
$(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/java_md*)
|
||||
LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
|
||||
$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
|
||||
$(LAUNCHER_SRC_FILES)))
|
||||
|
||||
$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/%
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
$(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
|
||||
|
||||
# This dir needs to exsist before macro is evaluated to avoid warning from find.
|
||||
MAKE_SURE_DIR_EXISTS_DUMMY := $(shell $(MKDIR) -p $(IMAGES_OUTPUTDIR)/src)
|
||||
$(eval $(call SetupZipArchive,BUILD_SRC_ZIP,\
|
||||
SRC:=$(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src,\
|
||||
INCLUDES:=$(SRC_ZIP_INCLUDES) launcher,\
|
||||
SUFFIXES:=.java .c .h,\
|
||||
ZIP:=$(IMAGES_OUTPUTDIR)/src.zip,\
|
||||
EXTRA_DEPS:=$(LAUNCHER_ZIP_SRC)))
|
||||
|
||||
JARS+=$(IMAGES_OUTPUTDIR)/src.zip
|
||||
|
||||
##########################################################################################
|
||||
|
||||
all: $(JARS)
|
||||
|
||||
.PHONY: default all
|
@ -62,7 +62,7 @@ $(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR,\
|
||||
UNICODEDATA = $(JDK_TOPDIR)/make/tools/UnicodeData/UnicodeData.txt
|
||||
|
||||
# output
|
||||
DATA_PKG_DIR = $(JDK_OUTPUTDIR)/newclasses/sun/text/resources
|
||||
DATA_PKG_DIR = $(JDK_OUTPUTDIR)/classes/sun/text/resources
|
||||
BIFILES = $(DATA_PKG_DIR)/CharacterBreakIteratorData \
|
||||
$(DATA_PKG_DIR)/WordBreakIteratorData \
|
||||
$(DATA_PKG_DIR)/LineBreakIteratorData \
|
||||
@ -75,23 +75,23 @@ $(BREAK_ITERATOR_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITER
|
||||
$(BREAK_ITERATOR_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
|
||||
$(ECHO) "Generating BreakIteratorData"
|
||||
$(MKDIR) -p $(DATA_PKG_DIR)
|
||||
rm -f $(BIFILES)
|
||||
$(RM) -f $(BIFILES)
|
||||
$(TOOL_GENERATEBREAKITERATORDATA) \
|
||||
-o $(DATA_PKG_DIR) \
|
||||
-spec $(UNICODEDATA)
|
||||
touch $@
|
||||
$(TOUCH) $@
|
||||
|
||||
$(BIFILES_TH): $(BREAK_ITERATOR_DIR)/_the.bifiles_th
|
||||
$(BREAK_ITERATOR_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
|
||||
$(BREAK_ITERATOR_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
|
||||
$(ECHO) "Generating BreakIteratorData_th"
|
||||
$(MKDIR) -p $(DATA_PKG_DIR)
|
||||
rm -f $(BIFILES_TH)
|
||||
$(RM) -f $(BIFILES_TH)
|
||||
$(TOOL_GENERATEBREAKITERATORDATA) \
|
||||
-o $(DATA_PKG_DIR) \
|
||||
-spec $(UNICODEDATA) \
|
||||
-language th
|
||||
touch $@
|
||||
$(TOUCH) $@
|
||||
|
||||
|
||||
BREAK_ITERATOR += $(BIFILES) $(BIFILES_TH)
|
||||
|
84
jdk/makefiles/GendataFontConfig.gmk
Normal file
84
jdk/makefiles/GendataFontConfig.gmk
Normal file
@ -0,0 +1,84 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
GENDATA_FONT_CONFIG_DST := $(JDK_OUTPUTDIR)/lib
|
||||
|
||||
ifeq ($(PLATFORM), windows)
|
||||
GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows
|
||||
GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
|
||||
GENDATA_FONT_CONFIG_SRC_PREFIX :=
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), linux)
|
||||
GENDATA_FONT_CONFIG_SRC_PREFIX := linux.
|
||||
ifdef OPENJDK
|
||||
GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
|
||||
GENDATA_FONT_CONFIG_SRC_FILES := \
|
||||
fontconfig.properties \
|
||||
fontconfig.SuSE.properties \
|
||||
fontconfig.Ubuntu.properties \
|
||||
fontconfig.Fedora.properties
|
||||
else
|
||||
GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/closed/solaris/classes/sun/awt/fontconfigs
|
||||
GENDATA_FONT_CONFIG_SRC_FILES := \
|
||||
fontconfig.properties \
|
||||
fontconfig.RedHat.5.properties \
|
||||
fontconfig.RedHat.6.properties \
|
||||
fontconfig.Turbo.properties \
|
||||
fontconfig.SuSE.10.properties \
|
||||
fontconfig.SuSE.11.properties
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
|
||||
GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
|
||||
GENDATA_FONT_CONFIG_SRC_PREFIX := solaris.
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
|
||||
GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
|
||||
GENDATA_FONT_CONFIG_SRC_PREFIX := macosx.
|
||||
endif # PLATFORM
|
||||
|
||||
###
|
||||
|
||||
$(GENDATA_FONT_CONFIG_DST)/%.src : $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
$(GENDATA_FONT_CONFIG_DST)/%.bfc : $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%.properties
|
||||
$(MKDIR) -p $(@D)
|
||||
$(TOOL_COMPILEFONTCONFIG) $< $@
|
||||
|
||||
###
|
||||
|
||||
GENDATA_FONT_CONFIGS := $(GENDATA_FONT_CONFIG_SRC_FILES:%=$(GENDATA_FONT_CONFIG_DST)/%.src)
|
||||
GENDATA_BFONT_CONFIGS := $(GENDATA_FONT_CONFIG_SRC_FILES:%.properties=$(GENDATA_FONT_CONFIG_DST)/%.bfc)
|
||||
|
||||
GENDATA_FONT_CONFIG := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)
|
||||
|
||||
###
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# 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
|
||||
@ -23,17 +23,14 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile for building com/apple
|
||||
#
|
||||
GENDATA_HTML32DTD :=
|
||||
|
||||
BUILDDIR = ../..
|
||||
PRODUCT = sun
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
HTML32DTD = $(JDK_OUTPUTDIR)/classes/javax/swing/text/html/parser/html32.bdtd
|
||||
$(HTML32DTD): $(BUILD_TOOLS)
|
||||
$(ECHO) "Generating HTML DTD file"
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
($(TOOL_DTDBUILDER) html32 > $@) || exit 1
|
||||
|
||||
SUBDIRS = osx osxui
|
||||
GENDATA_HTML32DTD += $(HTML32DTD)
|
||||
|
||||
include $(BUILDDIR)/common/Subdirs.gmk
|
||||
|
||||
all build clean clobber::
|
||||
$(SUBDIRS-loop)
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -23,49 +23,34 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Makefile for building javazic utility & TimeZone resource files
|
||||
GENDATA_TIMEZONE :=
|
||||
|
||||
# TODO: read from make/sun/javazic/tzdata/VERSION
|
||||
GENDATA_TIMEZONE_VERSION := tzdata2012c
|
||||
|
||||
BUILDDIR = ../..
|
||||
PACKAGE = sun.javazic
|
||||
PRODUCT = sun
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
GENDATA_TIMEZONE_DST := $(JDK_OUTPUTDIR)/lib/zi
|
||||
GENDATA_TIMEZONE_TMP := $(JDK_OUTPUTDIR)/gendata_timezone
|
||||
|
||||
# Time zone data file creation
|
||||
TZDATA = $(BUILDDIR)/../make/sun/javazic/tzdata/
|
||||
TZDATA_VER = `$(GREP) '^tzdata' $(TZDATA)VERSION`
|
||||
TZFILE = \
|
||||
TZFILE0 := \
|
||||
africa antarctica asia australasia europe northamerica \
|
||||
pacificnew southamerica backward \
|
||||
etcetera solar87 solar88 solar89 systemv
|
||||
JDKTZDATA = $(BUILDDIR)/../make/sun/javazic/tzdata_jdk/
|
||||
JDKTZFILES = gmt jdk11_backward
|
||||
TZFILES = \
|
||||
$(addprefix $(TZDATA),$(TZFILE)) \
|
||||
$(addprefix $(JDKTZDATA),$(JDKTZFILES))
|
||||
|
||||
WORKDIR = $(TEMPDIR)/zi
|
||||
INSTALLDIR = $(LIBDIR)/zi
|
||||
MAPFILE = ZoneInfoMappings
|
||||
TZFILE1 := \
|
||||
gmt jdk11_backward
|
||||
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
include $(BUILDDIR)/common/Classes.gmk
|
||||
TZFILES := \
|
||||
$(addprefix $(JDK_TOPDIR)/make/sun/javazic/tzdata/,$(TZFILE0)) \
|
||||
$(addprefix $(JDK_TOPDIR)/make/sun/javazic/tzdata_jdk/,$(TZFILE1))
|
||||
|
||||
# Add to the build rule
|
||||
build: $(INSTALLDIR)/$(MAPFILE)
|
||||
GENDATA_TIMEZONE_MAPFILE:=ZoneInfoMappings
|
||||
|
||||
$(WORKDIR)/$(MAPFILE): $(BUILD_TOOLS) $(TZFILES)
|
||||
$(RM) -r $(@D)
|
||||
$(prep-target)
|
||||
$(TOOL_JAVAZIC) -V "$(TZDATA_VER)" -d $(WORKDIR) $(TZFILES)
|
||||
@$(java-vm-cleanup)
|
||||
$(GENDATA_TIMEZONE_DST)/$(GENDATA_TIMEZONE_MAPFILE) : $(TZFILES)
|
||||
$(RM) -rf $(GENDATA_TIMEZONE_TMP)
|
||||
$(MKDIR) -p $(GENDATA_TIMEZONE_TMP)
|
||||
$(RM) -rf $(GENDATA_TIMEZONE_DST)
|
||||
$(MKDIR) -p $(GENDATA_TIMEZONE_DST)
|
||||
$(TOOL_JAVAZIC) -V "$(GENDATA_TIMEZONE_VERSION)" -d $(GENDATA_TIMEZONE_TMP) $(TZFILES)
|
||||
$(CP) -r $(GENDATA_TIMEZONE_TMP)/* $(GENDATA_TIMEZONE_DST)/
|
||||
|
||||
$(INSTALLDIR)/$(MAPFILE): $(WORKDIR)/$(MAPFILE)
|
||||
$(RM) -r $(@D)
|
||||
$(prep-target)
|
||||
$(CP) -r $(WORKDIR)/* $(@D)
|
||||
|
||||
clean clobber::
|
||||
$(RM) -r $(TEMPDIR) $(INSTALLDIR)
|
||||
GENDATA_TIMEZONE += $(GENDATA_TIMEZONE_DST)/$(GENDATA_TIMEZONE_MAPFILE)
|
@ -30,12 +30,9 @@ include MakeBase.gmk
|
||||
include RMICompile.gmk
|
||||
|
||||
CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
|
||||
# Depend on files in newclasses for now to avoid bad dependency handling caused by
|
||||
# copy always updating timestamps in classes.
|
||||
NEWCLASSES_DIR := $(JDK_OUTPUTDIR)/newclasses
|
||||
# Generate classes into separate dir for now. Can't drop in same dir as JavaCompilation
|
||||
# macros as that will mess up recompile deps.
|
||||
STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/newrmicclasses
|
||||
# NOTE: If the smart javac dependency management is reintroduced, these classes risk
|
||||
# interfering with the dependency checking. In that case they will need to be kept separate.
|
||||
STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/rmicclasses
|
||||
RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
|
||||
|
||||
GENCLASSES :=
|
||||
@ -49,7 +46,7 @@ $(eval $(call SetupRMICompilation,RMI_12,\
|
||||
CLASSES:=sun.rmi.server.Activation$$$$ActivationSystemImpl\
|
||||
java.rmi.activation.ActivationGroup\
|
||||
com.sun.jndi.rmi.registry.ReferenceWrapper,\
|
||||
CLASSES_DIR:=$(NEWCLASSES_DIR),\
|
||||
CLASSES_DIR:=$(CLASSES_DIR),\
|
||||
STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
|
||||
RUN_V12:=true))
|
||||
GENCLASSES += $(RMI_12)
|
||||
@ -57,7 +54,7 @@ GENCLASSES += $(RMI_12)
|
||||
$(eval $(call SetupRMICompilation,RMI_11,\
|
||||
CLASSES:=sun.rmi.registry.RegistryImpl\
|
||||
sun.rmi.transport.DGCImpl,\
|
||||
CLASSES_DIR:=$(NEWCLASSES_DIR),\
|
||||
CLASSES_DIR:=$(CLASSES_DIR),\
|
||||
STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
|
||||
RUN_V11:=true))
|
||||
GENCLASSES += $(RMI_11)
|
||||
@ -69,7 +66,7 @@ JMAN_RMI_CLASSES:=javax.management.remote.rmi.RMIConnectionImpl\
|
||||
javax.management.remote.rmi.RMIServerImpl
|
||||
$(eval $(call SetupRMICompilation,RMI_IIOP,\
|
||||
CLASSES:=$(JMAN_RMI_CLASSES),\
|
||||
CLASSES_DIR:=$(NEWCLASSES_DIR),\
|
||||
CLASSES_DIR:=$(CLASSES_DIR),\
|
||||
STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
|
||||
RUN_V12:=true,\
|
||||
RUN_IIOP:=true,\
|
||||
@ -80,7 +77,7 @@ GENCLASSES += $(RMI_IIOP)
|
||||
# so that javadoc can include them in the API (4997471)
|
||||
$(eval $(call SetupRMICompilation,RMI_SRC,\
|
||||
CLASSES:=$(JMAN_RMI_CLASSES),\
|
||||
CLASSES_DIR:=$(NEWCLASSES_DIR),\
|
||||
CLASSES_DIR:=$(CLASSES_DIR),\
|
||||
STUB_CLASSES_DIR:=$(RMIC_GENSRC_DIR),\
|
||||
RUN_V12:=true,\
|
||||
KEEP_GENERATED:=true))
|
||||
|
@ -35,11 +35,43 @@ include Setup.gmk
|
||||
include Tools.gmk
|
||||
|
||||
# Now include all the rules that generate data resources.
|
||||
# These are written directly into newclasses dir.
|
||||
# These are written directly into classes dir.
|
||||
GENDATA :=
|
||||
|
||||
include GendataBreakIterator.gmk
|
||||
GENDATA += $(BREAK_ITERATOR)
|
||||
|
||||
include GendataFontConfig.gmk
|
||||
GENDATA += $(GENDATA_FONT_CONFIG)
|
||||
|
||||
include GendataTimeZone.gmk
|
||||
GENDATA += $(GENDATA_TIMEZONE)
|
||||
|
||||
include GendataHtml32dtd.gmk
|
||||
GENDATA += $(GENDATA_HTML32DTD)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
GENDATA_UNINAME := $(JDK_OUTPUTDIR)/classes/java/lang/uniName.dat
|
||||
|
||||
$(GENDATA_UNINAME): $(JDK_TOPDIR)/make/tools/UnicodeData/UnicodeData.txt $(BUILD_TOOLS)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(TOOL_CHARACTERNAME) $< $@
|
||||
|
||||
GENDATA += $(GENDATA_UNINAME)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
GENDATA_CURDATA := $(JDK_OUTPUTDIR)/lib/currency.data
|
||||
|
||||
$(GENDATA_CURDATA): $(JDK_TOPDIR)/src/share/classes/java/util/CurrencyData.properties $(BUILD_TOOLS)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(TOOL_GENERATECURRENCYDATA) -o $@.temp < $<
|
||||
$(MV) $@.temp $@
|
||||
|
||||
GENDATA += $(GENDATA_CURDATA)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
$(GENDATA) : $(BUILD_TOOLS)
|
||||
|
@ -53,16 +53,57 @@ GENSRC += $(GENSRC_JDWP)
|
||||
include GensrcMisc.gmk
|
||||
GENSRC += $(GENSRC_MISC)
|
||||
|
||||
include GensrcCharsetMapping.gmk
|
||||
GENSRC += $(GENSRC_CHARSETMAPPING)
|
||||
|
||||
include GensrcCharsetCoder.gmk
|
||||
GENSRC += $(GENSRC_CHARSETCODER)
|
||||
|
||||
include GensrcBuffer.gmk
|
||||
GENSRC += $(GENSRC_BUFFER)
|
||||
|
||||
include GensrcExceptions.gmk
|
||||
GENSRC += $(GENSRC_EXCEPTIONS)
|
||||
|
||||
ifneq ($(HOST_OS),windows)
|
||||
include GensrcIcons.gmk
|
||||
GENSRC += $(GENSRC_ICONS)
|
||||
|
||||
include GensrcX11Wrappers.gmk
|
||||
GENSRC += $(GENSRC_X11WRAPPERS)
|
||||
endif
|
||||
|
||||
include GensrcSwing.gmk
|
||||
ifndef DISABLE_NIMBUS
|
||||
GENSRC += $(GENSRC_SWING_NIMBUS)
|
||||
endif
|
||||
|
||||
$(GENSRC) : $(BUILD_TOOLS)
|
||||
|
||||
all: $(GENSRC)
|
||||
# The exception handling of swing beaninfo
|
||||
# gensrc_swing/javax/swing/beaninfo/* have not be in src.zip
|
||||
all: $(GENSRC) $(GENSRC_SWING_BEANINFO)
|
||||
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc
|
||||
(cd $(JDK_OUTPUTDIR) && \
|
||||
chmod -R u+rw gensrc && \
|
||||
cp -rp gensrc_characterdata/* gensrc && \
|
||||
cp -rp gensrc_properties/* gensrc && \
|
||||
cp -rp gensrc_localedatametainfo/* gensrc && \
|
||||
cp -rp gensrc_jdwp/* gensrc && \
|
||||
cp -rp gensrc_misc/* gensrc)
|
||||
$(CHMOD) -R u+rw gensrc && \
|
||||
$(CP) -rp gensrc_characterdata/* gensrc && \
|
||||
$(CP) -rp gensrc_properties/* gensrc && \
|
||||
$(CP) -rp gensrc_localedatametainfo/* gensrc && \
|
||||
$(CP) -rp gensrc_jdwp/* gensrc && \
|
||||
$(CP) -rp gensrc_misc/* gensrc && \
|
||||
$(CP) -rp gensrc_charsetmapping/* gensrc && \
|
||||
$(CP) -rp gensrc_charsetcoder/* gensrc && \
|
||||
$(CP) -rp gensrc_exceptions/* gensrc && \
|
||||
$(CP) -rp gensrc_buffer/* gensrc)
|
||||
if [ -d $(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/plaf ] ; then \
|
||||
(cd $(JDK_OUTPUTDIR) && \
|
||||
$(MKDIR) -p gensrc/javax/swing/plaf && \
|
||||
$(CP) -rp gensrc_swing/javax/swing/plaf/* gensrc/javax/swing/plaf) \
|
||||
fi
|
||||
ifneq ($(HOST_OS),windows)
|
||||
(cd $(JDK_OUTPUTDIR) && \
|
||||
$(CP) -rp gensrc_icons/* gensrc && \
|
||||
$(CP) -rp gensrc_x11wrappers/classes/* gensrc)
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
|
371
jdk/makefiles/GensrcBuffer.gmk
Normal file
371
jdk/makefiles/GensrcBuffer.gmk
Normal file
@ -0,0 +1,371 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
GENSRC_BUFFER :=
|
||||
|
||||
GENSRC_BUFFER_TMP := $(JDK_OUTPUTDIR)/gensrc_buffer
|
||||
GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc_buffer/java/nio
|
||||
|
||||
GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_BUFFER_DST)/_the.dir :
|
||||
$(ECHO) "Generating buffer classes"
|
||||
$(MKDIR) -p $(@D)
|
||||
$(TOUCH) $@
|
||||
|
||||
define fixRw
|
||||
$1_RW := $2
|
||||
$1_rwkey := rw
|
||||
ifeq (R,$2)
|
||||
$1_rwkey := ro
|
||||
endif
|
||||
endef
|
||||
|
||||
define typesAndBits
|
||||
# param 1 target
|
||||
# param 2 type
|
||||
# param 3 BO
|
||||
$1_a := a
|
||||
$1_A := A
|
||||
|
||||
$1_type := $2
|
||||
|
||||
ifeq ($2, byte)
|
||||
$1_x := b
|
||||
$1_Type := Byte
|
||||
$1_fulltype := byte
|
||||
$1_Fulltype := Byte
|
||||
$1_category := integralType
|
||||
$1_LBPV := 0
|
||||
endif
|
||||
|
||||
ifeq ($2, char)
|
||||
$1_x := c
|
||||
$1_Type := Char
|
||||
$1_fulltype := character
|
||||
$1_Fulltype := Character
|
||||
$1_category := integralType
|
||||
$1_LBPV := 1
|
||||
endif
|
||||
|
||||
ifeq ($2, short)
|
||||
$1_x := s
|
||||
$1_Type := Short
|
||||
$1_fulltype := short
|
||||
$1_Fulltype := Short
|
||||
$1_category := integralType
|
||||
$1_LBPV := 1
|
||||
endif
|
||||
|
||||
ifeq ($2, int)
|
||||
$1_a := an
|
||||
$1_A := An
|
||||
$1_x := i
|
||||
$1_Type := Int
|
||||
$1_fulltype := integer
|
||||
$1_Fulltype := Integer
|
||||
$1_category := integralType
|
||||
$1_LBPV := 2
|
||||
endif
|
||||
|
||||
ifeq ($2, long)
|
||||
$1_x := l
|
||||
$1_Type := Long
|
||||
$1_fulltype := long
|
||||
$1_Fulltype := Long
|
||||
$1_category := integralType
|
||||
$1_LBPV := 3
|
||||
endif
|
||||
|
||||
ifeq ($2, float)
|
||||
$1_x := f
|
||||
$1_Type := Float
|
||||
$1_fulltype := float
|
||||
$1_Fulltype := Float
|
||||
$1_category := floatingPointType
|
||||
$1_LBPV := 2
|
||||
endif
|
||||
|
||||
ifeq ($2, double)
|
||||
$1_x := d
|
||||
$1_Type := Double
|
||||
$1_fulltype := double
|
||||
$1_Fulltype := Double
|
||||
$1_category := floatingPointType
|
||||
$1_LBPV := 3
|
||||
endif
|
||||
|
||||
$1_Swaptype := $$($1_Type)
|
||||
$1_memtype := $2
|
||||
$1_Memtype := $$($1_Type)
|
||||
|
||||
ifeq ($2, float)
|
||||
$1_memtype := int
|
||||
$1_Memtype := Int
|
||||
ifneq ($3,U)
|
||||
$1_Swaptype := Int
|
||||
$1_fromBits := Float.intBitsToFloat
|
||||
$1_toBits := Float.floatToRawIntBits
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($2, double)
|
||||
$1_memtype := long
|
||||
$1_Memtype := Long
|
||||
ifneq ($3,U)
|
||||
$1_Swaptype := Long
|
||||
$1_fromBits := Double.longBitsToDouble
|
||||
$1_toBits := Double.doubleToRawLongBits
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($3, S)
|
||||
$1_swap := Bits.swap
|
||||
endif
|
||||
endef
|
||||
|
||||
define genBinOps
|
||||
# param 1 target
|
||||
# param 2 type
|
||||
# param 3 BO
|
||||
# param 4 RW
|
||||
# param 5 nbytes
|
||||
# param 6 nbytesButOne
|
||||
$(call typesAndBits,$1,$2,$3)
|
||||
$(call fixRw,$1,$4)
|
||||
$1_nbytes := $5
|
||||
$1_nbytesButOne := $6
|
||||
$1_CMD := $(TOOL_SPP) \
|
||||
-Dtype=$$($1_type) \
|
||||
-DType=$$($1_Type) \
|
||||
-Dfulltype=$$($1_fulltype) \
|
||||
-Dmemtype=$$($1_memtype) \
|
||||
-DMemtype=$$($1_Memtype) \
|
||||
-DfromBits=$$($1_fromBits) \
|
||||
-DtoBits=$$($1_toBits) \
|
||||
-DLG_BYTES_PER_VALUE=$$($1_LBPV) \
|
||||
-DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
|
||||
-Dnbytes=$$($1_nbytes) \
|
||||
-DnbytesButOne=$$($1_nbytesButOne) \
|
||||
-DRW=$$($1_RW) \
|
||||
-K$$($1_rwkey) \
|
||||
-Da=$$($1_a) \
|
||||
-be
|
||||
endef
|
||||
|
||||
define SetupGenBuffer
|
||||
# param 1 is for output file
|
||||
# param 2 is template dependency
|
||||
# param 3-9 are named args.
|
||||
# type :=
|
||||
# BIN :=
|
||||
# RW := Mutability (R)ead-only (W)ritable
|
||||
# BO := (U)nswapped/(S)wapped/(L)ittle/(B)ig
|
||||
#
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
|
||||
$(call fixRw,$1,$$($1_RW))
|
||||
$(call typesAndBits,$1,$$($1_type),$$($1_BO))
|
||||
|
||||
$1_DST := $(GENSRC_BUFFER_DST)/$1.java
|
||||
$1_SRC := $(GENSRC_BUFFER_SRC)/$(strip $2).java.template
|
||||
$1_SRC_BIN := $(GENSRC_BUFFER_SRC)/$(strip $2)-bin.java.template
|
||||
|
||||
$1_DEP := $$($1_SRC)
|
||||
ifneq ($$($1_BIN),1)
|
||||
$1_DEP := $$($1_SRC)
|
||||
$1_OUT := $$($1_DST)
|
||||
else
|
||||
$1_DEP += $$($1_SRC) $$($1_SRC_BIN)
|
||||
$1_OUT := $(GENSRC_BUFFER_DST)/$1.binop.0.java
|
||||
endif
|
||||
|
||||
ifeq ($$($1_BIN),1)
|
||||
$(call genBinOps,$1_char,char,$$($1_BO),$$($1_RW),two,one)
|
||||
$(call genBinOps,$1_short,short,$$($1_BO),$$($1_RW),two,one)
|
||||
$(call genBinOps,$1_int,int,$$($1_BO),$$($1_RW),four,three)
|
||||
$(call genBinOps,$1_long,long,$$($1_BO),$$($1_RW),eight,seven)
|
||||
$(call genBinOps,$1_float,float,$$($1_BO),$$($1_RW),four,three)
|
||||
$(call genBinOps,$1_double,double,$$($1_BO),$$($1_RW),eight,seven)
|
||||
endif
|
||||
|
||||
$$($1_DST) : $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.dir
|
||||
$(TOOL_SPP) < $$($1_SRC) > $$($1_OUT).temp \
|
||||
-K$$($1_type) \
|
||||
-K$$($1_category) \
|
||||
-Dtype=$$($1_type) \
|
||||
-DType=$$($1_Type) \
|
||||
-Dfulltype=$$($1_fulltype) \
|
||||
-DFulltype=$$($1_Fulltype) \
|
||||
-Dx=$$($1_x) \
|
||||
-Dmemtype=$$($1_memtype) \
|
||||
-DMemtype=$$($1_Memtype) \
|
||||
-DSwaptype=$$($1_Swaptype) \
|
||||
-DfromBits=$$($1_fromBits) \
|
||||
-DtoBits=$$($1_toBits) \
|
||||
-DLG_BYTES_PER_VALUE=$$($1_LBPV) \
|
||||
-DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
|
||||
-DBO=$$($1_BO) \
|
||||
-Dswap=$$($1_swap) \
|
||||
-DRW=$$($1_RW) \
|
||||
-K$$($1_rwkey) \
|
||||
-Da=$$($1_a) \
|
||||
-DA=$$($1_A) \
|
||||
-Kbo$$($1_BO)
|
||||
$(MV) $$($1_OUT).temp $$($1_OUT)
|
||||
# Do the extra bin thing
|
||||
ifeq ($$($1_BIN),1)
|
||||
$(SED) -e '/#BIN/,$$$$d' < $$($1_OUT) > $$($1_DST).temp
|
||||
$(RM) $$($1_OUT)
|
||||
$$($1_char_CMD) < $$($1_SRC_BIN) >> $$($1_DST).temp
|
||||
$$($1_short_CMD) < $$($1_SRC_BIN) >> $$($1_DST).temp
|
||||
$$($1_int_CMD) < $$($1_SRC_BIN) >> $$($1_DST).temp
|
||||
$$($1_long_CMD) < $$($1_SRC_BIN) >> $$($1_DST).temp
|
||||
$$($1_float_CMD) < $$($1_SRC_BIN) >> $$($1_DST).temp
|
||||
$$($1_double_CMD) < $$($1_SRC_BIN) >> $$($1_DST).temp
|
||||
$(PRINTF) "}\n" >> $$($1_DST).temp
|
||||
mv $$($1_DST).temp $$($1_DST)
|
||||
endif
|
||||
|
||||
GENSRC_BUFFER += $$($1_DST)
|
||||
|
||||
endef
|
||||
|
||||
###
|
||||
|
||||
X_BUF :=X-Buffer
|
||||
|
||||
$(eval $(call SetupGenBuffer,ByteBuffer, $(X_BUF),type:=byte,BIN:=1))
|
||||
$(eval $(call SetupGenBuffer,CharBuffer, $(X_BUF),type:=char))
|
||||
$(eval $(call SetupGenBuffer,ShortBuffer, $(X_BUF),type:=short))
|
||||
$(eval $(call SetupGenBuffer,IntBuffer, $(X_BUF),type:=int))
|
||||
$(eval $(call SetupGenBuffer,LongBuffer, $(X_BUF),type:=long))
|
||||
$(eval $(call SetupGenBuffer,FloatBuffer, $(X_BUF),type:=float))
|
||||
$(eval $(call SetupGenBuffer,DoubleBuffer,$(X_BUF),type:=double))
|
||||
|
||||
# Buffers whose contents are heap-allocated
|
||||
#
|
||||
HEAP_X_BUF := Heap-X-Buffer
|
||||
|
||||
$(eval $(call SetupGenBuffer,HeapByteBuffer, $(HEAP_X_BUF),type:=byte))
|
||||
$(eval $(call SetupGenBuffer,HeapByteBufferR, $(HEAP_X_BUF),type:=byte,RW:=R))
|
||||
$(eval $(call SetupGenBuffer,HeapCharBuffer, $(HEAP_X_BUF),type:=char))
|
||||
$(eval $(call SetupGenBuffer,HeapCharBufferR, $(HEAP_X_BUF),type:=char,RW:=R))
|
||||
$(eval $(call SetupGenBuffer,HeapShortBuffer, $(HEAP_X_BUF),type:=short))
|
||||
$(eval $(call SetupGenBuffer,HeapShortBufferR, $(HEAP_X_BUF),type:=short,RW:=R))
|
||||
$(eval $(call SetupGenBuffer,HeapIntBuffer, $(HEAP_X_BUF),type:=int))
|
||||
$(eval $(call SetupGenBuffer,HeapIntBufferR, $(HEAP_X_BUF),type:=int,RW:=R))
|
||||
$(eval $(call SetupGenBuffer,HeapLongBuffer, $(HEAP_X_BUF),type:=long))
|
||||
$(eval $(call SetupGenBuffer,HeapLongBufferR, $(HEAP_X_BUF),type:=long,RW:=R))
|
||||
$(eval $(call SetupGenBuffer,HeapFloatBuffer, $(HEAP_X_BUF),type:=float))
|
||||
$(eval $(call SetupGenBuffer,HeapFloatBufferR, $(HEAP_X_BUF),type:=float,RW:=R))
|
||||
$(eval $(call SetupGenBuffer,HeapDoubleBuffer, $(HEAP_X_BUF),type:=double))
|
||||
$(eval $(call SetupGenBuffer,HeapDoubleBufferR,$(HEAP_X_BUF),type:=double,RW:=R))
|
||||
|
||||
# Direct byte buffer
|
||||
#
|
||||
DIRECT_X_BUF := Direct-X-Buffer
|
||||
|
||||
$(eval $(call SetupGenBuffer,DirectByteBuffer, $(DIRECT_X_BUF),type:=byte,BIN:=1))
|
||||
$(eval $(call SetupGenBuffer,DirectByteBufferR,$(DIRECT_X_BUF),type:=byte,BIN:=1,RW:=R))
|
||||
|
||||
# Unswapped views of direct byte buffers
|
||||
#
|
||||
$(eval $(call SetupGenBuffer,DirectCharBufferU, $(DIRECT_X_BUF),type:=char,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectCharBufferRU, $(DIRECT_X_BUF),type:=char,RW:=R,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectShortBufferU, $(DIRECT_X_BUF),type:=short,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectShortBufferRU, $(DIRECT_X_BUF),type:=short,RW:=R,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectIntBufferU, $(DIRECT_X_BUF),type:=int,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectIntBufferRU, $(DIRECT_X_BUF),type:=int,RW:=R,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectLongBufferU, $(DIRECT_X_BUF),type:=long,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectLongBufferRU, $(DIRECT_X_BUF),type:=long,RW:=R,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectFloatBufferU, $(DIRECT_X_BUF),type:=float,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectFloatBufferRU, $(DIRECT_X_BUF),type:=float,RW:=R,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectDoubleBufferU, $(DIRECT_X_BUF),type:=double,BO:=U))
|
||||
$(eval $(call SetupGenBuffer,DirectDoubleBufferRU,$(DIRECT_X_BUF),type:=double,RW:=R,BO:=U))
|
||||
|
||||
# Swapped views of direct byte buffers
|
||||
#
|
||||
$(eval $(call SetupGenBuffer,DirectCharBufferS, $(DIRECT_X_BUF),type:=char,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectCharBufferRS, $(DIRECT_X_BUF),type:=char,RW:=R,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectShortBufferS, $(DIRECT_X_BUF),type:=short,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectShortBufferRS, $(DIRECT_X_BUF),type:=short,RW:=R,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectIntBufferS, $(DIRECT_X_BUF),type:=int,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectIntBufferRS, $(DIRECT_X_BUF),type:=int,RW:=R,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectLongBufferS, $(DIRECT_X_BUF),type:=long,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectLongBufferRS, $(DIRECT_X_BUF),type:=long,RW:=R,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectFloatBufferS, $(DIRECT_X_BUF),type:=float,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectFloatBufferRS, $(DIRECT_X_BUF),type:=float,RW:=R,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectDoubleBufferS, $(DIRECT_X_BUF),type:=double,BO:=S))
|
||||
$(eval $(call SetupGenBuffer,DirectDoubleBufferRS,$(DIRECT_X_BUF),type:=double,RW:=R,BO:=S))
|
||||
|
||||
# Big-endian views of byte buffers
|
||||
#
|
||||
BYTE_X_BUF := ByteBufferAs-X-Buffer
|
||||
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferB, $(BYTE_X_BUF),type:=char,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRB, $(BYTE_X_BUF),type:=char,RW:=R,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferB, $(BYTE_X_BUF),type:=short,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRB, $(BYTE_X_BUF),type:=short,RW:=R,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferB, $(BYTE_X_BUF),type:=int,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRB, $(BYTE_X_BUF),type:=int,RW:=R,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferB, $(BYTE_X_BUF),type:=long,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRB, $(BYTE_X_BUF),type:=long,RW:=R,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferB, $(BYTE_X_BUF),type:=float,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRB, $(BYTE_X_BUF),type:=float,RW:=R,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferB, $(BYTE_X_BUF),type:=double,BO:=B))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRB,$(BYTE_X_BUF),type:=double,RW:=R,BO:=B))
|
||||
|
||||
# Little-endian views of byte buffers
|
||||
#
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferL, $(BYTE_X_BUF),type:=char,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRL, $(BYTE_X_BUF),type:=char,RW:=R,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferL, $(BYTE_X_BUF),type:=short,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRL, $(BYTE_X_BUF),type:=short,RW:=R,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferL, $(BYTE_X_BUF),type:=int,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRL, $(BYTE_X_BUF),type:=int,RW:=R,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferL, $(BYTE_X_BUF),type:=long,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRL, $(BYTE_X_BUF),type:=long,RW:=R,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferL, $(BYTE_X_BUF),type:=float,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRL, $(BYTE_X_BUF),type:=float,RW:=R,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferL, $(BYTE_X_BUF),type:=double,BO:=L))
|
||||
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF),type:=double,RW:=R,BO:=L))
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_BUFFER) : $(BUILD_TOOLS)
|
@ -34,8 +34,8 @@ UNICODEDATA = $(JDK_TOPDIR)/make/tools/UnicodeData
|
||||
|
||||
define SetupCharacterData
|
||||
$(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/$1.java : $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS)
|
||||
mkdir -p $$(@D)
|
||||
echo Generating $1.java
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) Generating $1.java
|
||||
$(TOOL_GENERATECHARACTER) $2 \
|
||||
-template $(CHARACTERDATA)/$1.java.template \
|
||||
-spec $(UNICODEDATA)/UnicodeData.txt \
|
||||
@ -56,7 +56,7 @@ $(eval $(call SetupCharacterData,CharacterData0E,-plane 14,11 4 1))
|
||||
# Copy two Java files that need no preprocessing.
|
||||
$(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/%.java : $(CHARACTERDATA)/%.java.template
|
||||
$(MKDIR) -p $(@D)
|
||||
echo Generating $(@F)
|
||||
$(ECHO) Generating $(@F)
|
||||
$(CP) -f $< $@
|
||||
|
||||
GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/CharacterDataUndefined.java \
|
||||
|
107
jdk/makefiles/GensrcCharsetCoder.gmk
Normal file
107
jdk/makefiles/GensrcCharsetCoder.gmk
Normal file
@ -0,0 +1,107 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
GENSRC_CHARSETCODER :=
|
||||
|
||||
GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc_charsetcoder
|
||||
GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc_charsetcoder/java/nio/charset
|
||||
|
||||
GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
|
||||
|
||||
GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java : $(GENSRC_CHARSETCODER_TEMPLATE)
|
||||
$(MKDIR) -p $(@D)
|
||||
-$(RM) $@.temp
|
||||
$(TOOL_SPP) < $< >$@.temp \
|
||||
-Kdecoder \
|
||||
-DA='A' \
|
||||
-Da='a' \
|
||||
-DCode='Decode' \
|
||||
-Dcode='decode' \
|
||||
-DitypesPhrase='bytes in a specific charset' \
|
||||
-DotypesPhrase='sixteen-bit Unicode characters' \
|
||||
-Ditype='byte' \
|
||||
-Dotype='character' \
|
||||
-DItype='Byte' \
|
||||
-DOtype='Char' \
|
||||
-Dcoder='decoder' \
|
||||
-DCoder='Decoder' \
|
||||
-Dcoding='decoding' \
|
||||
-DOtherCoder='Encoder' \
|
||||
-DreplTypeName='string' \
|
||||
-DdefaultRepl='"\\uFFFD"' \
|
||||
-DdefaultReplName='<tt>"\\uFFFD"<\/tt>' \
|
||||
-DreplType='String' \
|
||||
-DreplFQType='java.lang.String' \
|
||||
-DreplLength='length()' \
|
||||
-DItypesPerOtype='CharsPerByte' \
|
||||
-DnotLegal='not legal for this charset' \
|
||||
-Dotypes-per-itype='chars-per-byte' \
|
||||
-DoutSequence='Unicode character'
|
||||
$(MV) $@.temp $@
|
||||
|
||||
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java : $(GENSRC_CHARSETCODER_TEMPLATE)
|
||||
$(MKDIR) -p $(@D)
|
||||
-$(RM) $@.temp
|
||||
$(TOOL_SPP) < $< >$@.temp \
|
||||
-Kencoder \
|
||||
-DA='An' \
|
||||
-Da='an' \
|
||||
-DCode='Encode' \
|
||||
-Dcode='encode' \
|
||||
-DitypesPhrase='sixteen-bit Unicode characters' \
|
||||
-DotypesPhrase='bytes in a specific charset' \
|
||||
-Ditype='character' \
|
||||
-Dotype='byte' \
|
||||
-DItype='Char' \
|
||||
-DOtype='Byte' \
|
||||
-Dcoder='encoder' \
|
||||
-DCoder='Encoder' \
|
||||
-Dcoding='encoding' \
|
||||
-DOtherCoder='Decoder' \
|
||||
-DreplTypeName='byte array' \
|
||||
-DdefaultRepl='new byte[] { (byte)'"'"\\?"'"' }' \
|
||||
-DdefaultReplName='<tt>{<\/tt>\ <tt>(byte)'"'"\\?"'"'<\/tt>\ <tt>}<\/tt>' \
|
||||
-DreplType='byte[]' \
|
||||
-DreplFQType='byte[]' \
|
||||
-DreplLength='length' \
|
||||
-DItypesPerOtype='BytesPerChar' \
|
||||
-DnotLegal='not a legal sixteen-bit Unicode sequence' \
|
||||
-Dotypes-per-itype='bytes-per-char' \
|
||||
-DoutSequence='byte sequence in the given charset'
|
||||
$(MV) $@.temp $@
|
||||
|
||||
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_CHARSETCODER) : $(BUILD_TOOLS)
|
105
jdk/makefiles/GensrcCharsetMapping.gmk
Normal file
105
jdk/makefiles/GensrcCharsetMapping.gmk
Normal file
@ -0,0 +1,105 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
GENSRC_CHARSETMAPPING:=
|
||||
|
||||
GENSRC_TMP := $(JDK_OUTPUTDIR)/gensrc_charsetmapping
|
||||
GENSRC_DST := $(JDK_OUTPUTDIR)/gensrc_charsetmapping/sun/nio/cs
|
||||
|
||||
GENSRC_SRC := $(JDK_TOPDIR)/make/tools/CharsetMapping
|
||||
GENSRC_JAVA_SRC := $(JDK_TOPDIR)/make/tools/src/build/tools/charsetmapping
|
||||
|
||||
GENSRC_TEMPLATES := $(GENSRC_SRC)/SingleByte-X.java.template $(GENSRC_SRC)/DoubleByte-X.java.template
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_TMP)/_the.dir :
|
||||
$(ECHO) Generating charsetmapping classes
|
||||
$(MKDIR) -p $(GENSRC_DST)/ext
|
||||
$(TOUCH) $@
|
||||
|
||||
###
|
||||
|
||||
GENSRC_SB := $(GENSRC_TMP)/gensrc_the.charsetmapping.sbcs
|
||||
|
||||
$(GENSRC_SB) : $(GENSRC_SRC)/sbcs $(GENSRC_TEMPLATES) $(GENSRC_TMP)/_the.dir
|
||||
$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST) sbcs
|
||||
$(TOUCH) $@
|
||||
|
||||
GENSRC_CHARSETMAPPING += $(GENSRC_SB)
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_DST)/ext/sjis0213.dat : $(GENSRC_SRC)/sjis0213.map $(GENSRC_SB)
|
||||
$(TOOL_CHARSETMAPPING) $< $@ sjis0213
|
||||
|
||||
GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/sjis0213.dat
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_DST)/ext/EUC_TWMapping.java : $(GENSRC_JAVA_SRC)/EUC_TW.java $(GENSRC_SB)
|
||||
$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST)/ext euctw $(GENSRC_JAVA_SRC)/EUC_TW.java
|
||||
|
||||
GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/EUC_TWMapping.java
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_DST)/ext/HKSCSMapping.java : $(GENSRC_JAVA_SRC)/HKSCS.java $(GENSRC_SB)
|
||||
$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST)/ext hkscs $(GENSRC_JAVA_SRC)/HKSCS.java
|
||||
|
||||
GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/HKSCSMapping.java
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs : $(GENSRC_SRC)/extsbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
|
||||
$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST)/ext extsbcs
|
||||
$(TOUCH) $@
|
||||
|
||||
GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs : $(GENSRC_SRC)/dbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
|
||||
$(TOOL_CHARSETMAPPING) $(GENSRC_SRC) $(GENSRC_DST)/ext dbcs
|
||||
$(TOUCH) $@
|
||||
|
||||
GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs
|
||||
|
||||
###
|
||||
|
||||
GENSRC_CHARSET_PROVIDER_CMD := $(JDK_TOPDIR)/makefiles/scripts/genCharsetProvider.sh
|
||||
|
||||
$(GENSRC_DST)/StandardCharsets.java : $(JDK_TOPDIR)/src/share/classes/sun/nio/cs/standard-charsets \
|
||||
$(GENSRC_CHARSET_PROVIDER_CMD) \
|
||||
$(GENSRC_TMP)/_the.dir
|
||||
|
||||
NAWK="$(NAWK)" TEMPDIR="$(GENSRC_TMP)" SH="$(SH)" \
|
||||
HASHER="$(TOOL_HASHER)" \
|
||||
SCRIPTS="$(JDK_TOPDIR)/makefiles/scripts" \
|
||||
$(SH) -e $(GENSRC_CHARSET_PROVIDER_CMD) $< $(@D)
|
||||
|
||||
GENSRC_CHARSETMAPPING += $(GENSRC_DST)/StandardCharsets.java
|
||||
|
||||
$(GENSRC_CHARSETMAPPING) : $(BUILD_TOOLS)
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# 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
|
||||
@ -23,41 +23,33 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
BUILDDIR = ../..
|
||||
GENSRC_EXCEPTIONS :=
|
||||
|
||||
LIBRARY = java_crw_demo
|
||||
PRODUCT = sun
|
||||
LIBRARY_OUTPUT = java_crw_demo
|
||||
GENSRC_EXCEPTIONS_TMP := $(JDK_OUTPUTDIR)/gensrc_exceptions
|
||||
GENSRC_EXCEPTIONS_DST := $(JDK_OUTPUTDIR)/gensrc_exceptions/java/nio
|
||||
|
||||
# Configure the CFLAGS for this library.
|
||||
GENSRC_EXCEPTIONS_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
|
||||
GENSRC_EXCEPTIONS_CMD := $(JDK_TOPDIR)/makefiles/scripts/genExceptions.sh
|
||||
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
GENSRC_EXCEPTIONS_SRC_DIRS := . charset channels
|
||||
|
||||
SRCDIR=$(SHARE_SRC)/demo/jvmti/java_crw_demo
|
||||
###
|
||||
|
||||
# Use the mapfile-vers (See the mapfile located with this Makefile)
|
||||
FILES_m = mapfile-vers
|
||||
ifdef FILES_m
|
||||
include $(BUILDDIR)/common/Mapfile-vers.gmk
|
||||
endif
|
||||
$(GENSRC_EXCEPTIONS_DST)/_the.dir :
|
||||
$(ECHO) "Generating exceptions classes"
|
||||
$(MKDIR) -p $(@D)
|
||||
$(TOUCH) $@
|
||||
|
||||
#
|
||||
# Files to compile.
|
||||
#
|
||||
FILES_c = java_crw_demo.c
|
||||
|
||||
OTHER_INCLUDES = -I$(SRCDIR)
|
||||
###
|
||||
|
||||
#
|
||||
# Library to compile.
|
||||
#
|
||||
include $(BUILDDIR)/common/Library.gmk
|
||||
$(GENSRC_EXCEPTIONS_DST)/_the.% : $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
|
||||
$(GENSRC_EXCEPTIONS_CMD) \
|
||||
$(GENSRC_EXCEPTIONS_DST)/_the.dir
|
||||
$(MKDIR) -p $(@D)/$*
|
||||
SCRIPTS="$(JDK_TOPDIR)/makefiles/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$*
|
||||
$(TOUCH) $@
|
||||
|
||||
# We don't want to link against -ljava
|
||||
JAVALIB=
|
||||
|
||||
#
|
||||
# Add to ambient vpath so we pick up the library files
|
||||
#
|
||||
vpath %.c $(SRCDIR)
|
||||
GENSRC_EXCEPTIONS += $(foreach D,$(GENSRC_EXCEPTIONS_SRC_DIRS),$(GENSRC_EXCEPTIONS_DST)/_the.$(D))
|
||||
|
||||
$(GENSRC_EXCEPTIONS) : $(BUILD_TOOLS)
|
112
jdk/makefiles/GensrcIcons.gmk
Normal file
112
jdk/makefiles/GensrcIcons.gmk
Normal file
@ -0,0 +1,112 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
GENSRC_ICONS :=
|
||||
GENSRC_ICONS_SRC :=
|
||||
GENSRC_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc_icons
|
||||
GENSRC_ICONS_DST := $(GENSRC_ICONS_TMP)/sun/awt/X11
|
||||
|
||||
ifdef OPENJDK
|
||||
ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)
|
||||
else
|
||||
ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
|
||||
endif
|
||||
|
||||
GENSRC_ICONS_SRC += \
|
||||
$(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
|
||||
$(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon24.png \
|
||||
$(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
|
||||
$(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
|
||||
|
||||
|
||||
ICONPATH := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/awt/X11
|
||||
|
||||
GENSRC_ICONS_SRC += \
|
||||
$(ICONPATH)/security-icon-bw16.png \
|
||||
$(ICONPATH)/security-icon-interim16.png \
|
||||
$(ICONPATH)/security-icon-yellow16.png \
|
||||
$(ICONPATH)/security-icon-bw24.png \
|
||||
$(ICONPATH)/security-icon-interim24.png \
|
||||
$(ICONPATH)/security-icon-yellow24.png \
|
||||
$(ICONPATH)/security-icon-bw32.png \
|
||||
$(ICONPATH)/security-icon-interim32.png \
|
||||
$(ICONPATH)/security-icon-yellow32.png \
|
||||
$(ICONPATH)/security-icon-bw48.png \
|
||||
$(ICONPATH)/security-icon-interim48.png \
|
||||
$(ICONPATH)/security-icon-yellow48.png
|
||||
|
||||
GENSRC_ICONS_FILES := $(notdir $(GENSRC_ICONS_SRC))
|
||||
|
||||
GENSRC_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
|
||||
GENSRC_ICONS_DST_NAME = XAWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_ICONS_TMP)/_the.dir :
|
||||
$(ECHO) Generating icon classes
|
||||
$(MKDIR) -p $(GENSRC_ICONS_DST)
|
||||
$(TOUCH) $@
|
||||
|
||||
###
|
||||
|
||||
define SetupGensrcIcon
|
||||
# param 1 is for src-file
|
||||
# param 2 is for src-dir
|
||||
$1_SHORTNAME := $(call GENSRC_ICONS_SHORT_NAME,$1)
|
||||
$1_NAME32 := $(call GENSRC_ICONS_DST_NAME,$1,32)
|
||||
$1_TARGET32 := $(GENSRC_ICONS_DST)/$$($1_NAME32).java
|
||||
$1_NAME64 := $(call GENSRC_ICONS_DST_NAME,$1,64)
|
||||
$1_TARGET64 := $(GENSRC_ICONS_DST)/$$($1_NAME64).java
|
||||
|
||||
$$($1_TARGET32) : $2/$1 $(GENSRC_ICONS_TMP)/_the.dir
|
||||
$(RM) $$@ $$@.tmp
|
||||
$(ECHO) "package sun.awt.X11;" > $$@.tmp
|
||||
$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
|
||||
$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
|
||||
# TODO FIX FIX FIX
|
||||
ifneq ($(PLATFORM),macosx)
|
||||
$(CAT) $$< | $(TOOL_TOBIN) >> $$@.tmp
|
||||
endif
|
||||
$(ECHO) "}; }" >> $$@.tmp
|
||||
$(MV) $$@.tmp $$@
|
||||
|
||||
GENSRC_ICONS += $$($1_TARGET32)
|
||||
|
||||
$$($1_TARGET64) : $2/$1 $(GENSRC_ICONS_TMP)/_the.dir
|
||||
$(RM) $$@ $$@.tmp
|
||||
$(ECHO) "package sun.awt.X11;" > $$@.tmp
|
||||
$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
|
||||
$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
|
||||
# TODO FIX FIX FIX
|
||||
ifneq ($(PLATFORM),macosx)
|
||||
$(CAT) $$< | $(TOOL_TOBIN) >> $$@.tmp
|
||||
endif
|
||||
$(ECHO) "}; }" >> $$@.tmp
|
||||
$(MV) $$@.tmp $$@
|
||||
|
||||
GENSRC_ICONS += $$($1_TARGET64)
|
||||
endef
|
||||
|
||||
$(foreach I,$(GENSRC_ICONS_SRC), $(eval $(call SetupGensrcIcon,$(notdir $(I)),$(dir $(I)))))
|
@ -29,8 +29,8 @@
|
||||
$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
|
||||
|
||||
$(JDK_OUTPUTDIR)/gensrc_jdwp/com/sun/tools/jdi/JDWP.java : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
|
||||
mkdir -p $(@D)
|
||||
mkdir -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
|
||||
$(MKDIR) -p $(@D)
|
||||
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
|
||||
$(ECHO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
|
||||
$(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
|
||||
|
||||
|
@ -84,10 +84,26 @@ $(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CalendarData,Non,filter))
|
||||
|
||||
$(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java: \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/util/LocaleDataMetaInfo-XLocales.java.template
|
||||
mkdir -p $(@D)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) Creating sun/util/LocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
|
||||
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/_the.locale_resources
|
||||
$(SED) $(SED_ARGS) $(JDK_TOPDIR)/src/share/classes/sun/util/LocaleDataMetaInfo-XLocales.java.template \
|
||||
> $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java
|
||||
|
||||
GENSRC_LOCALEDATAMETAINFO:=$(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java
|
||||
|
||||
###
|
||||
|
||||
GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/CoreResourceBundleControl.java
|
||||
GENSRC_CRBC_CMD := $(JDK_TOPDIR)/makefiles/scripts/localelist.sh
|
||||
|
||||
JRE_NONEXIST_LOCALES := en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
|
||||
|
||||
$(GENSRC_CRBC_DST) : $(JDK_TOPDIR)/src/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template \
|
||||
$(GENSRC_CRBC_CMD)
|
||||
$(MKDIR) -p $(@D)
|
||||
NAWK="$(NAWK)" SED="$(SED)" $(SH) $(GENSRC_CRBC_CMD) "$(JRE_NONEXIST_LOCALES)" $< $@
|
||||
|
||||
GENSRC_LOCALEDATAMETAINFO += $(GENSRC_CRBC_DST)
|
||||
|
||||
###
|
||||
|
@ -31,7 +31,7 @@
|
||||
$(JDK_OUTPUTDIR)/gensrc_misc/sun/misc/Version.java: \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/misc/Version.java.template
|
||||
$(MKDIR) -p $(@D)
|
||||
echo Generating sun/misc/Version.java
|
||||
$(ECHO) Generating sun/misc/Version.java
|
||||
$(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \
|
||||
-e 's/@@java_version@@/$(RELEASE)/g' \
|
||||
-e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
|
||||
@ -46,7 +46,7 @@ GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/misc/Version.java
|
||||
$(JDK_OUTPUTDIR)/gensrc_misc/sun/tools/jconsole/Version.java: \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/Version.java.template
|
||||
$(MKDIR) -p $(@D)
|
||||
echo Generating sun/tools/jconsole/Version.java
|
||||
$(ECHO) Generating sun/tools/jconsole/Version.java
|
||||
$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@
|
||||
|
||||
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/tools/jconsole/Version.java
|
||||
@ -64,7 +64,7 @@ ifeq ($(HOST_OS_API),posix)
|
||||
$(JDK_OUTPUTDIR)/gensrc_misc/java/lang/UNIXProcess.java : \
|
||||
$(JDK_TOPDIR)/src/solaris/classes/java/lang/UNIXProcess.java.$(UPSUFFIX)
|
||||
$(MKDIR) -p $(@D)
|
||||
echo Copying UNIXProcess.java.$(PLATFORM) to java/lang/UNIXProcess.java
|
||||
$(ECHO) Copying UNIXProcess.java.$(PLATFORM) to java/lang/UNIXProcess.java
|
||||
$(CP) $< $@
|
||||
$(CHMOD) u+rw $@
|
||||
|
||||
@ -72,3 +72,114 @@ ifeq ($(HOST_OS_API),posix)
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifndef OPENJDK
|
||||
ifneq ($(PLATFORM), windows)
|
||||
ifneq ($(PLATFORM), macosx)
|
||||
# These file(s) are needed for building fake .so libs on !windows for jdbcodbc
|
||||
|
||||
$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc1.c :
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) Creating $@
|
||||
$(PRINTF) "void dummyOdbc(void){}\n" > $@
|
||||
$(ECHO) Created $@
|
||||
|
||||
$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc2.c :
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) Creating $@
|
||||
$(PRINTF) "void dummyOdbc(void){}\n" > $@
|
||||
$(ECHO) Created $@
|
||||
|
||||
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc1.c $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc2.c
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java
|
||||
|
||||
GENSRC_SOR_SRC := $(JDK_TOPDIR)/src/share/native/sun/nio/ch
|
||||
GENSRC_SOR_SRC_FILE := genSocketOptionRegistry.c
|
||||
GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/objs/gensrc/genSocketOptionRegistry
|
||||
GENSRC_SOR_EXE := $(GENSRC_SOR_BIN)/genSocketOptionRegistry$(EXE_SUFFIX)
|
||||
|
||||
SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
|
||||
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
|
||||
|
||||
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java : $(GENSRC_SOR_EXE)
|
||||
$(MKDIR) -p $(@D)
|
||||
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
|
||||
$(GENSRC_SOR_EXE) >> $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE,\
|
||||
SRC:=$(GENSRC_SOR_SRC),\
|
||||
INCLUDE_FILES:=$(GENSRC_SOR_SRC_FILE),\
|
||||
LANG:=C,\
|
||||
CFLAGS:=$(CFLAGS_JDKLIB),\
|
||||
BIN:=$(GENSRC_SOR_BIN),\
|
||||
EXE:=$(GENSRC_SOR_EXE)))
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifneq ($(PLATFORM),windows)
|
||||
|
||||
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java
|
||||
|
||||
GENSRC_UC_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/fs
|
||||
GENSRC_UC_SRC_FILE := genUnixConstants.c
|
||||
GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/objs/gensrc/genUnixConstants
|
||||
GENSRC_UC_EXE := $(GENSRC_UC_BIN)/genUnixConstants$(EXE_SUFFIX)
|
||||
|
||||
UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
|
||||
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
|
||||
|
||||
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java : $(GENSRC_UC_EXE)
|
||||
$(MKDIR) -p $(@D)
|
||||
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
|
||||
$(GENSRC_UC_EXE) >> $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE,\
|
||||
SRC:=$(GENSRC_UC_SRC),\
|
||||
INCLUDE_FILES:=$(GENSRC_UC_SRC_FILE),\
|
||||
LANG:=C,\
|
||||
CFLAGS:=$(CFLAGS_JDKLIB),\
|
||||
BIN:=$(GENSRC_UC_BIN),\
|
||||
EXE:=$(GENSRC_UC_EXE)))
|
||||
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
|
||||
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java
|
||||
|
||||
GENSRC_SOL_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/fs
|
||||
GENSRC_SOL_SRC_FILE := genSolarisConstants.c
|
||||
GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/objs/gensrc/genSolarisConstants
|
||||
GENSRC_SOL_EXE := $(GENSRC_SOL_BIN)/genSolarisConstants$(EXE_SUFFIX)
|
||||
|
||||
SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
|
||||
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
|
||||
|
||||
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java : $(GENSRC_SOL_EXE)
|
||||
$(MKDIR) -p $(@D)
|
||||
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
|
||||
$(GENSRC_SOL_EXE) >> $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE,\
|
||||
SRC:=$(GENSRC_SOL_SRC),\
|
||||
INCLUDE_FILES:=$(GENSRC_SOL_SRC_FILE),\
|
||||
LANG:=C,\
|
||||
CFLAGS:=$(CFLAGS_JDKLIB),\
|
||||
BIN:=$(GENSRC_SOL_BIN),\
|
||||
EXE:=$(GENSRC_SOL_EXE)))
|
||||
|
||||
endif
|
||||
|
@ -85,7 +85,7 @@ define add_properties_to_clean
|
||||
ALL_CLEANED_PROPSOURCES+=$2
|
||||
|
||||
# Generate the list of to be created java files.
|
||||
$1_PROPOUTPUT:=$$(patsubst %,$(JDK_OUTPUTDIR)/newclasses/%.properties,$$($1_PROPPATHS))
|
||||
$1_PROPOUTPUT:=$$(patsubst %,$(JDK_OUTPUTDIR)/classes/%.properties,$$($1_PROPPATHS))
|
||||
# If the properties target file isn't in a "resources" dir, add one.
|
||||
ifneq ($5,)
|
||||
$1_PROPOUTPUT:=$$(foreach p,$$($1_PROPOUTPUT), $$(dir $$p)$5/$$(notdir $$p))
|
||||
@ -121,9 +121,32 @@ $(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY_HK,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources -name "*.properties"),\
|
||||
ListResourceBundle,%zh_TW,%zh_HK))
|
||||
#com/sun/imageio/plugins/common
|
||||
$(eval $(call add_properties_to_clean,COM_SUN_IMAGEIO,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/imageio -name "*.properties")))
|
||||
#com/sun/java/swing/plaf/gtk/resources
|
||||
ifneq ($(PLATFORM), windows)
|
||||
# Only compile GTK resource bundles on Solaris/Linux
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources -name "*.properties"),\
|
||||
ListResourceBundle))
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK_HK,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources -name "*.properties"),\
|
||||
ListResourceBundle,%zh_TW,%zh_HK))
|
||||
endif
|
||||
#com/sun/java/swing/plaf/motif/resources
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources -name "*.properties"),\
|
||||
ListResourceBundle))
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF_HK,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources -name "*.properties"),\
|
||||
ListResourceBundle,%zh_TW,%zh_HK))
|
||||
#com/sun/java/swing/plaf/windows/resources
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources -name "*.properties"),\
|
||||
ListResourceBundle))
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS_HK,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources -name "*.properties"),\
|
||||
ListResourceBundle,%zh_TW,%zh_HK))
|
||||
#com/sun/java/util/jar/pack
|
||||
$(eval $(call add_properties_to_clean,JNDI_COSNAMING,\
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/intrinsic.properties))
|
||||
@ -149,8 +172,26 @@ $(eval $(call add_properties_to_clean,COM_SUN_ROWSET_HK,\
|
||||
|
||||
#com/sun/servicetag/resources
|
||||
#com/sun/swing/internal/plaf/basic/resources
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources -name "*.properties"),\
|
||||
ListResourceBundle))
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC_HK,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources -name "*.properties"),\
|
||||
ListResourceBundle,%zh_TW,%zh_HK))
|
||||
#com/sun/swing/internal/plaf/metal/resources
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources -name "*.properties"),\
|
||||
ListResourceBundle))
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL_HK,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources -name "*.properties"),\
|
||||
ListResourceBundle,%zh_TW,%zh_HK))
|
||||
#com/sun/swing/internal/plaf/synth/resources
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources -name "*.properties"),\
|
||||
ListResourceBundle))
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH_HK,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources -name "*.properties"),\
|
||||
ListResourceBundle,%zh_TW,%zh_HK))
|
||||
|
||||
#com/sun/tools/jdi/resources
|
||||
$(eval $(call add_properties_to_compile,COM_SUN_TOOLS_JDI,\
|
||||
@ -160,6 +201,8 @@ $(eval $(call add_properties_to_compile,COM_SUN_TOOLS_JDI,\
|
||||
#com/sun/tools/script/shell
|
||||
#java/util
|
||||
#javax/sql/rowset
|
||||
$(eval $(call add_properties_to_clean,JAVAX_SQL_ROWSET,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/javax/sql/rowset -name "*.properties")))
|
||||
#sun/awt/resources
|
||||
$(eval $(call add_properties_to_compile,SUN_AWT,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/awt/resources -name "*.properties"),\
|
||||
@ -175,6 +218,12 @@ $(eval $(call add_properties_to_compile,SUN_LAUNCHER_HK,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/launcher/resources -name "*.properties"),\
|
||||
ListResourceBundle,%zh_TW,%zh_HK))
|
||||
#sun/management/resources
|
||||
$(eval $(call add_properties_to_compile,SUN_MANAGEMENT,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/management/resources -name "*.properties"),\
|
||||
ListResourceBundle))
|
||||
$(eval $(call add_properties_to_compile,SUN_MANAGEMENT_KH,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/management/resources -name "*.properties"),\
|
||||
ListResourceBundle,%zh_TW,%zh_HK))
|
||||
#sun/print
|
||||
#sun/print/resources
|
||||
$(eval $(call add_properties_to_compile,SUN_PRINT,\
|
||||
@ -231,31 +280,30 @@ $(eval $(call add_properties_to_compile,SUN_UTIL,\
|
||||
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/util/resources -name "*.properties"),\
|
||||
LocaleNamesBundle))
|
||||
|
||||
|
||||
# Now setup the rule for the generation of the resource bundles.
|
||||
$(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties : $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS)
|
||||
$(RM) -rf $(JDK_OUTPUTDIR)/gensrc_properties/*
|
||||
# Generate all output directories in advance since the build tool does not do that...
|
||||
$(MKDIR) -p $(sort $(dir $(ALL_COMPILED_PROPJAVAS)))
|
||||
echo Compiling $(words $(ALL_COMPILED_PROPSOURCES)) properties into resource bundles
|
||||
$(ECHO) Compiling $(words $(ALL_COMPILED_PROPSOURCES)) properties into resource bundles
|
||||
$(call ListPathsSafely,COMPILE_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline)
|
||||
$(TOOL_COMPILEPROPERTIES) -quiet @$(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline
|
||||
touch $@
|
||||
$(TOUCH) $@
|
||||
|
||||
# Now setup the rule for the generation of the cleaned properties.
|
||||
# FIXME: We currently don't handle removed properties incrementally.
|
||||
$(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties : $(ALL_CLEANED_PROPSOURCES) $(BUILD_TOOLS)
|
||||
$(RM) -f $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties.cmdline
|
||||
$(JDK_OUTPUTDIR)/classes/_the.cleaned_properties : $(ALL_CLEANED_PROPSOURCES) $(BUILD_TOOLS)
|
||||
$(RM) -f $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline
|
||||
# Generate all output directories in advance since the build tool does not do that...
|
||||
$(MKDIR) -p $(sort $(dir $(ALL_CLEANED_PROPOUTPUT)))
|
||||
echo Copying and cleaning $(words $(ALL_CLEANED_PROPSOURCES)) properties
|
||||
$(call ListPathsSafely,CLEAN_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties.cmdline)
|
||||
$(TOOL_STRIPPROPERTIES) @$(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties.cmdline
|
||||
touch $@
|
||||
$(ECHO) Copying and cleaning $(words $(ALL_CLEANED_PROPSOURCES)) properties
|
||||
$(call ListPathsSafely,CLEAN_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline)
|
||||
$(TOOL_STRIPPROPERTIES) @$(JDK_OUTPUTDIR)/classes/_the.cleaned_properties.cmdline
|
||||
$(TOUCH) $@
|
||||
|
||||
$(ALL_COMPILED_PROPJAVAS) : $(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties
|
||||
|
||||
$(ALL_CLEANED_PROPOUTPUT) : $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties
|
||||
$(ALL_CLEANED_PROPOUTPUT) : $(JDK_OUTPUTDIR)/classes/_the.cleaned_properties
|
||||
|
||||
|
||||
# Some zh_HK resources are just copied of zh_TW
|
||||
@ -265,7 +313,9 @@ $(JDK_OUTPUTDIR)/gensrc_properties/%_zh_HK.java: $(JDK_TOPDIR)/src/share/classes
|
||||
|
||||
ZH_HK_JAVA:= sun/applet/resources/MsgAppletViewer_zh_HK.java \
|
||||
sun/misc/resources/Messages_zh_HK.java \
|
||||
sun/security/util/AuthResources_zh_HK.java
|
||||
sun/security/util/AuthResources_zh_HK.java \
|
||||
sun/security/util/Resources_zh_HK.java
|
||||
|
||||
ZH_HK_JAVA_FILES:=$(addprefix $(JDK_OUTPUTDIR)/gensrc_properties/,$(ZH_HK_JAVA))
|
||||
|
||||
|
||||
|
91
jdk/makefiles/GensrcSwing.gmk
Normal file
91
jdk/makefiles/GensrcSwing.gmk
Normal file
@ -0,0 +1,91 @@
|
||||
#
|
||||
# Copyright (c) 2011, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Generate java files for javax.swing.plaf package
|
||||
#
|
||||
NIMBUS_PACKAGE = javax.swing.plaf
|
||||
NIMBUS_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/plaf/nimbus
|
||||
NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/skin.laf
|
||||
|
||||
$(JDK_OUTPUTDIR)/gensrc_swing/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) "Generating Nimbus source files:"
|
||||
$(TOOL_GENERATENIMBUS) \
|
||||
-skinFile $(NIMBUS_SKIN_FILE) -buildDir $(JDK_OUTPUTDIR)/gensrc_swing \
|
||||
-packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
|
||||
$(ECHO) "Finished generating Nimbus source files"
|
||||
$(TOUCH) $@
|
||||
|
||||
GENSRC_SWING_NIMBUS := $(JDK_OUTPUTDIR)/gensrc_swing/_the.generated_nimbus
|
||||
|
||||
#
|
||||
# Generate beaninfo java files
|
||||
#
|
||||
|
||||
BEAN_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/beaninfo
|
||||
DOCLETSRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans
|
||||
|
||||
# javax.swing package
|
||||
BEANS = AbstractButton Box JComponent JApplet JButton \
|
||||
JCheckBox JCheckBoxMenuItem JComboBox JColorChooser \
|
||||
JDesktopPane JDialog JEditorPane JFileChooser JFrame \
|
||||
JFormattedTextField JInternalFrame JLabel JLayeredPane \
|
||||
JList JMenu JMenuBar JMenuItem JOptionPane JPanel \
|
||||
JPasswordField JPopupMenu JProgressBar JRadioButton \
|
||||
JRadioButtonMenuItem JScrollBar JScrollPane JSeparator \
|
||||
JSlider JSplitPane JSpinner JTabbedPane JTable \
|
||||
JTextArea JTextField JTextPane JToggleButton JToolBar \
|
||||
JTree JWindow
|
||||
|
||||
# javax.swing.text package
|
||||
BEANS_TEXT = JTextComponent
|
||||
|
||||
BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/%.java) \
|
||||
$(BEANS_TEXT:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/text/%.java)
|
||||
|
||||
# Dummy variable so far, in the old build system it was false by default
|
||||
SWINGBEAN_DEBUG_FLAG = false
|
||||
# GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(JDK_OUTPUTDIR)/btclasses
|
||||
$(JDK_OUTPUTDIR)/gensrc_swing/_the.generated_beaninfo: $(BEANS_SRC) $(BEAN_GENSRC_DIR)/SwingBeanInfoBase.java $(BEAN_GENSRC_DIR)/BeanInfoUtils.java $(BUILD_TOOLS)
|
||||
$(JAVA) -Djava.awt.headless=true -jar $(JAVADOC_JARS) -doclet GenDocletBeanInfo -x $(SWINGBEAN_DEBUG_FLAG) -d $(BEAN_GENSRC_DIR) -t $(DOCLETSRC_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
|
||||
-classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC)
|
||||
$(TOUCH) $@
|
||||
|
||||
# This file is the part of dt.jar
|
||||
# For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo
|
||||
# Should it be moved under $(JDK_TOPDIR)/src/share/classes/javax/swing instead?
|
||||
$(BEAN_GENSRC_DIR)/SwingBeanInfoBase.java: $(DOCLETSRC_DIR)/beaninfo/SwingBeanInfoBase.java
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
# This file is the part of dt.jar
|
||||
# For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo
|
||||
# Should it be moved under $(JDK_TOPDIR)/src/share/classes/sun/swing instead?
|
||||
$(BEAN_GENSRC_DIR)/BeanInfoUtils.java: $(DOCLETSRC_DIR)/beaninfo/BeanInfoUtils.java
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc_swing/_the.generated_beaninfo
|
97
jdk/makefiles/GensrcX11Wrappers.gmk
Normal file
97
jdk/makefiles/GensrcX11Wrappers.gmk
Normal file
@ -0,0 +1,97 @@
|
||||
#
|
||||
# Copyright (c) 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.
|
||||
#
|
||||
|
||||
GENSRC_X11WRAPPERS :=
|
||||
GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
|
||||
|
||||
GENSRC_SIZER_SRC := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
|
||||
|
||||
GENSRC_SIZES :=
|
||||
|
||||
ifeq ($(PLATFORM)-$(LIBARCH), solaris-i386)
|
||||
GENSRC_SIZES := sizes.32 sizes.64
|
||||
else ifeq ($(PLATFORM), solaris)
|
||||
isalist:=$(shell $(ISAINFO))
|
||||
ifneq (,$(findstring sparcv9, $(isalist)))
|
||||
# On sparcv9 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
|
||||
GENSRC_SIZES := sizes.32 sizes.64
|
||||
else
|
||||
ifneq (,$(findstring amd64, $(isalist)))
|
||||
# On amd64 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
|
||||
GENSRC_SIZES := sizes.32 sizes.64
|
||||
else # !sparcv9 : includes (32-bit) sparc, i586
|
||||
GENSRC_SIZES := sizes.32
|
||||
endif # amd64
|
||||
endif # sparcv9
|
||||
else # !solaris
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
GENSRC_SIZES := sizes.32 sizes.64
|
||||
else # !macosx
|
||||
GENSRC_SIZES := sizes.$(ARCH_DATA_MODEL)
|
||||
endif # !macosx
|
||||
endif # solaris
|
||||
|
||||
|
||||
##########################################################################################
|
||||
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
|
||||
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c
|
||||
(cd $(@D) && $(CC) -m$* -o $@ $< $(CFLAGS_JDKLIB) \
|
||||
-I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
|
||||
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
|
||||
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
|
||||
|
||||
ifeq ($(PLATFORM)-$(LIBARCH), solaris-i386)
|
||||
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.32 : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.32.exe
|
||||
$< > $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/awt/X11/generator/sizes.64-$(PLATFORM)-$(LIBARCH)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
else
|
||||
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.% : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe
|
||||
$< > $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
endif
|
||||
|
||||
$(GENSRC_X11WRAPPERS_TMP)/classes/_the.classes : $(foreach S,$(GENSRC_SIZES),$(GENSRC_X11WRAPPERS_TMP)/sizer/$(S))
|
||||
$(MKDIR) -p $(@D)/sun/awt/X11
|
||||
$(RM) $(@D)/sun/awt/X11/*
|
||||
$(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes
|
||||
ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
|
||||
$(ECHO) COMPARING $@ and $(GENSRC_SIZER_SRC)/sizes.64-$(PLATFORM)-i386
|
||||
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.64 $(GENSRC_SIZER_SRC)/sizes.64-$(PLATFORM)-i386
|
||||
endif
|
||||
$(TOUCH) $@
|
||||
|
||||
GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/classes/_the.classes
|
@ -28,47 +28,518 @@ include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include Setup.gmk
|
||||
|
||||
default: $(IMAGES_OUTPUTDIR)/_the.images
|
||||
default: images
|
||||
|
||||
include Tools.gmk
|
||||
|
||||
JARS:=
|
||||
images: jre-image jdk-image
|
||||
|
||||
##########################################################################################
|
||||
|
||||
JCONSOLE_JAR_DEPS := \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/sun/tools/jconsole/ -name "_the.package") \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/com/sun/tools/jconsole/ -name "_the.package")
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,$(JCONSOLE_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/newclasses,\
|
||||
SUFFIXES:=.class .gif .png,\
|
||||
INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
|
||||
JARMAIN:=sun.tools.jconsole.JConsole,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/jconsole.jar,\
|
||||
SKIP_METAINF:=true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/jconsole.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
# Need to define BUILDDIR for Release.gmk to work
|
||||
BUILDDIR=$(JDK_TOPDIR)/makefiles
|
||||
include common/Defs.gmk
|
||||
include common/Release.gmk
|
||||
|
||||
# A rudimentary attempt at band-aiding the dependency tracking.
|
||||
DEPS:= $(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses -name "*.class" -type f) \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f) \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f)
|
||||
|
||||
$(IMAGES_OUTPUTDIR)/_the.images : $(DEPS) $(JARS)
|
||||
ifeq ($(HOST_OS),solaris)
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) -r -P '$<' '$(@D)'
|
||||
endef
|
||||
else
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) -P '$<' '$@'
|
||||
endef
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# JRE and JDK build rules
|
||||
#
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# /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)
|
||||
|
||||
NOT_JRE_BIN_FILES = \
|
||||
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) \
|
||||
$(LIB_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
|
||||
$(MSVCRNN_DLL)
|
||||
|
||||
# Find all files in bin dir
|
||||
ALL_BIN_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f)
|
||||
ifeq ($(HOST_OS),windows)
|
||||
JDK_BIN_LIST := $(filter $(addprefix %,$(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
|
||||
else
|
||||
JDK_BIN_LIST := $(ALL_BIN_LIST)
|
||||
endif
|
||||
JRE_BIN_LIST := $(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
|
||||
|
||||
JRE_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JRE_IMAGE_DIR)/%, $(JRE_BIN_LIST))
|
||||
JDK_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/%, $(JDK_BIN_LIST))
|
||||
JDKJRE_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/jre/%, $(JRE_BIN_LIST))
|
||||
|
||||
################################################################################
|
||||
# /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)
|
||||
|
||||
JDKJRE_LIB_FILES := \
|
||||
$(LIB_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
|
||||
$(SALIB_NAME)
|
||||
|
||||
NOT_JRE_LIB_FILES := \
|
||||
tools.jar \
|
||||
jconsole.jar \
|
||||
sa-jdi.jar \
|
||||
dt.jar \
|
||||
orb.idl \
|
||||
ir.idl \
|
||||
ct.sym
|
||||
|
||||
JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
|
||||
ifeq ($(HOST_OS), linux)
|
||||
JDK_LIB_FILES += jexec
|
||||
endif
|
||||
|
||||
ALL_LIB_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib \( -type f -o -type l \) ! -name "_the*")
|
||||
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))
|
||||
|
||||
# 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 $@
|
||||
|
||||
$(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS)
|
||||
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
|
||||
|
||||
$(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS)
|
||||
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
|
||||
|
||||
$(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS)
|
||||
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
|
||||
|
||||
$(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JRE_LIB_TARGETS)
|
||||
$(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 \
|
||||
jvisualvm.1 \
|
||||
native2ascii.1 \
|
||||
rmic.1 \
|
||||
schemagen.1 \
|
||||
serialver.1 \
|
||||
wsgen.1 \
|
||||
wsimport.1 \
|
||||
xjc.1
|
||||
|
||||
ifeq ($(HOST_OS), linux)
|
||||
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/linux/doc
|
||||
MAN1_SUBDIR:=man
|
||||
endif
|
||||
ifeq ($(HOST_OS), solaris)
|
||||
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/solaris/doc
|
||||
MAN1_SUBDIR:=sun/man/man1
|
||||
endif
|
||||
|
||||
$(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)
|
||||
|
||||
ifeq ($(HOST_OS), solaris)
|
||||
$(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)
|
||||
# Restart this makefile, ugly, but since double colon (::) rules
|
||||
# have been used in Release.gmk, it is impossible to craft on
|
||||
# dependencies on these. I.e. -do-not-use- :: rules!!!!!
|
||||
# Repeat after me: -do-not-use- :: rules!!!!!
|
||||
$(MAKE) -j1 -f Images.gmk $(IMAGES_MAKE_ARGS) images
|
||||
$(TOUCH) $@
|
||||
|
||||
.PHONY: default
|
||||
ifeq ($(HOST_OS), linux)
|
||||
$(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 ($(HOST_OS), linux)
|
||||
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
|
||||
|
||||
ifeq ($(HOST_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
|
||||
|
||||
################################################################################
|
||||
# /demo dir
|
||||
|
||||
ifndef NO_DEMOS
|
||||
# FIXME: newdemo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied.
|
||||
|
||||
# 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.
|
||||
$(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/newdemo/%
|
||||
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
|
||||
JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/newdemo/%,$(JDK_IMAGE_DIR)/demo/%,\
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/newdemo ! -name "_the.*"))
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# /include dir
|
||||
|
||||
$(JDK_IMAGE_DIR)/include/%: $(JDK_OUTPUTDIR)/include/%
|
||||
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
|
||||
$(install-file)
|
||||
|
||||
JDK_INCLUDE_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/include/%,$(JDK_IMAGE_DIR)/include/%,\
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/include -type f))
|
||||
|
||||
################################################################################
|
||||
# doc files
|
||||
|
||||
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
|
||||
ifeq ($(HOST_OS), windows)
|
||||
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))
|
||||
|
||||
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/%
|
||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(install-file)
|
||||
|
||||
$(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/%
|
||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(install-file)
|
||||
|
||||
$(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README
|
||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
$(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README
|
||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/%
|
||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(install-file)
|
||||
|
||||
$(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/%
|
||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(install-file)
|
||||
|
||||
$(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/%
|
||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(install-file)
|
||||
|
||||
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release
|
||||
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/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
|
||||
|
||||
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)/%,%,$@)
|
||||
$(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", "$(ARCH)")
|
||||
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
|
||||
|
||||
$(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
|
||||
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(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", "$(ARCH)")
|
||||
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
|
||||
|
||||
$(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip
|
||||
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(install-file)
|
||||
|
||||
################################################################################
|
||||
# Post processing (strip etc)
|
||||
|
||||
ifneq ($(POST_STRIP_CMD),)
|
||||
ifeq ($(HOST_OS), windows)
|
||||
EXEC_LIST:=$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*.exe \
|
||||
-o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)")
|
||||
else
|
||||
# Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
|
||||
EXEC_LIST:=$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX) && \
|
||||
$(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX)` \
|
||||
| $(EGREP) 'ELF' | $(CUT) -d':' -f1)
|
||||
endif
|
||||
# Filter out non JRE files and convert to unique touch files to depend on
|
||||
JRE_EXEC_TOUCH_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip/%.stripped,\
|
||||
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
|
||||
|
||||
# Setup a rule for stripping files based on touch files
|
||||
$(IMAGES_OUTPUTDIR)/_strip/%.stripped: $(JRE_IMAGE_DIR)/%
|
||||
$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)
|
||||
$(CHMOD) u+w $<
|
||||
$(POST_STRIP_CMD) $<
|
||||
$(CHMOD) go-w $<
|
||||
$(MKDIR) -p $(@D)
|
||||
$(TOUCH) $@
|
||||
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 \
|
||||
$(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_EXEC_TOUCH_LIST)
|
||||
|
||||
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) \
|
||||
$(JDK_INFO_FILE) $(JDK_IMAGE_DIR)/src.zip
|
||||
|
||||
################################################################################
|
||||
|
||||
.PHONY: default images jre-image jdk-image
|
||||
|
@ -31,26 +31,11 @@ all: $(JDK_OUTPUTDIR)/_the.legacy_make
|
||||
DEPS:= $(shell $(FIND) $(JDK_TOPDIR)/makefiles/java -type f) \
|
||||
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/javax -type f) \
|
||||
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/sun -type f) \
|
||||
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/com -type f) \
|
||||
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/apple -type f)
|
||||
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/com -type f)
|
||||
|
||||
$(JDK_OUTPUTDIR)/_the.legacy_make: $(DEPS)
|
||||
(echo Building single threaded Java subdir && \
|
||||
$(MAKE) -j1 -C java all && \
|
||||
(if test "$(PLATFORM)" = macosx; then \
|
||||
echo Building single threaded Apple subdir && \
|
||||
$(MAKE) -j1 -C apple all; \
|
||||
fi) && \
|
||||
echo Building single threaded javax subdir && \
|
||||
$(MAKE) -j1 -C javax all && \
|
||||
echo Building single threaded sun subdir && \
|
||||
$(MAKE) -j1 -C sun all && \
|
||||
echo Building single threaded com subdir && \
|
||||
$(MAKE) -j1 -C com all && \
|
||||
if [ -z "$(OPENJDK)" ]; then \
|
||||
echo Building single threaded altclasses subdir && \
|
||||
$(MAKE) -j1 -C altclasses all; \
|
||||
fi && \
|
||||
touch $@)
|
||||
|
||||
.PHONY: all
|
||||
|
@ -23,6 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
@ -36,38 +37,43 @@ include Setup.gmk
|
||||
# Setup the build tools.
|
||||
include Tools.gmk
|
||||
|
||||
|
||||
all: $(BUILD_TOOLS)
|
||||
+make -f GenerateJavaSources.gmk
|
||||
+$(MAKE) -f GenerateJavaSources.gmk
|
||||
# Drop back to the old makefiles for
|
||||
# packages/libs that have not yet been converted.
|
||||
+make -f LegacyMakefiles.gmk
|
||||
+$(MAKE) -f LegacyMakefiles.gmk
|
||||
# Ok, now gensrc is fully populated.
|
||||
+make -f GenerateData.gmk
|
||||
+make -f CompileJavaClasses.gmk
|
||||
+$(MAKE) -f GenerateData.gmk
|
||||
+$(MAKE) -f CompileJavaClasses.gmk
|
||||
# The classes have been built, now generate
|
||||
# classes that have other sources.
|
||||
+make -f GenerateClasses.gmk
|
||||
+$(MAKE) -f GenerateClasses.gmk
|
||||
# The classes are now built and
|
||||
# any javah files have now been generated.
|
||||
+make -f CompileNativeLibraries.gmk
|
||||
+$(MAKE) -f CompileNativeLibraries.gmk
|
||||
# Finally compile the launchers.
|
||||
+make -f CompileLaunchers.gmk
|
||||
+$(MAKE) -f CompileLaunchers.gmk
|
||||
# Now we have a complete jdk, which you can run.
|
||||
# It is not yet wrapped up as an installed image.
|
||||
# The demos are compiled against this jdk.
|
||||
ifndef NO_DEMOS
|
||||
+make -f CompileDemos.gmk
|
||||
+$(MAKE) -f CompileDemos.gmk
|
||||
endif
|
||||
# Now copy the sample sources into the jdk.
|
||||
ifndef NO_SAMPLES
|
||||
+make -f CopySamples.gmk
|
||||
+$(MAKE) -f CopySamples.gmk
|
||||
endif
|
||||
|
||||
# Create the final jdk and jre images in the old way. Kept for reference
|
||||
# until conversion is fully done.
|
||||
old-images:
|
||||
+$(MAKE) $(IMAGES_MAKE_ARGS) -f OldImages.gmk
|
||||
|
||||
# Create the final jdk and jre images, to be wrapped up
|
||||
# into packages, or instealled.
|
||||
images: all
|
||||
+make $(IMAGES_MAKE_ARGS) -f Images.gmk
|
||||
# into packages, or installed.
|
||||
images:
|
||||
+$(MAKE) -f CreateJars.gmk
|
||||
+$(MAKE) $(IMAGES_MAKE_ARGS) -f Images.gmk
|
||||
|
||||
|
||||
BINARIES:=$(shell if test -d $(IMAGES_OUTPUTDIR)/j2sdk-image/bin; then cd $(IMAGES_OUTPUTDIR)/j2sdk-image/bin && $(LS) ; fi)
|
||||
@ -89,4 +95,4 @@ packages: images
|
||||
echo Creating packages...well, in the future.
|
||||
$(MKDIR) -p $(OUTPUT_ROOT)/packages
|
||||
|
||||
.PHONY: all install
|
||||
.PHONY: all install images
|
||||
|
175
jdk/makefiles/OldImages.gmk
Normal file
175
jdk/makefiles/OldImages.gmk
Normal file
@ -0,0 +1,175 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
default: $(IMAGES_OUTPUTDIR)/_the.images
|
||||
|
||||
include Tools.gmk
|
||||
|
||||
JARS:=
|
||||
|
||||
##########################################################################################
|
||||
|
||||
JCONSOLE_JAR_DEPS := \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/sun/tools/jconsole/ -name "_the.package") \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/com/sun/tools/jconsole/ -name "_the.package")
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,$(JCONSOLE_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/newclasses,\
|
||||
SUFFIXES:=.class .gif .png,\
|
||||
INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
|
||||
JARMAIN:=sun.tools.jconsole.JConsole,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/jconsole.jar,\
|
||||
SKIP_METAINF:=true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/jconsole.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
CHARSETS_JAR_DEPS :=
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,$(CHARSETS_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/newclasses, \
|
||||
SUFFIXES:=.class .dat,\
|
||||
INCLUDES:=sun/nio/cs/ext,\
|
||||
EXTRA_FILES := sun/awt/HKSCS.class \
|
||||
sun/awt/motif/X11GBK.class \
|
||||
'sun/awt/motif/X11GB2312$$$$Decoder.class' \
|
||||
sun/awt/motif/X11GB2312.class \
|
||||
'sun/awt/motif/X11KSC5601$$$$Decoder.class' \
|
||||
'sun/awt/motif/X11KSC5601$$$$Encoder.class' \
|
||||
'sun/awt/motif/X11GB2312$$$$Encoder.class' \
|
||||
'sun/awt/motif/X11GBK$$$$Encoder.class' \
|
||||
sun/awt/motif/X11KSC5601.class \
|
||||
META-INF/services/java.nio.charset.spi.CharsetProvider, \
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/charsets.jar, \
|
||||
JARMAIN := NONE, \
|
||||
SKIP_METAINF := true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/charsets.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
|
||||
|
||||
$(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
|
||||
@$(ECHO) "\n>>>Installing prebuilt SunPKCS11 provider..."
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
else
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,$(SUNPKCS11_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/newclasses, \
|
||||
SUFFIXES:=.class,\
|
||||
INCLUDES:=sun/security/pkcs11,\
|
||||
JAR:=$(SUNPKCS11_JAR_DST), \
|
||||
JARMAIN := NONE, \
|
||||
SKIP_METAINF := true))
|
||||
|
||||
endif
|
||||
|
||||
JARS += $(SUNPKCS11_JAR_DST)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
|
||||
|
||||
ifndef OPENJDK
|
||||
|
||||
SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
|
||||
|
||||
$(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
|
||||
@$(ECHO) "\n>>>Installing prebuilt SunEC provider..."
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
else
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_SUNEC_JAR,$(SUNEC_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/newclasses, \
|
||||
SUFFIXES:=.class,\
|
||||
INCLUDES:=sun/security/ec,\
|
||||
EXCLUDE_FILES := \
|
||||
sun/security/ec/ECKeyFactory.class \
|
||||
sun/security/ec/ECParameters.class \
|
||||
sun/security/ec/ECPrivateKeyImpl.class \
|
||||
sun/security/ec/ECPublicKeyImpl.class \
|
||||
sun/security/ec/NamedCurve.class \
|
||||
'sun/security/ec/ECKeyFactory$$$$1.class' \
|
||||
'sun/security/ec/ECKeyFactory$$$$2.class' ,\
|
||||
JAR:=$(SUNEC_JAR_DST), \
|
||||
JARMAIN := NONE, \
|
||||
SKIP_METAINF := true))
|
||||
|
||||
endif
|
||||
|
||||
JARS += $(SUNEC_JAR_DST)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
# TODO: deps?
|
||||
$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,$(SWINGBEANS_JAR_DEPS),\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/newclasses,\
|
||||
SUFFIXES:=BeanInfo.class .gif,\
|
||||
INCLUDES:=javax/swing sun/swing,\
|
||||
EXCLUDES:=javax/swing/plaf,\
|
||||
EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
|
||||
JAR:=$(JDK_OUTPUTDIR)/lib/dt.jar,\
|
||||
JARMAIN:=NONE,\
|
||||
SKIP_METAINF:=true))
|
||||
|
||||
JARS+=$(JDK_OUTPUTDIR)/lib/dt.jar
|
||||
|
||||
##########################################################################################
|
||||
|
||||
# Need to define BUILDDIR for Release.gmk to work
|
||||
BUILDDIR=$(JDK_TOPDIR)/makefiles
|
||||
include common/Defs.gmk
|
||||
include common/Release.gmk
|
||||
|
||||
# A rudimentary attempt at band-aiding the dependency tracking.
|
||||
DEPS:= $(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses -name "*.class" -type f) \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f) \
|
||||
$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f)
|
||||
|
||||
$(IMAGES_OUTPUTDIR)/_the.images : $(DEPS) $(JARS)
|
||||
$(MKDIR) -p $(@D)
|
||||
# Restart this makefile, ugly, but since double colon (::) rules
|
||||
# have been used in Release.gmk, it is impossible to craft on
|
||||
# dependencies on these. I.e. -do-not-use- :: rules!!!!!
|
||||
# Repeat after me: -do-not-use- :: rules!!!!!
|
||||
$(MAKE) -j1 -f OldImages.gmk $(IMAGES_MAKE_ARGS) images
|
||||
$(TOUCH) $@
|
||||
|
||||
.PHONY: default
|
@ -25,12 +25,13 @@
|
||||
|
||||
JAVAC_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
|
||||
JAVAH_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar" -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar
|
||||
JAVADOC_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar" -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javadoc.jar
|
||||
|
||||
DISABLE_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
|
||||
|
||||
# The generate old bytecode javac setup uses the new compiler to compile for the
|
||||
# boot jdk to generate tools that need to be run with the boot jdk.
|
||||
# Thus we force the target bytecode to 6.
|
||||
# Thus we force the target bytecode to 7.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
|
||||
JVM:=$(JAVA),\
|
||||
JAVAC:=$(JAVAC_JARS),\
|
||||
@ -46,7 +47,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE,\
|
||||
JVM:=$(JAVA),\
|
||||
JAVAC:=$(JAVAC_JARS),\
|
||||
JAVAH:=$(JAVAH_JARS),\
|
||||
FLAGS:=-bootclasspath "$(JDK_OUTPUTDIR)/newclasses$(PATH_SEP)$(JDK_OUTPUTDIR)/classes" -Xprefer:source -XDignore.symbol.file=true $(DISABLE_WARNINGS),\
|
||||
FLAGS:=-bootclasspath "$(JDK_OUTPUTDIR)/classes" -Xprefer:source -XDignore.symbol.file=true $(DISABLE_WARNINGS),\
|
||||
SERVER_DIR:=$(JAVAC_SERVERS),\
|
||||
SERVER_JVM:=$(SERVER_JAVA),\
|
||||
MODE:=$(JAVAC_USE_MODE),\
|
||||
|
@ -23,19 +23,24 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# The exception handling of swing beaninfo which have the own tool directory
|
||||
ifeq (,$(BUILD_TOOLS))
|
||||
$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
|
||||
SETUP:=GENERATE_OLDBYTECODE,\
|
||||
SRC:=$(JDK_TOPDIR)/make/tools/src,\
|
||||
SRC:=$(JDK_TOPDIR)/make/tools/src \
|
||||
$(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator \
|
||||
$(JDK_TOPDIR)/makefiles/sun/xawt \
|
||||
$(JDK_TOPDIR)/make/tools/swing-beans,\
|
||||
BIN:=$(JDK_OUTPUTDIR)/btclasses))
|
||||
|
||||
endif
|
||||
|
||||
ifndef DISABLE_NIMBUS
|
||||
|
||||
$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template : \
|
||||
$(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
|
||||
mkdir -p $(@D)
|
||||
cp $< $@
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
|
||||
BUILD_TOOLS += $(foreach i,$(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template),$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
|
||||
|
||||
@ -112,3 +117,9 @@ TOOL_MAKECLASSLIST=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
|
||||
# Nimbus is used somewhere in the swing build.
|
||||
TOOL_GENERATENIMBUS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
|
||||
build.tools.generatenimbus.Generator
|
||||
|
||||
TOOL_WRAPPERGENERATOR=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
|
||||
WrapperGenerator
|
||||
|
||||
TOOL_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
|
||||
sun.awt.X11.ToBin
|
||||
|
@ -1,84 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2010, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile for building alternate runtime classes (not used by default)
|
||||
#
|
||||
|
||||
BUILDDIR = ..
|
||||
|
||||
PRODUCT = altclasses
|
||||
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
# Root of alternate class sources
|
||||
|
||||
ALTCLASSES_SRCDIR = $(CLOSED_SRC)/share/altclasses
|
||||
|
||||
# Alternate runtime classes
|
||||
|
||||
ALTRT_JAR_FILE = $(LIBDIR)/alt-rt.jar
|
||||
ALTRT_JAR_SOURCE_FILE = $(TEMPDIR)/alt-rt.jarsrclist
|
||||
ALTRT_JAR_SOURCES = $(wildcard $(ALTCLASSES_SRCDIR)/java/*/*.java)
|
||||
|
||||
# Use a special file suffix for the file that holds the source list
|
||||
|
||||
.SUFFIXES: .jarsrclist
|
||||
|
||||
# Build rules
|
||||
|
||||
all build:
|
||||
@if [ -d $(ALTCLASSES_SRCDIR) ] ; then \
|
||||
$(MAKE) $(ALTRT_JAR_FILE); \
|
||||
fi
|
||||
|
||||
# Source list file creation
|
||||
|
||||
$(ALTRT_JAR_SOURCE_FILE): $(ALTRT_JAR_SOURCES) FRC
|
||||
$(prep-target)
|
||||
$(ECHO) $(ALTRT_JAR_SOURCES) > $@
|
||||
|
||||
clean clobber::
|
||||
$(RM) $(ALTRT_JAR_FILE) $(ALTRT_JAR_SOURCE_FILE)
|
||||
$(RM) -r $(ALTRT_JAR_SOURCE_FILE).classes
|
||||
|
||||
include $(BUILDDIR)/common/Classes.gmk
|
||||
|
||||
# Pattern rule to turn a source list file into a jar file
|
||||
$(LIBDIR)/%.jar : $(TEMPDIR)/%.jarsrclist
|
||||
$(prep-target)
|
||||
$(RM) -r $(<).classes
|
||||
$(MKDIR) -p $(<).classes
|
||||
$(JAVAC_CMD) -implicit:none -d $(<).classes @$<
|
||||
$(BOOT_JAR_CMD) cf $@ -C $(<).classes . $(BOOT_JAR_JFLAGS)
|
||||
|
||||
# Force target
|
||||
|
||||
FRC:
|
||||
|
||||
# Non file targets
|
||||
|
||||
.PHONY: all build clean clobber
|
||||
|
@ -1,39 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile for building com/apple
|
||||
#
|
||||
|
||||
BUILDDIR = ..
|
||||
PRODUCT = sun
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
SUBDIRS = applescript
|
||||
|
||||
include $(BUILDDIR)/common/Subdirs.gmk
|
||||
|
||||
all build clean clobber::
|
||||
$(SUBDIRS-loop)
|
@ -1,71 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 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.
|
||||
#
|
||||
|
||||
BUILDDIR = ../..
|
||||
PACKAGE = apple.applescript
|
||||
LIBRARY = AppleScriptEngine
|
||||
PRODUCT = sun
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
|
||||
#
|
||||
# Files
|
||||
#
|
||||
AUTO_FILES_JAVA_DIRS = apple/applescript
|
||||
|
||||
FILES_objc = \
|
||||
$(TARGDIR)AppleScriptEngine.m \
|
||||
$(TARGDIR)AppleScriptExecutionContext.m \
|
||||
$(TARGDIR)AS_NS_ConversionUtils.m \
|
||||
$(TARGDIR)NS_Java_ConversionUtils.m
|
||||
|
||||
|
||||
FILES_export = \
|
||||
apple/applescript/AppleScriptEngine.java \
|
||||
apple/applescript/AppleScriptEngineFactory.java
|
||||
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
include $(BUILDDIR)/common/Mapfile-vers.gmk
|
||||
include $(BUILDDIR)/common/Library.gmk
|
||||
|
||||
|
||||
#
|
||||
# Extra rules
|
||||
#
|
||||
|
||||
#
|
||||
# Add to ambient vpath to get files in a subdirectory
|
||||
#
|
||||
vpath %.m $(call NativeSrcDirList,,native/apple/applescript)
|
||||
|
||||
CPPFLAGS += \
|
||||
-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
|
||||
|
||||
OTHER_LDLIBS = \
|
||||
-framework Cocoa \
|
||||
-framework Carbon \
|
||||
-framework JavaNativeFoundation
|
@ -1,44 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1997, 2010, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile for building all of java
|
||||
#
|
||||
|
||||
BUILDDIR = ..
|
||||
PRODUCT = com
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
SUBDIRS = sun oracle
|
||||
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
SUBDIRS += apple
|
||||
endif
|
||||
|
||||
include $(BUILDDIR)/common/Subdirs.gmk
|
||||
|
||||
all build clean clobber::
|
||||
$(SUBDIRS-loop)
|
||||
|
@ -1,91 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1997, 2011, 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.
|
||||
#
|
||||
|
||||
BUILDDIR = ../../..
|
||||
PACKAGE = com.apple.osx
|
||||
LIBRARY = osx
|
||||
PRODUCT = sun
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
|
||||
#
|
||||
# Files
|
||||
#
|
||||
AUTO_FILES_JAVA_DIRS = apple/launcher apple/security com/apple/concurrent com/apple/eio java/util/prefs
|
||||
|
||||
FILES_objc += \
|
||||
$(TARGDIR)Dispatch.m \
|
||||
$(TARGDIR)CFileManager.m \
|
||||
$(TARGDIR)KeystoreImpl.m \
|
||||
$(TARGDIR)JavaAppLauncher.m \
|
||||
$(TARGDIR)MacOSXPreferencesFile.m \
|
||||
$(TARGDIR)SCDynamicStoreConfig.m
|
||||
|
||||
FILES_export += \
|
||||
com/apple/concurrent/LibDispatchNative.java \
|
||||
com/apple/eio/FileManager.java \
|
||||
apple/security/KeychainStore.java \
|
||||
apple/launcher/JavaAppLauncher.java \
|
||||
java/util/prefs/MacOSXPreferencesFile.java
|
||||
|
||||
# TODO: couldn't figure out how to get resources working
|
||||
#LOCALE_SET_DEFINITION = jre
|
||||
#RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES = apple/launcher/appLauncherErrors.properties
|
||||
|
||||
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
include $(BUILDDIR)/common/Mapfile-vers.gmk
|
||||
include $(BUILDDIR)/common/Library.gmk
|
||||
|
||||
|
||||
#
|
||||
# Extra rules
|
||||
#
|
||||
|
||||
#
|
||||
# Add to ambient vpath to get files in a subdirectory
|
||||
#
|
||||
vpath %.m $(call NativeSrcDirList,,native/com/apple/concurrent)
|
||||
vpath %.m $(call NativeSrcDirList,,native/com/apple/eio)
|
||||
vpath %.m $(call NativeSrcDirList,,native/apple/launcher)
|
||||
vpath %.m $(call NativeSrcDirList,,native/apple/security)
|
||||
vpath %.m $(call NativeSrcDirList,,native/java/util)
|
||||
|
||||
CPPFLAGS += \
|
||||
$(call NativeSrcDirList,-I,native/com/apple/laf) \
|
||||
$(call NativeSrcDirList,-I,native/apple/awt) \
|
||||
$(call NativeSrcDirList,-I,native/sun/awt) \
|
||||
$(call NativeSrcDirList,-I,native/sun/osxapp)
|
||||
|
||||
OTHER_LDLIBS = \
|
||||
-losxapp \
|
||||
-framework Cocoa \
|
||||
-framework ApplicationServices \
|
||||
-framework JavaNativeFoundation \
|
||||
-framework JavaRuntimeSupport \
|
||||
-framework Security \
|
||||
-framework SystemConfiguration
|
@ -1,106 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1997, 2011, 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.
|
||||
#
|
||||
|
||||
BUILDDIR = ../../..
|
||||
PACKAGE = com.apple.osxui
|
||||
LIBRARY = osxui
|
||||
PRODUCT = sun
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
|
||||
#
|
||||
# Files
|
||||
#
|
||||
AUTO_FILES_JAVA_DIRS = apple/laf com/apple/laf com/apple/eawt
|
||||
|
||||
FILES_objc = \
|
||||
$(TARGDIR)AquaFileView.m \
|
||||
$(TARGDIR)AquaLookAndFeel.m \
|
||||
$(TARGDIR)AquaNativeResources.m \
|
||||
$(TARGDIR)JRSUIConstantSync.m \
|
||||
$(TARGDIR)JRSUIController.m \
|
||||
$(TARGDIR)JRSUIFocus.m \
|
||||
$(TARGDIR)ScreenPopupFactory.m \
|
||||
$(TARGDIR)ScreenMenu.m
|
||||
|
||||
FILES_export = \
|
||||
apple/laf/AquaLookAndFeel.java \
|
||||
apple/laf/JRSUIConstants.java \
|
||||
apple/laf/JRSUIControl.java \
|
||||
apple/laf/JRSUIFocus.java \
|
||||
apple/laf/JRSUIState.java \
|
||||
apple/laf/JRSUIStateFactory.java \
|
||||
apple/laf/JRSUIUtils.java \
|
||||
com/apple/laf/AquaFileView.java \
|
||||
com/apple/laf/AquaNativeResources.java \
|
||||
com/apple/laf/ScreenPopupFactory.java \
|
||||
com/apple/laf/ScreenMenu.java \
|
||||
com/apple/laf/ScreenMenuBar.java \
|
||||
com/apple/laf/ScreenMenuBarProvider.java \
|
||||
com/apple/laf/ScreenMenuItem.java \
|
||||
com/apple/laf/ScreenMenuItemCheckbox.java \
|
||||
com/apple/laf/ScreenMenuItemUI.java \
|
||||
com/apple/laf/ScreenMenuPropertyHandler.java \
|
||||
com/apple/laf/ScreenMenuPropertyListener.java
|
||||
|
||||
#RESOURCE_BUNDLES_COMPILED_PROPERTIES += \
|
||||
# com/apple/laf/resources/aqua.properties \
|
||||
# com/apple/laf/resources/aqua_de.properties \
|
||||
# com/apple/laf/resources/aqua_fr.properties \
|
||||
# com/apple/laf/resources/aqua_ja.properties
|
||||
|
||||
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
include $(BUILDDIR)/common/Mapfile-vers.gmk
|
||||
include $(BUILDDIR)/common/Library.gmk
|
||||
|
||||
|
||||
#
|
||||
# Extra rules
|
||||
#
|
||||
|
||||
#
|
||||
# Add to ambient vpath to get files in a subdirectory
|
||||
#
|
||||
vpath %.m $(call NativeSrcDirList,,native/com/apple/laf)
|
||||
vpath %.m $(call NativeSrcDirList,,native/com/apple/eawt)
|
||||
|
||||
CPPFLAGS += \
|
||||
$(call NativeSrcDirList,-I,native/com/apple/laf) \
|
||||
$(call NativeSrcDirList,-I,native/apple/awt) \
|
||||
$(call NativeSrcDirList,-I,native/sun/awt) \
|
||||
$(call NativeSrcDirList,-I,native/sun/osxapp) \
|
||||
-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
|
||||
|
||||
OTHER_LDLIBS = \
|
||||
-lawt -losxapp \
|
||||
-lawt_lwawt -L$(LIBDIR) -Xlinker -rpath -Xlinker @loader_path \
|
||||
-framework Cocoa \
|
||||
-framework Carbon \
|
||||
-framework ApplicationServices \
|
||||
-framework JavaNativeFoundation \
|
||||
-framework JavaRuntimeSupport
|
@ -1,73 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 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.
|
||||
#
|
||||
|
||||
BUILDDIR = ../../..
|
||||
PACKAGE = oracle.jrockit.jfr
|
||||
LIBRARY = jfr
|
||||
PRODUCT = oracle
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
#
|
||||
# Use mapfile
|
||||
#
|
||||
FILES_m = $(CLOSED_SHARE_SRC)/native/oracle/jfr/mapfile-vers
|
||||
include $(BUILDDIR)/common/Mapfile-vers.gmk
|
||||
|
||||
#
|
||||
# Files to compile
|
||||
#
|
||||
FILES_c = VMJFR.c
|
||||
|
||||
AUTO_FILES_JAVA_DIRS = com/oracle/jrockit/jfr oracle/jrockit/jfr
|
||||
|
||||
# Find C source files
|
||||
#
|
||||
vpath %.c $(CLOSED_SHARE_SRC)/native/oracle/jfr
|
||||
|
||||
#
|
||||
# Library to compile.
|
||||
#
|
||||
include $(BUILDDIR)/common/Library.gmk
|
||||
|
||||
JVMLIB =
|
||||
JAVALIB =
|
||||
OTHER_LDLIBS =
|
||||
|
||||
clean clobber::
|
||||
$(RM) -r $(CLASSDESTDIR)/com/oracle/jrockit/jfr
|
||||
$(RM) -r $(CLASSDESTDIR)/oracle/jrockit/jfr
|
||||
|
||||
|
||||
# Copy pre-shipped .jfs files
|
||||
JFR_LIBDIR = $(LIBDIR)/jfr
|
||||
JFR_SRCDIR = $(CLOSED_SHARE_SRC)/lib/jfr
|
||||
|
||||
$(JFR_LIBDIR)/%.jfs: $(JFR_SRCDIR)/%.jfs
|
||||
$(install-file)
|
||||
|
||||
JFS_FILES := $(subst $(JFR_SRCDIR),$(JFR_LIBDIR),$(wildcard $(JFR_SRCDIR)/*.jfs))
|
||||
|
||||
all build : $(JFS_FILES)
|
||||
|
@ -1,270 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile for building ucrypto.jar and its native libraries.
|
||||
#
|
||||
# This file was modified from make/sun/security/pkcs11/Makefile.
|
||||
#
|
||||
#
|
||||
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Oracle
|
||||
# JDK builds respectively.)
|
||||
#
|
||||
# This Makefile does the "real" build of the Ucrypto provider files.
|
||||
# Since the sources are unavailable for OpenJDK, this Makefile is only
|
||||
# useful for JDK.
|
||||
#
|
||||
#
|
||||
# Main Targets (JDK on Solaris):
|
||||
#
|
||||
# all The usual, ucrypto.jar plus the native libraries.
|
||||
# builds and installs the prebuilt/signed jar.
|
||||
#
|
||||
# clobber/clean Cleans up the temp directory, ucrypto.jar, the
|
||||
# native libraries, and the config file from the
|
||||
# build area
|
||||
#
|
||||
# jar Builds, signs and installs ucrypto.jar
|
||||
# (Can only be done on machines with access to
|
||||
# the signing keystore)
|
||||
#
|
||||
# Other lesser-used Targets (JDK on Solaris):
|
||||
#
|
||||
# build-jar Builds ucrypto.jar (no sign/install)
|
||||
#
|
||||
# sign Builds/signs ucrypto.jar (no install)
|
||||
#
|
||||
# release Builds all targets in preparation
|
||||
# for workspace integration.
|
||||
# (Can only be done on machines with access to
|
||||
# the signing keystore)
|
||||
#
|
||||
# install-prebuilt Installs the pre-built jar files
|
||||
#
|
||||
# NOTE: None of the above target will update the prebuilt provider binary
|
||||
# under the closed workspace. To update it, you must explicitly copy the
|
||||
# binary from either the tmp/signed or lib/ext directory.
|
||||
#
|
||||
# This makefile was written to support parallel target execution.
|
||||
#
|
||||
|
||||
BUILDDIR = ../../../..
|
||||
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
ifndef OPENJDK
|
||||
ifneq ($(PLATFORM), solaris)
|
||||
all:
|
||||
else
|
||||
PACKAGE = com.oracle.security.ucrypto
|
||||
LIBRARY = j2ucrypto
|
||||
PRODUCT = oracle
|
||||
|
||||
#
|
||||
# The following is for when we need to do postprocessing
|
||||
# (signing/obfuscation) against a read-only build. If the OUTPUTDIR
|
||||
# isn't writable, the build currently crashes out.
|
||||
#
|
||||
ifdef ALT_JCE_BUILD_DIR
|
||||
# =====================================================
|
||||
# Where to place the output, in case we're building from a read-only
|
||||
# build area. (e.g. a release engineering build.)
|
||||
JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
|
||||
IGNORE_WRITABLE_OUTPUTDIR_TEST=true
|
||||
else
|
||||
JCE_BUILD_DIR=${TEMPDIR}
|
||||
endif
|
||||
|
||||
JAVAC_MAX_WARNINGS=false
|
||||
JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation
|
||||
JAVAC_WARNINGS_FATAL=true
|
||||
|
||||
#
|
||||
# C and Java Files
|
||||
#
|
||||
include FILES_c.gmk
|
||||
|
||||
#
|
||||
# Subdirectories of these are automatically included.
|
||||
#
|
||||
AUTO_FILES_JAVA_DIRS = com/oracle/security/ucrypto
|
||||
|
||||
#
|
||||
# Java files that define native methods
|
||||
#
|
||||
FILES_export = \
|
||||
com/oracle/security/ucrypto/UcryptoProvider.java \
|
||||
com/oracle/security/ucrypto/NativeCipher.java \
|
||||
com/oracle/security/ucrypto/NativeDigest.java \
|
||||
com/oracle/security/ucrypto/NativeKey.java \
|
||||
com/oracle/security/ucrypto/NativeRSASignature.java \
|
||||
com/oracle/security/ucrypto/NativeRSACipher.java
|
||||
|
||||
#
|
||||
# Find native code
|
||||
#
|
||||
vpath %.c \
|
||||
$(CLOSED_PLATFORM_SRC)/native/com/oracle/security/ucrypto
|
||||
|
||||
#
|
||||
# Find include files
|
||||
#
|
||||
OTHER_INCLUDES += \
|
||||
-I$(CLOSED_PLATFORM_SRC)/native/com/oracle/security/ucrypto
|
||||
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
CLASSDESTDIR = $(TEMPDIR)/classes
|
||||
JAVAHFLAGS = -bootclasspath \
|
||||
"$(CLASSDESTDIR)$(CLASSPATH_SEPARATOR)$(CLASSBINDIR)$(JCE_PATH)"
|
||||
|
||||
include $(BUILDDIR)/common/Mapfile-vers.gmk
|
||||
include $(BUILDDIR)/common/Library.gmk
|
||||
|
||||
#
|
||||
# Libraries to link
|
||||
#
|
||||
OTHER_LDLIBS = -ldl
|
||||
|
||||
# Default config file
|
||||
UCRYPTO_CFG_SRC = $(CLOSED_SRC)/share/lib/security/ucrypto-solaris.cfg
|
||||
UCRYPTO_CFG_BUILD = $(LIBDIR)/security/ucrypto-solaris.cfg
|
||||
|
||||
#
|
||||
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
|
||||
# part of the build we're doing. Build is initially done in the unsigned
|
||||
# area and when files are signed, they will be placed in the appropriate area.
|
||||
#
|
||||
UNSIGNED_DIR = $(TEMPDIR)/unsigned
|
||||
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
all: ucrypto-cfg build-jar install-prebuilt
|
||||
$(build-warning)
|
||||
|
||||
ucrypto-cfg: $(UCRYPTO_CFG_BUILD)
|
||||
|
||||
$(UCRYPTO_CFG_BUILD): $(UCRYPTO_CFG_SRC)
|
||||
$(install-file)
|
||||
|
||||
include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
|
||||
|
||||
|
||||
# =====================================================
|
||||
# Build the unsigned ucrypto.jar file.
|
||||
#
|
||||
|
||||
JAR_DESTFILE = $(EXTDIR)/ucrypto.jar
|
||||
|
||||
#
|
||||
# The ucrypto.jar needs to be in the extension class directory,
|
||||
# therefore none of its classes can appear in $(CLASSBINDIR).
|
||||
# Currently no one is using any of the internals, so these files
|
||||
# should not have been built.
|
||||
#
|
||||
|
||||
#
|
||||
# Since the -C option to jar is used below, each directory entry must be
|
||||
# preceded with the appropriate directory to "cd" into.
|
||||
#
|
||||
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
|
||||
|
||||
build-jar: $(UNSIGNED_DIR)/ucrypto.jar
|
||||
|
||||
#
|
||||
# Build ucrypto.jar.
|
||||
#
|
||||
$(UNSIGNED_DIR)/ucrypto.jar: build
|
||||
$(prep-target)
|
||||
$(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
|
||||
$(BOOT_JAR_JFLAGS)
|
||||
@$(java-vm-cleanup)
|
||||
|
||||
#
|
||||
# Sign ucrypto.jar
|
||||
#
|
||||
SIGNED_DIR = $(JCE_BUILD_DIR)/signed
|
||||
|
||||
sign: $(SIGNED_DIR)/ucrypto.jar
|
||||
|
||||
ifndef ALT_JCE_BUILD_DIR
|
||||
$(SIGNED_DIR)/ucrypto.jar: $(UNSIGNED_DIR)/ucrypto.jar
|
||||
else
|
||||
#
|
||||
# We have to remove the build dependency, otherwise, we'll try to rebuild it
|
||||
# which we can't do on a read-only filesystem.
|
||||
#
|
||||
$(SIGNED_DIR)/ucrypto.jar:
|
||||
@if [ ! -r $(UNSIGNED_DIR)/ucrypto.jar ] ; then \
|
||||
$(ECHO) "Couldn't find $(UNSIGNED_DIR)/ucrypto.jar"; \
|
||||
exit 1; \
|
||||
fi
|
||||
endif
|
||||
$(call sign-file, $(UNSIGNED_DIR)/ucrypto.jar)
|
||||
|
||||
|
||||
# =====================================================
|
||||
# Create the Release Engineering files. Signed builds, etc.
|
||||
#
|
||||
|
||||
release: $(SIGNED_DIR)/ucrypto.jar
|
||||
$(RM) $(JCE_BUILD_DIR)/release/ucrypto.jar
|
||||
$(MKDIR) -p $(JCE_BUILD_DIR)/release
|
||||
$(CP) $(SIGNED_DIR)/ucrypto.jar $(JCE_BUILD_DIR)/release
|
||||
$(release-warning)
|
||||
|
||||
|
||||
# =====================================================
|
||||
# Install routines.
|
||||
#
|
||||
|
||||
#
|
||||
# Install ucrypto.jar, depending on which type is requested.
|
||||
#
|
||||
jar: $(JAR_DESTFILE)
|
||||
$(release-warning)
|
||||
|
||||
$(JAR_DESTFILE): $(SIGNED_DIR)/ucrypto.jar
|
||||
$(install-file)
|
||||
|
||||
install-prebuilt:
|
||||
@$(ECHO) "\n>>>Installing prebuilt OracleUcrypto provider..."
|
||||
$(RM) $(JAR_DESTFILE)
|
||||
$(CP) $(PREBUILT_DIR)/ucrypto/ucrypto.jar $(JAR_DESTFILE)
|
||||
|
||||
|
||||
# =====================================================
|
||||
# Support routines.
|
||||
#
|
||||
clobber clean::
|
||||
$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
|
||||
$(RM) -r $(UCRYPTO_CFG_BUILD)
|
||||
|
||||
.PHONY: build-jar jar sign release install-prebuilt
|
||||
|
||||
endif #ifneq ($(PLATFORM), solaris)
|
||||
endif #ifndef OPENJDK
|
@ -1,54 +0,0 @@
|
||||
|
||||
#
|
||||
# Copyright (c) 1997, 2011, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile for building com/sun
|
||||
#
|
||||
|
||||
BUILDDIR = ../..
|
||||
PRODUCT = sun
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
ifndef OPENJDK
|
||||
ORG_EXISTS := $(call DirExists,$(CLOSED_SRC)/share/classes/sun/org,,)
|
||||
ifneq ("$(ORG_EXISTS)", "")
|
||||
SCRIPT_SUBDIR = script
|
||||
endif
|
||||
endif
|
||||
|
||||
# jarsigner is part of JRE
|
||||
SUBDIRS =
|
||||
|
||||
SUBDIRS_management =
|
||||
SUBDIRS_enterprise = crypto/provider
|
||||
SUBDIRS_misc =
|
||||
|
||||
# Omit mirror since it's built with the apt tool.
|
||||
|
||||
include $(BUILDDIR)/common/Subdirs.gmk
|
||||
|
||||
all build clean clobber::
|
||||
$(SUBDIRS-loop)
|
@ -106,10 +106,10 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
|
||||
|
||||
# For all platforms, do not omit the frame pointer register usage.
|
||||
# We need this frame pointer to make it easy to walk the stacks.
|
||||
# This should be the default on X86, but ia64 and amd64 may not have this
|
||||
# as the default.
|
||||
CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||
LDFLAGS_COMMON_amd64 += -m64
|
||||
# This should be the default on X86, but ia64, and x86_64
|
||||
# may not have this as the default.
|
||||
CFLAGS_REQUIRED_x86_64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||
LDFLAGS_COMMON_x86_64 += -m64
|
||||
CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||
LDFLAGS_COMMON_i586 += -m32
|
||||
CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||
@ -163,7 +163,7 @@ PIC_CODE_LARGE = -fPIC
|
||||
PIC_CODE_SMALL = -fpic
|
||||
GLOBAL_KPIC = $(PIC_CODE_LARGE)
|
||||
CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS)
|
||||
ifeq ($(ARCH), amd64)
|
||||
ifeq ($(ARCH), x86_64)
|
||||
CFLAGS_COMMON += -pipe
|
||||
endif
|
||||
|
||||
|
@ -29,14 +29,14 @@ JA_DIRNAME=ja_JP.UTF-8
|
||||
|
||||
# Defines the release targets for Mac OS X build products
|
||||
|
||||
JDK_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2sdk-bundle/$(THIS_JDK_VERSION).jdk/Contents
|
||||
JRE_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2re-bundle/$(THIS_JDK_VERSION).jre/Contents
|
||||
JDK_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
|
||||
JRE_BUNDLE_DIR = $(ABS_OUTPUTDIR)/j2re-bundle/jre$(JDK_VERSION).jre/Contents
|
||||
|
||||
MACOSX_SRC = $(JDK_TOPDIR)/src/macosx
|
||||
|
||||
BUNDLE_ID ?= net.java.openjdk
|
||||
BUNLDE_ID_JRE ?= $(BUNDLE_ID).jre
|
||||
BUNLDE_ID_JDK ?= $(BUNDLE_ID).jdk
|
||||
BUNDLE_ID_JRE ?= $(BUNDLE_ID).jre
|
||||
BUNDLE_ID_JDK ?= $(BUNDLE_ID).jdk
|
||||
|
||||
BUNDLE_NAME ?= OpenJDK $(JDK_MINOR_VERSION)
|
||||
BUNDLE_NAME_JRE ?= $(BUNDLE_NAME)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user