8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282 Co-authored-by: Alex Buckley <alex.buckley@oracle.com> Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com> Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com> Co-authored-by: Mandy Chung <mandy.chung@oracle.com> Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com> Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com> Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com> Co-authored-by: Christian Tornqvist <christian.tornqvist@oracle.com> Co-authored-by: Harold Seigel <harold.seigel@oracle.com> Co-authored-by: Igor Ignatyev <igor.ignatyev@oracle.com> Co-authored-by: James Laskey <james.laskey@oracle.com> Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com> Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com> Reviewed-by: alanb, mchung, tbell
This commit is contained in:
parent
512604605c
commit
cc661dd1c6
@ -843,6 +843,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
|
||||
# The bootcycle-spec.gmk file contains support for boot cycle builds.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
|
||||
# The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in])
|
||||
# The compare.sh is used to compare the build output to other builds.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
|
||||
# The generated Makefile knows where the spec.gmk is and where the source is.
|
||||
|
@ -304,6 +304,18 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
# When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
|
||||
BOOT_JDK_SOURCETARGET="-source 8 -target 8"
|
||||
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
||||
|
||||
ADD_JVM_ARG_IF_OK([-Xpatch:], dummy, [$JAVA])
|
||||
AC_MSG_CHECKING([if Boot JDK supports modules])
|
||||
if test "x$JVM_ARG_OK" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BOOT_JDK_MODULAR="true"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
BOOT_JDK_MODULAR="false"
|
||||
fi
|
||||
AC_SUBST(BOOT_JDK_MODULAR)
|
||||
|
||||
AC_SUBST(JAVAC_FLAGS)
|
||||
|
||||
# Check if the boot jdk is 32 or 64 bit
|
||||
@ -397,3 +409,100 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
done
|
||||
AC_SUBST(JAVA_TOOL_FLAGS_SMALL)
|
||||
])
|
||||
|
||||
# BUILD_JDK: the location of the latest JDK that can run
|
||||
# on the host system and supports the target class file version
|
||||
# generated in this JDK build. This variable should only be
|
||||
# used after the launchers are built.
|
||||
#
|
||||
|
||||
# Execute the check given as argument, and verify the result.
|
||||
# If the JDK was previously found, do nothing.
|
||||
# $1 A command line (typically autoconf macro) to execute
|
||||
AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
|
||||
[
|
||||
if test "x$BUILD_JDK_FOUND" = xno; then
|
||||
# Execute the test
|
||||
$1
|
||||
|
||||
# If previous step claimed to have found a JDK, check it to see if it seems to be valid.
|
||||
if test "x$BUILD_JDK_FOUND" = xmaybe; then
|
||||
# Do we have a bin/java?
|
||||
if test ! -x "$BUILD_JDK/bin/java"; then
|
||||
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring])
|
||||
BUILD_JDK_FOUND=no
|
||||
elif test ! -x "$BUILD_JDK/bin/jlink"; then
|
||||
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring])
|
||||
BUILD_JDK_FOUND=no
|
||||
elif test ! -x "$BUILD_JDK/bin/javac"; then
|
||||
# Do we have a bin/javac?
|
||||
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring])
|
||||
AC_MSG_NOTICE([(This might be a JRE instead of an JDK)])
|
||||
BUILD_JDK_FOUND=no
|
||||
else
|
||||
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
|
||||
BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep '\"1\.[9]\.'`]
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
|
||||
AC_MSG_NOTICE([(Your Build JDK must be version 9)])
|
||||
BUILD_JDK_FOUND=no
|
||||
else
|
||||
# We're done!
|
||||
BUILD_JDK_FOUND=yes
|
||||
BASIC_FIXUP_PATH(BUILD_JDK)
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([$BUILD_JDK])
|
||||
AC_MSG_CHECKING([Build JDK version])
|
||||
BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
|
||||
AC_MSG_RESULT([$BUILD_JDK_VERSION])
|
||||
fi # end check jdk version
|
||||
fi # end check java
|
||||
fi # end check build jdk found
|
||||
fi
|
||||
])
|
||||
|
||||
# By default the BUILD_JDK is the JDK_OUTPUTDIR. If the target architecture
|
||||
# is different than the host system doing the build (e.g. cross-compilation),
|
||||
# a special BUILD_JDK is built as part of the build process. An external
|
||||
# prebuilt BUILD_JDK can also be supplied.
|
||||
AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
|
||||
[
|
||||
AC_ARG_WITH(build-jdk, [AS_HELP_STRING([--with-build-jdk],
|
||||
[path to JDK of same version as is being built@<:@the newly built JDK@:>@])])
|
||||
|
||||
CREATE_BUILDJDK_FOR_HOST=false
|
||||
BUILD_JDK_FOUND="no"
|
||||
if test "x$with_build_jdk" != "x"; then
|
||||
BOOTJDK_CHECK_BUILD_JDK([
|
||||
if test "x$with_build_jdk" != x; then
|
||||
BUILD_JDK=$with_build_jdk
|
||||
BUILD_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
|
||||
fi])
|
||||
else
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
|
||||
BUILD_JDK_FOUND=yes
|
||||
CREATE_BUILDJDK=true
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([yes, will build it for the host platform])
|
||||
else
|
||||
BUILD_JDK="\$(JDK_OUTPUTDIR)"
|
||||
BUILD_JDK_FOUND=yes
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([yes, will use output dir])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BUILD_JDK_FOUND" != "xyes"; then
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find a suitable Build JDK])
|
||||
fi
|
||||
|
||||
AC_SUBST(CREATE_BUILDJDK)
|
||||
AC_SUBST(BUILD_JDK)
|
||||
])
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
# Support for building boot cycle builds
|
||||
|
||||
BOOT_JDK_MODULAR := true
|
||||
|
||||
# First include the real base spec.gmk file
|
||||
include @SPEC@
|
||||
|
||||
|
148
common/autoconf/buildjdk-spec.gmk.in
Normal file
148
common/autoconf/buildjdk-spec.gmk.in
Normal file
@ -0,0 +1,148 @@
|
||||
#
|
||||
# Copyright (c) 2015, 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.
|
||||
#
|
||||
|
||||
# This spec file is used to compile a BUILD_JDK while cross compiling. The
|
||||
# BUILD_JDK runs on the build/host platform and is of the same version as
|
||||
# the main build.
|
||||
|
||||
# First include the real base spec.gmk file
|
||||
include @SPEC@
|
||||
|
||||
CC := @BUILD_CC@
|
||||
CXX := @BUILD_CXX@
|
||||
LD := @BUILD_LD@
|
||||
AS := @BUILD_AS@
|
||||
NM := @BUILD_NM@
|
||||
AR := @BUILD_AR@
|
||||
OBJCOPY := @BUILD_OBJCOPY@
|
||||
STRIP := @BUILD_STRIP@
|
||||
SYSROOT_CFLAGS := @BUILD_SYSROOT_CFLAGS@
|
||||
SYSROOT_LDFLAGS := @BUILD_SYSROOT_LDFLAGS@
|
||||
|
||||
# These directories should not be moved to BUILDJDK_OUTPUTDIR
|
||||
HOTSPOT_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(HOTSPOT_OUTPUTDIR))
|
||||
HOTSPOT_DIST := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(HOTSPOT_DIST))
|
||||
SUPPORT_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(SUPPORT_OUTPUTDIR))
|
||||
JDK_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(JDK_OUTPUTDIR))
|
||||
|
||||
OPENJDK_BUILD_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
|
||||
OPENJDK_BUILD_CPU_LEGACY_LIB := @OPENJDK_BUILD_CPU_LEGACY_LIB@
|
||||
OPENJDK_BUILD_CPU_LIBDIR := @OPENJDK_BUILD_CPU_LIBDIR@
|
||||
OPENJDK_TARGET_CPU_LIBDIR := @OPENJDK_BUILD_CPU_LIBDIR@
|
||||
OPENJDK_TARGET_CPU := @OPENJDK_BUILD_CPU@
|
||||
OPENJDK_TARGET_CPU_ARCH := @OPENJDK_BUILD_CPU_ARCH@
|
||||
OPENJDK_TARGET_CPU_BITS := @OPENJDK_BUILD_CPU_BITS@
|
||||
OPENJDK_TARGET_CPU_ENDIAN := @OPENJDK_BUILD_CPU_ENDIAN@
|
||||
OPENJDK_TARGET_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
|
||||
|
||||
CFLAGS_JDKLIB := @OPENJDK_BUILD_CFLAGS_JDKLIB@
|
||||
CXXFLAGS_JDKLIB := @OPENJDK_BUILD_CXXFLAGS_JDKLIB@
|
||||
LDFLAGS_JDKLIB := @OPENJDK_BUILD_LDFLAGS_JDKLIB@
|
||||
CFLAGS_JDKEXE := @OPENJDK_BUILD_CFLAGS_JDKEXE@
|
||||
CXXFLAGS_JDKEXE := @OPENJDK_BUILD_CXXFLAGS_JDKEXE@
|
||||
LDFLAGS_JDKEXE := @OPENJDK_BUILD_LDFLAGS_JDKEXE@
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS := @OPENJDK_BUILD_CPU_JLI_CFLAGS@
|
||||
|
||||
# The compiler for the build platform is likely not warning compatible with the official
|
||||
# compiler.
|
||||
WARNINGS_AS_ERRORS := false
|
||||
DISABLE_WARNING_PREFIX := @BUILD_CC_DISABLE_WARNING_PREFIX@
|
||||
|
||||
# Save speed and disk space by not enabling debug symbols for the buildjdk
|
||||
ENABLE_DEBUG_SYMBOLS := false
|
||||
|
||||
####################################################
|
||||
#
|
||||
# Legacy Hotspot support
|
||||
|
||||
# Legacy setting: OPT or DBG
|
||||
VARIANT := OPT
|
||||
# Legacy setting: true or false
|
||||
FASTDEBUG := false
|
||||
# Legacy setting: debugging the class files?
|
||||
DEBUG_CLASSFILES := false
|
||||
|
||||
# Some users still set EXTRA_*FLAGS on the make command line. Must
|
||||
# make sure to override that when building buildjdk.
|
||||
override EXTRA_CFLAGS :=
|
||||
override EXTRA_CXXFLAGS :=
|
||||
override EXTRA_LDFLAGS :=
|
||||
|
||||
# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
|
||||
# compiler that produces code that can be run on the build platform.
|
||||
HOSTCC := $(BUILD_CC)
|
||||
HOSTCXX := $(BUILD_CXX)
|
||||
|
||||
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
|
||||
PLATFORM := $(OPENJDK_BUILD_OS)
|
||||
# 32 or 64 bit
|
||||
ARCH_DATA_MODEL := $(OPENJDK_BUILD_CPU_BITS)
|
||||
|
||||
ALT_BOOTDIR := $(BOOT_JDK)
|
||||
# Yet another name for arch used for an extra subdir below the jvm lib.
|
||||
# Uses i386 and amd64, instead of x86 and x86_64.
|
||||
LIBARCH := @OPENJDK_BUILD_CPU_LEGACY_LIB@
|
||||
# Set the cpu architecture. Some users still set ARCH on the make command line. Must
|
||||
# make sure to override that when building buildjdk.
|
||||
override ARCH := $(OPENJDK_BUILD_CPU_ARCH)
|
||||
# Legacy setting for building for a 64 bit machine.
|
||||
# If yes then this expands to _LP64 := 1
|
||||
ifeq ($(OPENJDK_BUILD_CPU_BITS), 64)
|
||||
_LP64 := 1
|
||||
endif
|
||||
|
||||
ALT_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)
|
||||
ALT_EXPORT_PATH := $(HOTSPOT_DIST)
|
||||
|
||||
JVM_INTERPRETER := @JVM_INTERPRETER@
|
||||
ifeq ($(JVM_INTERPRETER), cpp)
|
||||
CC_INTERP=true
|
||||
endif
|
||||
|
||||
HOTSPOT_MAKE_ARGS := product docs export_product
|
||||
# Control wether Hotspot runs Queens test after building
|
||||
TEST_IN_BUILD := false
|
||||
|
||||
USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@
|
||||
|
||||
# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
|
||||
# creation.
|
||||
FULL_DEBUG_SYMBOLS := 0
|
||||
ZIP_DEBUGINFO_FILES := 0
|
||||
# Disable stripping
|
||||
STRIP_POLICY := none
|
||||
|
||||
JVM_VARIANTS := server
|
||||
JVM_VARIANT_SERVER := true
|
||||
JVM_VARIANT_CLIENT := false
|
||||
JVM_VARIANT_MINIMAL1 := false
|
||||
JVM_VARIANT_KERNEL := false
|
||||
JVM_VARIANT_ZERO := false
|
||||
JVM_VARIANT_ZEROSHARK := false
|
||||
JVM_VARIANT_CORE := false
|
||||
|
||||
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
|
||||
# This is needed to get the LOG setting to work properly.
|
||||
include $(SRC_ROOT)/make/common/MakeBase.gmk
|
@ -134,6 +134,7 @@ BASIC_SETUP_DEFAULT_MAKE_TARGET
|
||||
|
||||
# We need build & target for this.
|
||||
JDKOPT_SETUP_JDK_OPTIONS
|
||||
JDKOPT_SETUP_JLINK_OPTIONS
|
||||
HOTSPOT_SETUP_HOTSPOT_OPTIONS
|
||||
JDKVER_SETUP_JDK_VERSION_NUMBERS
|
||||
|
||||
@ -144,6 +145,7 @@ JDKVER_SETUP_JDK_VERSION_NUMBERS
|
||||
###############################################################################
|
||||
|
||||
BOOTJDK_SETUP_BOOT_JDK
|
||||
BOOTJDK_SETUP_BUILD_JDK
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -155,6 +157,8 @@ SRCDIRS_SETUP_TOPDIRS
|
||||
SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS
|
||||
SRCDIRS_SETUP_OUTPUT_DIRS
|
||||
|
||||
SRCDIRS_SETUP_IMPORT_MODULES
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup the toolchain (compilers etc), i.e. tools used to compile and process
|
||||
|
@ -689,9 +689,6 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setup LP64
|
||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
|
||||
|
||||
# Set some common defines. These works for all compilers, but assume
|
||||
# -D is universally accepted.
|
||||
|
||||
@ -722,7 +719,12 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
|
||||
|
||||
# Setup target CPU
|
||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
|
||||
OPENJDK_TARGET_CCXXFLAGS_JDK="$OPENJDK_TARGET_CCXXFLAGS_JDK \
|
||||
$ADD_LP64 \
|
||||
-DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
|
||||
OPENJDK_BUILD_CCXXFLAGS_JDK="$OPENJDK_BUILD_CCXXFLAGS_JDK \
|
||||
$OPENJDK_BUILD_ADD_LP64 \
|
||||
-DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
|
||||
|
||||
# Setup debug/release defines
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
@ -766,17 +768,35 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
|
||||
|
||||
# The shared libraries are compiled using the picflag.
|
||||
CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
|
||||
CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
|
||||
CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
|
||||
$CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
|
||||
CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
|
||||
$CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
|
||||
|
||||
# Executable flags
|
||||
CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
|
||||
CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
|
||||
CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
|
||||
$CFLAGS_JDK $EXTRA_CFLAGS_JDK"
|
||||
CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
|
||||
$CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
|
||||
|
||||
# The corresponding flags for building for the build platform. This is still an
|
||||
# approximation, we only need something that runs on this machine when cross
|
||||
# compiling the product.
|
||||
OPENJDK_BUILD_CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK \
|
||||
$PICFLAG $CFLAGS_JDKLIB_EXTRA"
|
||||
OPENJDK_BUILD_CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK \
|
||||
$PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
|
||||
OPENJDK_BUILD_CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK"
|
||||
OPENJDK_BUILD_CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK"
|
||||
|
||||
AC_SUBST(CFLAGS_JDKLIB)
|
||||
AC_SUBST(CFLAGS_JDKEXE)
|
||||
AC_SUBST(CXXFLAGS_JDKLIB)
|
||||
AC_SUBST(CXXFLAGS_JDKEXE)
|
||||
AC_SUBST(OPENJDK_BUILD_CFLAGS_JDKLIB)
|
||||
AC_SUBST(OPENJDK_BUILD_CFLAGS_JDKEXE)
|
||||
AC_SUBST(OPENJDK_BUILD_CXXFLAGS_JDKLIB)
|
||||
AC_SUBST(OPENJDK_BUILD_CXXFLAGS_JDKEXE)
|
||||
|
||||
# Flags for compiling test libraries
|
||||
CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
|
||||
@ -872,6 +892,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
|
||||
fi
|
||||
|
||||
OPENJDK_BUILD_LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE}"
|
||||
LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
|
||||
|
||||
# Customize LDFLAGS for libs
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
|
||||
|
||||
@ -882,30 +905,39 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
JDKLIB_LIBS=""
|
||||
else
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
|
||||
-L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
|
||||
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
|
||||
|
||||
# On some platforms (mac) the linker warns about non existing -L dirs.
|
||||
# Add server first if available. Linking aginst client does not always produce the same results.
|
||||
# Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
|
||||
# Default to server for other variants.
|
||||
if test "x$JVM_VARIANT_SERVER" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
|
||||
elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
|
||||
elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
|
||||
else
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
|
||||
fi
|
||||
|
||||
JDKLIB_LIBS="-ljava -ljvm"
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
JDKLIB_LIBS="$JDKLIB_LIBS -lc"
|
||||
fi
|
||||
|
||||
# When building a buildjdk, it's always only the server variant
|
||||
OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
|
||||
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
|
||||
fi
|
||||
|
||||
OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${LDFLAGS_JDKLIB}"
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
|
||||
|
||||
AC_SUBST(LDFLAGS_JDKLIB)
|
||||
AC_SUBST(LDFLAGS_JDKEXE)
|
||||
AC_SUBST(OPENJDK_BUILD_LDFLAGS_JDKLIB)
|
||||
AC_SUBST(OPENJDK_BUILD_LDFLAGS_JDKEXE)
|
||||
AC_SUBST(JDKLIB_LIBS)
|
||||
AC_SUBST(JDKEXE_LIBS)
|
||||
AC_SUBST(LDFLAGS_CXX_JDK)
|
||||
@ -1075,5 +1107,6 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(DISABLE_WARNING_PREFIX)
|
||||
AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
|
||||
AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
|
||||
])
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -405,3 +405,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
|
||||
|
||||
AC_SUBST(STATIC_BUILD)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# jlink options.
|
||||
# We always keep packaged modules in JDK image.
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
|
||||
[
|
||||
AC_ARG_ENABLE([keep-packaged-modules], [AS_HELP_STRING([--disable-keep-packaged-modules],
|
||||
[Do not keep packaged modules in jdk image @<:@enable@:>@])])
|
||||
|
||||
if test "x$enable_keep_packaged_modules" = "xyes"; then
|
||||
AC_MSG_CHECKING([if packaged modules are kept])
|
||||
AC_MSG_RESULT([yes])
|
||||
JLINK_KEEP_PACKAGED_MODULES=true
|
||||
elif test "x$enable_keep_packaged_modules" = "xno"; then
|
||||
AC_MSG_CHECKING([if packaged modules are kept])
|
||||
AC_MSG_RESULT([no])
|
||||
JLINK_KEEP_PACKAGED_MODULES=false
|
||||
elif test "x$enable_keep_packaged_modules" = "x"; then
|
||||
AC_MSG_RESULT([yes (default)])
|
||||
JLINK_KEEP_PACKAGED_MODULES=true
|
||||
else
|
||||
AC_MSG_ERROR([--enable-keep-packaged-modules accepts no argument])
|
||||
fi
|
||||
|
||||
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
|
||||
])
|
||||
|
@ -304,6 +304,37 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR)
|
||||
|
||||
# Now do the same for OPENJDK_BUILD_CPU...
|
||||
# Also store the legacy naming of the cpu.
|
||||
# Ie i586 and amd64 instead of x86 and x86_64
|
||||
OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
|
||||
if test "x$OPENJDK_BUILD_CPU" = xx86; then
|
||||
OPENJDK_BUILD_CPU_LEGACY="i586"
|
||||
elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
|
||||
# On all platforms except MacOSX replace x86_64 with amd64.
|
||||
OPENJDK_BUILD_CPU_LEGACY="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_LEGACY)
|
||||
|
||||
# And the second legacy naming of the cpu.
|
||||
# Ie i386 and amd64 instead of x86 and x86_64.
|
||||
OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
|
||||
if test "x$OPENJDK_BUILD_CPU" = xx86; then
|
||||
OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
|
||||
elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
|
||||
OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_LEGACY_LIB)
|
||||
|
||||
# This is the name of the cpu (but using i386 and amd64 instead of
|
||||
# x86 and x86_64, respectively), preceeded by a /, to be used when
|
||||
# locating libraries. On macosx, it's empty, though.
|
||||
OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
OPENJDK_BUILD_CPU_LIBDIR=""
|
||||
fi
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_LIBDIR)
|
||||
|
||||
# OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
|
||||
# /amd64 or /sparcv9. This string is appended to some library paths, like this:
|
||||
# /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
|
||||
@ -346,6 +377,24 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
|
||||
|
||||
OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
|
||||
if test "x$OPENJDK_BUILD_CPU" = xx86; then
|
||||
OPENJDK_BUILD_CPU_JLI="i386"
|
||||
elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
|
||||
# On all platforms except macosx, we replace x86_64 with amd64.
|
||||
OPENJDK_BUILD_CPU_JLI="amd64"
|
||||
fi
|
||||
# Now setup the -D flags for building libjli.
|
||||
OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
|
||||
OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
|
||||
elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
|
||||
OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_JLI_CFLAGS)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_TARGET_OS_EXPORT_DIR=macosx
|
||||
else
|
||||
@ -362,6 +411,11 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LP64,$A_LP64)
|
||||
if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
|
||||
if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
# FIXME: ... or should this include reduced builds..?
|
||||
|
@ -84,3 +84,56 @@ AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
|
||||
|
||||
JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# Define a mechanism for importing extra prebuilt modules
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([SRCDIRS_SETUP_IMPORT_MODULES],
|
||||
[
|
||||
AC_ARG_WITH(import-modules, [AS_HELP_STRING([--with-import-modules],
|
||||
[import a set of prebuilt modules either as a zip file or an exploded directory])])
|
||||
|
||||
if test "x$with_import_modules" != x \
|
||||
&& test "x$with_import_modules" != "xno"; then
|
||||
if test -d "$with_import_modules"; then
|
||||
IMPORT_MODULES_TOPDIR="$with_import_modules"
|
||||
BASIC_FIXUP_PATH([IMPORT_MODULES_TOPDIR])
|
||||
elif test -e "$with_import_modules"; then
|
||||
IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
|
||||
$RM -rf "$IMPORT_MODULES_TOPDIR"
|
||||
$MKDIR -p "$IMPORT_MODULES_TOPDIR"
|
||||
if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
|
||||
AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
|
||||
IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
|
||||
fi
|
||||
if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
|
||||
IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
|
||||
fi
|
||||
if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
|
||||
IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
|
||||
fi
|
||||
if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
|
||||
IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
|
||||
fi
|
||||
if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
|
||||
IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
|
||||
fi
|
||||
if test -d "$IMPORT_MODULES_TOPDIR/make"; then
|
||||
IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
|
||||
fi
|
||||
|
||||
AC_SUBST(IMPORT_MODULES_CLASSES)
|
||||
AC_SUBST(IMPORT_MODULES_CMDS)
|
||||
AC_SUBST(IMPORT_MODULES_LIBS)
|
||||
AC_SUBST(IMPORT_MODULES_CONF)
|
||||
AC_SUBST(IMPORT_MODULES_SRC)
|
||||
AC_SUBST(IMPORT_MODULES_MAKE)
|
||||
])
|
||||
|
@ -130,6 +130,14 @@ JAXP_TOPDIR:=@JAXP_TOPDIR@
|
||||
JAXWS_TOPDIR:=@JAXWS_TOPDIR@
|
||||
HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
|
||||
NASHORN_TOPDIR:=@NASHORN_TOPDIR@
|
||||
|
||||
IMPORT_MODULES_CLASSES:=@IMPORT_MODULES_CLASSES@
|
||||
IMPORT_MODULES_CMDS:=@IMPORT_MODULES_CMDS@
|
||||
IMPORT_MODULES_LIBS:=@IMPORT_MODULES_LIBS@
|
||||
IMPORT_MODULES_CONF:=@IMPORT_MODULES_CONF@
|
||||
IMPORT_MODULES_SRC:=@IMPORT_MODULES_SRC@
|
||||
IMPORT_MODULES_MAKE:=@IMPORT_MODULES_MAKE@
|
||||
|
||||
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
|
||||
|
||||
# New (JEP-223) version information
|
||||
@ -246,6 +254,7 @@ TESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make
|
||||
MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support
|
||||
# This does not get overridden in a bootcycle build
|
||||
CONFIGURESUPPORT_OUTPUTDIR:=@CONFIGURESUPPORT_OUTPUTDIR@
|
||||
BUILDJDK_OUTPUTDIR=$(BUILD_OUTPUT)/buildjdk
|
||||
|
||||
HOTSPOT_DIST=@HOTSPOT_DIST@
|
||||
|
||||
@ -255,6 +264,9 @@ BUILD_HOTSPOT=@BUILD_HOTSPOT@
|
||||
# it in sync.
|
||||
BOOT_JDK:=@BOOT_JDK@
|
||||
|
||||
BUILD_JDK:=@BUILD_JDK@
|
||||
CREATE_BUILDJDK:=@CREATE_BUILDJDK@
|
||||
|
||||
# When compiling Java source to be run by the boot jdk
|
||||
# use these extra flags, eg -source 6 -target 6
|
||||
BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
|
||||
@ -405,6 +417,8 @@ BUILD_LDCXX:=@FIXPATH@ @BUILD_LDCXX@
|
||||
BUILD_AS:=@FIXPATH@ @BUILD_AS@
|
||||
BUILD_AR:=@FIXPATH@ @BUILD_AR@
|
||||
BUILD_NM:=@FIXPATH@ @BUILD_NM@
|
||||
BUILD_OBJCOPY:=@BUILD_OBJCOPY@
|
||||
BUILD_STRIP:=@BUILD_STRIP@
|
||||
BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
|
||||
BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
|
||||
|
||||
@ -502,12 +516,40 @@ SJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
|
||||
# overriding that value by using ?=.
|
||||
JAVAC_FLAGS?=@JAVAC_FLAGS@
|
||||
|
||||
|
||||
BUILD_JAVA_FLAGS:=-Xms64M -Xmx1100M
|
||||
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
|
||||
|
||||
# Use ?= as this can be overridden from bootcycle-spec.gmk
|
||||
BOOT_JDK_MODULAR ?= @BOOT_JDK_MODULAR@
|
||||
|
||||
ifeq ($(BOOT_JDK_MODULAR), true)
|
||||
INTERIM_OVERRIDE_MODULES_ARGS = -Xpatch:$(BUILDTOOLS_OUTPUTDIR)/override_modules
|
||||
INTERIM_LANGTOOLS_ARGS = $(INTERIM_OVERRIDE_MODULES_ARGS)
|
||||
JAVAC_MAIN_CLASS = -m jdk.compiler/com.sun.tools.javac.Main
|
||||
JAVADOC_MAIN_CLASS = -m jdk.javadoc/jdk.javadoc.internal.tool.Main
|
||||
else
|
||||
INTERIM_OVERRIDE_MODULES := java.compiler jdk.compiler \
|
||||
jdk.jdeps jdk.javadoc jdk.rmic
|
||||
INTERIM_OVERRIDE_MODULES_ARGS = \
|
||||
-Xbootclasspath/p:$(call PathList, \
|
||||
$(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \
|
||||
$(INTERIM_OVERRIDE_MODULES)))
|
||||
INTERIM_LANGTOOLS_ARGS = $(INTERIM_OVERRIDE_MODULES_ARGS) \
|
||||
-cp $(BUILDTOOLS_OUTPUTDIR)/override_modules/jdk.compiler
|
||||
JAVAC_MAIN_CLASS = com.sun.tools.javac.Main
|
||||
JAVADOC_MAIN_CLASS = jdk.javadoc.internal.tool.Main
|
||||
endif
|
||||
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
|
||||
# Use = assignment to be able to override in bootcycle-spec.gmk
|
||||
INTERIM_LANGTOOLS_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_langtools.jar
|
||||
INTERIM_LANGTOOLS_ARGS = "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR)
|
||||
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main
|
||||
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) jdk.javadoc.internal.tool.Main
|
||||
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS)
|
||||
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
|
||||
|
||||
# JLink/Jmod are run using the BUILD_JDK, which is normally the jdk output dir.
|
||||
JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@
|
||||
|
||||
JLINK = @FIXPATH@ $(BUILD_JDK)/bin/jlink $(JAVA_TOOL_FLAGS_SMALL)
|
||||
JMOD = @FIXPATH@ $(BUILD_JDK)/bin/jmod $(JAVA_TOOL_FLAGS_SMALL)
|
||||
|
||||
# Base flags for RC
|
||||
# Guarding this against resetting value. Legacy make files include spec multiple
|
||||
|
@ -797,6 +797,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_NM)
|
||||
BASIC_PATH_PROGS(BUILD_AR, ar gcc-ar)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_AR)
|
||||
BASIC_PATH_PROGS(BUILD_OBJCOPY, objcopy)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_OBJCOPY)
|
||||
BASIC_PATH_PROGS(BUILD_STRIP, strip)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_STRIP)
|
||||
# Assume the C compiler is the assembler
|
||||
BUILD_AS="$BUILD_CC -c"
|
||||
# Just like for the target compiler, use the compiler as linker
|
||||
@ -813,6 +817,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
BUILD_LDCXX="$LDCXX"
|
||||
BUILD_NM="$NM"
|
||||
BUILD_AS="$AS"
|
||||
BUILD_OBJCOPY="$OBJCOPY"
|
||||
BUILD_STRIP="$STRIP"
|
||||
BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
|
||||
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
|
||||
BUILD_AR="$AR"
|
||||
|
@ -290,9 +290,9 @@ compare_general_files() {
|
||||
|
||||
GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" \
|
||||
! -name "*.zip" ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "*.jimage" ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
|
||||
! -name "modules" ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
|
||||
! -name "*.cpl" ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
|
||||
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
|
||||
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" ! -name "*.jmod" \
|
||||
! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \
|
||||
! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \
|
||||
! -name "jspawnhelper" ! -name "JavawsLauncher" ! -name "*.a" \
|
||||
@ -389,13 +389,13 @@ compare_zip_file() {
|
||||
$RM -rf $THIS_UNZIPDIR $OTHER_UNZIPDIR
|
||||
$MKDIR -p $THIS_UNZIPDIR
|
||||
$MKDIR -p $OTHER_UNZIPDIR
|
||||
if [ "$TYPE" = "jimage" ]
|
||||
if [ "$TYPE" = "jar" || "$TYPE" = "war" || "$TYPE" = "zip" || "$TYPE" = "jmod"]
|
||||
then
|
||||
(cd $THIS_UNZIPDIR && $JIMAGE extract $THIS_ZIP)
|
||||
(cd $OTHER_UNZIPDIR && $JIMAGE extract $OTHER_ZIP)
|
||||
else
|
||||
(cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP)
|
||||
(cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
|
||||
else
|
||||
(cd $THIS_UNZIPDIR && $JIMAGE extract $THIS_ZIP)
|
||||
(cd $OTHER_UNZIPDIR && $JIMAGE extract $OTHER_ZIP)
|
||||
fi
|
||||
|
||||
# Find all archives inside and unzip them as well to compare the contents rather than
|
||||
@ -526,7 +526,7 @@ compare_all_jar_files() {
|
||||
|
||||
# TODO filter?
|
||||
ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.jar" -o -name "*.war" \
|
||||
-o -name "*.jimage" | $SORT | $FILTER)
|
||||
-o -name "modules" -o -name "*.jmod" | $SORT | $FILTER)
|
||||
|
||||
if [ -n "$ZIPS" ]; then
|
||||
echo Jar files...
|
||||
|
@ -421,10 +421,10 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
|
||||
jtreg: {
|
||||
server: "javare",
|
||||
revision: "4.1",
|
||||
build_number: "b12",
|
||||
revision: "4.2",
|
||||
build_number: "b01",
|
||||
checksum_file: "MD5_VALUES",
|
||||
file: "jtreg_bin-4.1.zip",
|
||||
file: "jtreg_bin-4.2.zip",
|
||||
environment_name: "JT_HOME"
|
||||
},
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2014, 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.
|
||||
#
|
||||
|
||||
# Default target declared first
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
JDEPS_MODULES_XML := $(JDK_OUTPUTDIR)/modules/jdk.jdeps/com/sun/tools/jdeps/resources/jdeps-modules.xml
|
||||
|
||||
#
|
||||
# Verify access across module boundaries
|
||||
#
|
||||
checkdeps:
|
||||
$(ECHO) "Checking dependencies across JDK modules"
|
||||
$(JAVA) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
|
||||
-Djdeps.modules.xml=$(JDEPS_MODULES_XML) \
|
||||
com.sun.tools.jdeps.Main \
|
||||
-verify:access -mp $(JDK_OUTPUTDIR)/modules
|
||||
|
||||
all: checkdeps
|
||||
|
||||
.PHONY: all
|
@ -46,6 +46,9 @@ java.base_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/packa
|
||||
java.base_COPY := .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
|
||||
java.base_CLEAN := intrinsic.properties
|
||||
|
||||
java.base_EXCLUDE_FILES += \
|
||||
$(JDK_TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java
|
||||
|
||||
java.base_EXCLUDES += java/lang/doc-files
|
||||
|
||||
# Exclude BreakIterator classes that are just used in compile process to generate
|
||||
@ -359,8 +362,8 @@ jdk.charsets_COPY := .dat
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:-com.sun.tools.*' -XDstringConcat=inline
|
||||
jdk.compiler_COPY := javax.tools.JavaCompilerTool
|
||||
jdk.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:-com.sun.tools.*' \
|
||||
-XDstringConcat=inline
|
||||
jdk.compiler_CLEAN_FILES := $(wildcard \
|
||||
$(patsubst %, $(JDK_TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
|
||||
sun/tools/serialver/resources))
|
||||
@ -480,31 +483,28 @@ jdk.localedata_EXCLUDE_FILES += sun/text/resources/th/BreakIteratorRules_th.java
|
||||
# source before static source and platform specific source before shared.
|
||||
#
|
||||
GENERATED_SRC_DIRS += \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE) \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$(MODULE) \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc \
|
||||
#
|
||||
|
||||
OS_SRC_DIRS += $(JDK_TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/classes
|
||||
TOP_SRC_DIRS += \
|
||||
$(HOTSPOT_TOPDIR)/src \
|
||||
$(CORBA_TOPDIR)/src \
|
||||
$(JDK_TOPDIR)/src \
|
||||
$(LANGTOOLS_TOPDIR)/src \
|
||||
$(JAXP_TOPDIR)/src \
|
||||
$(JAXWS_TOPDIR)/src \
|
||||
$(NASHORN_TOPDIR)/src \
|
||||
#
|
||||
|
||||
SRC_SUBDIRS += $(OPENJDK_TARGET_OS)/classes
|
||||
ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
|
||||
OS_TYPE_SRC_DIRS += $(JDK_TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/classes
|
||||
SRC_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/classes
|
||||
endif
|
||||
SRC_SUBDIRS += share/classes
|
||||
|
||||
SHARE_SRC_DIRS += \
|
||||
$(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(JDK_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(LANGTOOLS_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(CORBA_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(JAXP_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(JAXWS_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(NASHORN_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
#
|
||||
|
||||
ALL_SRC_DIRS = \
|
||||
$(GENERATED_SRC_DIRS) \
|
||||
$(OS_SRC_DIRS) \
|
||||
$(OS_TYPE_SRC_DIRS) \
|
||||
$(SHARE_SRC_DIRS) \
|
||||
#
|
||||
MODULE_SRC_DIRS := $(strip \
|
||||
$(addsuffix /$(MODULE), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
|
||||
$(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(MODULE)/$(sub), $(TOP_SRC_DIRS))))
|
||||
|
||||
# The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying
|
||||
# JDK_FILTER at the make command line, only a subset of the JDK java files will
|
||||
@ -512,32 +512,41 @@ ALL_SRC_DIRS = \
|
||||
# space separated list.
|
||||
JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
|
||||
|
||||
# Create an empty directory to set the bootclasspath to.
|
||||
EMPTY_DIR := $(SUPPORT_OUTPUTDIR)/empty-dir
|
||||
$(call MakeDir, $(EMPTY_DIR))
|
||||
# Rewrite the MODULE_SRC_DIRS with a wildcard for the module so that all module
|
||||
# source dirs are available on the path.
|
||||
MODULESOURCEPATH := $(subst $(SPACE),$(PATH_SEP),$(subst $(MODULE),*,$(MODULE_SRC_DIRS)))
|
||||
|
||||
# Find the module dependencies by parsing modules.list file
|
||||
DEPS := $(call FindDepsForModule, $(MODULE))
|
||||
# Add imported modules to the moduleclasspath
|
||||
MODULECLASSPATH := $(subst $(SPACE),$(PATH_SEP), $(IMPORT_MODULES_CLASSES))
|
||||
|
||||
CLASSPATH := $(foreach d, $(DEPS), $(if $($d_BIN), $($d_BIN), \
|
||||
$(JDK_OUTPUTDIR)/modules/$d))
|
||||
# When crypto classes are prebuilt, need to look for classes already in
|
||||
# output dir.
|
||||
ifneq ($(BUILD_CRYPTO), true)
|
||||
CLASSPATH += $(JDK_OUTPUTDIR)/modules/$(MODULE)
|
||||
endif
|
||||
JAVAC_FLAGS_BOOTCLASSPATH := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) \
|
||||
-endorseddirs $(EMPTY_DIR) $($(MODULE)_ADD_JAVAC_FLAGS)
|
||||
ifeq ($(MODULE), jdk.vm.ci)
|
||||
## WORKAROUND jdk.vm.ci source structure issue
|
||||
JVMCI_MODULESOURCEPATH := $(MODULESOURCEPATH) \
|
||||
$(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \
|
||||
$(wildcard $(HOTSPOT_TOPDIR)/src/jdk.vm.ci/share/classes/*/src)))
|
||||
MODULESOURCEPATH := $(subst $(SPACE),$(PATH_SEP), $(JVMCI_MODULESOURCEPATH))
|
||||
endif
|
||||
|
||||
# Make sure the generated source base dirs exist. Not all modules have generated
|
||||
# source in all of these directories and because of timing, all of them might not
|
||||
# exist at the time this makefile gets called. Javac will complain if there are
|
||||
# missing directories in the moduleclasspath.
|
||||
$(call MakeDir, $(GENERATED_SRC_DIRS))
|
||||
|
||||
$(eval $(call SetupJavaCompilation, $(MODULE), \
|
||||
SETUP := $(if $($(MODULE)_SETUP), $($(MODULE)_SETUP), GENERATE_JDKBYTECODE), \
|
||||
SRC := $(if $($(MODULE)_SRC), $($(MODULE)_SRC), $(wildcard $(ALL_SRC_DIRS))), \
|
||||
INCLUDES := $(JDK_USER_DEFINED_FILTER),\
|
||||
BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules/$(MODULE)), \
|
||||
HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$(MODULE), \
|
||||
CLASSPATH := $(CLASSPATH), \
|
||||
ADD_JAVAC_FLAGS := $($(MODULE)_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS_BOOTCLASSPATH) \
|
||||
MODULE := $(MODULE), \
|
||||
SRC := $(wildcard $(MODULE_SRC_DIRS)), \
|
||||
INCLUDES := $(JDK_USER_DEFINED_FILTER),\
|
||||
BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules), \
|
||||
HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
$($(MODULE)_ADD_JAVAC_FLAGS) \
|
||||
-modulesourcepath "$(MODULESOURCEPATH)" \
|
||||
$(if $(MODULECLASSPATH), -modulepath "$(MODULECLASSPATH)") \
|
||||
-system none, \
|
||||
))
|
||||
|
||||
TARGETS += $($(MODULE)) $($(MODULE)_COPY_EXTRA)
|
||||
|
||||
# Declare dependencies between java compilations of different modules.
|
||||
@ -545,7 +554,7 @@ TARGETS += $($(MODULE)) $($(MODULE)_COPY_EXTRA)
|
||||
# use the macro to find the correct target file to depend on.
|
||||
# Only the javac compilation actually depends on other modules so limit
|
||||
# dependency declaration to that by using the *_COMPILE_TARGET variable.
|
||||
$($(MODULE)_COMPILE_TARGET): $(foreach d, $($(MODULE)_DEPS), \
|
||||
$($(MODULE)_COMPILE_TARGET): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
|
||||
$(call SetupJavaCompilationCompileTarget, $d, \
|
||||
$(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
|
||||
|
||||
@ -568,6 +577,29 @@ ifeq ($(MODULE), java.rmi)
|
||||
TARGETS += $(call CreateHkTargets, $(java.rmi_CLEAN_FILES))
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# If this is an imported module, copy the pre built classes and resources into
|
||||
# the modules output dir
|
||||
|
||||
ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
|
||||
$(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
|
||||
$(call CacheFind, $(IMPORT_MODULES_CLASSES)/$(MODULE))
|
||||
$(RM) -r $(@D)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) -R $(IMPORT_MODULES_CLASSES)/$(MODULE)/* $(@D)/
|
||||
$(TOUCH) $@
|
||||
|
||||
TARGETS += $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker
|
||||
|
||||
# Add this dependency to avoid a race between compiling module-info.java and
|
||||
# importing the classes.
|
||||
$($(MODULE)_COMPILE_TARGET): $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call IncludeCustomExtension, , CompileJavaModules-post.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
86
make/CopyImportModules.gmk
Normal file
86
make/CopyImportModules.gmk
Normal file
@ -0,0 +1,86 @@
|
||||
#
|
||||
# Copyright (c) 2015, 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.
|
||||
#
|
||||
|
||||
# This makefile is called for every imported module to copy the non class
|
||||
# contents into the exploded jdk image.
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
LIBS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_LIBS)))
|
||||
CMDS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CMDS)))
|
||||
CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF)))
|
||||
|
||||
$(eval $(call FillCacheFind, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR)))
|
||||
|
||||
ifneq ($(LIBS_DIR), )
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_LIBS_TO_BIN, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/bin, \
|
||||
FILES := $(filter $(TO_BIN_FILTER), \
|
||||
$(call CacheFind, $(LIBS_DIR))) \
|
||||
))
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_LIBS_TO_LIB, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(filter-out $(TO_BIN_FILTER), \
|
||||
$(call CacheFind, $(LIBS_DIR))) \
|
||||
))
|
||||
TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB)
|
||||
else
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBS, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(call CacheFind, $(LIBS_DIR)), \
|
||||
))
|
||||
TARGETS += $(COPY_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(CMDS_DIR), )
|
||||
$(eval $(call SetupCopyFiles, COPY_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/bin, \
|
||||
FILES := $(call CacheFind, $(CMDS_DIR)), \
|
||||
))
|
||||
TARGETS += $(COPY_CMDS)
|
||||
endif
|
||||
|
||||
ifneq ($(CONF_DIR), )
|
||||
$(eval $(call SetupCopyFiles, COPY_CONF, \
|
||||
SRC := $(CONF_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(call CacheFind, $(CONF_DIR)), \
|
||||
))
|
||||
TARGETS += $(COPY_CONF)
|
||||
endif
|
||||
|
||||
all: $(TARGETS)
|
86
make/CreateBuildJdkCopy.gmk
Normal file
86
make/CreateBuildJdkCopy.gmk
Normal file
@ -0,0 +1,86 @@
|
||||
#
|
||||
# Copyright (c) 2015, 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.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Modules.gmk
|
||||
|
||||
MODULES_TO_COPY := $(call FindTransitiveDepsForModule, jdk.jlink) jdk.jlink
|
||||
|
||||
################################################################################
|
||||
# Copy the modules needed to run jlink and jmod. Use bulk copy instead of
|
||||
# SetupCopyFiles since there are so many files.
|
||||
|
||||
COPY_CLASSES_TARGET := $(BUILDJDK_OUTPUTDIR)/jdk/modules/_buildjdk-copy-maker
|
||||
|
||||
$(COPY_CLASSES_TARGET): $(call CacheFind, $(wildcard \
|
||||
$(addprefix $(JDK_OUTPUTDIR)/modules/, $(MODULES_TO_COPY))))
|
||||
$(ECHO) $(LOG_INFO) "Copying java modules to buildjdk: $(MODULES_TO_COPY)"
|
||||
$(RM) -r $(BUILDJDK_OUTPUTDIR)/jdk/modules
|
||||
$(MKDIR) -p $(BUILDJDK_OUTPUTDIR)/jdk/modules
|
||||
$(foreach m, $(MODULES_TO_COPY), \
|
||||
$(CP) -R $(JDK_OUTPUTDIR)/modules/$m \
|
||||
$(BUILDJDK_OUTPUTDIR)/jdk/modules/ $(NEWLINE))
|
||||
$(TOUCH) $@
|
||||
|
||||
TARGETS += $(COPY_CLASSES_TARGET)
|
||||
|
||||
#$(eval $(call SetupCopyFiles, COPY_JDK_MODULES, \
|
||||
SRC := $(BUILD_OUTPUT), \
|
||||
DEST := $(BUILDJDK_OUTPUTDIR), \
|
||||
FILES := $(call DoubleDollar, $(call DoubleDollar, $(call CacheFind, $(wildcard \
|
||||
$(addprefix $(JDK_OUTPUTDIR)/modules/, $(MODULES_TO_COPY)))))), \
|
||||
))
|
||||
|
||||
#TARGETS += $(COPY_JDK_MODULES)
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_SUPPORT_HEADERS, \
|
||||
SRC := $(BUILD_OUTPUT), \
|
||||
DEST := $(BUILDJDK_OUTPUTDIR), \
|
||||
FILES := $(call CacheFind, $(wildcard \
|
||||
$(addprefix $(SUPPORT_OUTPUTDIR)/headers/, $(MODULES_TO_COPY)))), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_SUPPORT_HEADERS)
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_JDK_LIB_FILES, \
|
||||
SRC := $(BUILD_OUTPUT), \
|
||||
DEST := $(BUILDJDK_OUTPUTDIR), \
|
||||
FILES := $(JDK_OUTPUTDIR)/lib/tzdb.dat, \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_JDK_LIB_FILES)
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: default all
|
95
make/CreateJmods.gmk
Normal file
95
make/CreateJmods.gmk
Normal file
@ -0,0 +1,95 @@
|
||||
#
|
||||
# Copyright (c) 2014, 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.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Modules.gmk
|
||||
|
||||
ifeq ($(MODULE), )
|
||||
$(error MODULE must be set when calling CreateJmods.gmk)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
LIBS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs-stripped $(IMPORT_MODULES_LIBS))))
|
||||
CMDS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds-stripped $(IMPORT_MODULES_CMDS))))
|
||||
CONF_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_conf $(IMPORT_MODULES_CONF))))
|
||||
CLASSES_DIR := $(wildcard $(JDK_OUTPUTDIR)/modules/$(MODULE))
|
||||
|
||||
$(eval $(call FillCacheFind, \
|
||||
$(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR) $(CLASSES_DIR) \
|
||||
))
|
||||
|
||||
ifneq ($(LIBS_DIR), )
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR)
|
||||
DEPS += $(call CacheFind, $(LIBS_DIR))
|
||||
endif
|
||||
ifneq ($(CMDS_DIR), )
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
DEPS += $(call CacheFind, $(CMDS_DIR))
|
||||
endif
|
||||
ifneq ($(CONF_DIR), )
|
||||
JMOD_FLAGS += --config $(CONF_DIR)
|
||||
DEPS += $(call CacheFind, $(CONF_DIR))
|
||||
endif
|
||||
ifneq ($(CLASSES_DIR), )
|
||||
JMOD_FLAGS += --class-path $(CLASSES_DIR)
|
||||
DEPS += $(call CacheFind, $(CLASSES_DIR))
|
||||
endif
|
||||
|
||||
# Add dependencies on other jmod files
|
||||
DEPS += $(patsubst %, $(IMAGES_OUTPUTDIR)/jmods/%.jmod, \
|
||||
$(call FindDepsForModule, $(MODULE)))
|
||||
|
||||
# TODO: What about headers?
|
||||
# Create jmods in a temp dir and then move them into place to keep the
|
||||
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||
$(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod: $(DEPS)
|
||||
$(call LogWarn, Creating $(notdir $@))
|
||||
$(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/jmods)
|
||||
$(RM) $@ $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
|
||||
$(JMOD) create \
|
||||
--module-version $(VERSION_SHORT) \
|
||||
--os-name $(REQUIRED_OS_NAME) \
|
||||
--os-arch $(OPENJDK_TARGET_CPU_LEGACY) \
|
||||
--os-version $(REQUIRED_OS_VERSION) \
|
||||
--modulepath $(IMAGES_OUTPUTDIR)/jmods\
|
||||
--hash-dependencies '.*' \
|
||||
--exclude '**_the.*' \
|
||||
$(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
|
||||
$(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@
|
||||
|
||||
TARGETS += $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
################################################################################
|
@ -1,64 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2014, 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.
|
||||
#
|
||||
|
||||
# This file is included from Main.gmk only.
|
||||
|
||||
include $(SRC_ROOT)/make/common/JavaCompilation.gmk
|
||||
include $(SRC_ROOT)/make/common/SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_GENMODULESLIST, \
|
||||
SETUP := BOOT_JAVAC, \
|
||||
SRC := $(JDK_TOPDIR)/make/src/classes, \
|
||||
INCLUDES := build/tools/module, \
|
||||
EXCLUDE_FILES := ImageBuilder.java ModuleArchive.java, \
|
||||
BIN := $(MAKESUPPORT_OUTPUTDIR)/bt_classes_moduleslist, \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
TOOL_GENMODULESLIST = $(JAVA_SMALL) \
|
||||
-cp "$(MAKESUPPORT_OUTPUTDIR)/bt_classes_moduleslist" \
|
||||
build.tools.module.GenModulesList
|
||||
|
||||
MODULES_LIST_FILE := $(MAKESUPPORT_OUTPUTDIR)/modules.list
|
||||
# The module deps makefile is used from make/common/Modules.gmk
|
||||
MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk
|
||||
|
||||
$(MODULES_LIST_FILE): $(SRC_ROOT)/modules.xml $(BUILD_GENMODULESLIST)
|
||||
$(TOOL_GENMODULESLIST) -o $@ $(filter %.xml, $^)
|
||||
|
||||
$(MODULE_DEPS_MAKEFILE): $(MODULES_LIST_FILE)
|
||||
$(CAT) $^ | $(SED) -e 's/^\([^:]*\):/DEPS_\1 :=/g' > $@
|
||||
|
||||
TARGETS += $(MODULE_DEPS_MAKEFILE)
|
||||
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , GenerateModuleDeps.gmk))
|
||||
|
||||
# Trigger generation of this file and restart make if it changed.
|
||||
-include $(MODULE_DEPS_MAKEFILE)
|
154
make/GensrcModuleInfo.gmk
Normal file
154
make/GensrcModuleInfo.gmk
Normal file
@ -0,0 +1,154 @@
|
||||
#
|
||||
# Copyright (c) 2015, 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This file makes modifications to module-info.java files based on the build
|
||||
# configuration.
|
||||
#
|
||||
# Depending on build platform, imported modules and optional parts of the build
|
||||
# being active, some modules need to have extra exports, provides or uses
|
||||
# declarations added to them. These optional extras are defined in .extra files:
|
||||
#
|
||||
# src/<module>/<share,platform>/classes/module-info.java.extra
|
||||
#
|
||||
# The contents of the .extra files are simply extra lines that could fit into
|
||||
# the module-info file.
|
||||
#
|
||||
# This makefile is called once for each from-module with the variable
|
||||
# MODULE naming the from-module.
|
||||
#
|
||||
# The modified module-info.java files are put in the gensrc directory where
|
||||
# they will automatically override the static versions in the src tree.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Modules.gmk
|
||||
#include TextFileProcessing.gmk
|
||||
|
||||
################################################################################
|
||||
# Define this here since jdk/make/Tools.gmk cannot be included from the top
|
||||
# make directory. Should probably move some tools away from the jdk repo.
|
||||
TOOL_GENMODULEINFOSOURCE = $(JAVA_SMALL) \
|
||||
$(INTERIM_LANGTOOLS_ARGS) \
|
||||
-cp "$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes" \
|
||||
build.tools.module.GenModuleInfoSource
|
||||
|
||||
################################################################################
|
||||
|
||||
# Name of data file. Keep module-info.java.ext until javafx has changed.
|
||||
MOD_FILENAME := module-info.java.extra module-info.java.ext
|
||||
|
||||
# List all the possible sub directories inside a module source directory where
|
||||
# data might be stored.
|
||||
CLASSES_SUBDIRS += $(OPENJDK_TARGET_OS)/classes
|
||||
ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
|
||||
CLASSES_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/classes
|
||||
endif
|
||||
CLASSES_SUBDIRS += share/classes
|
||||
|
||||
# TODO: When the deploy build is better integrated, this will get added globally
|
||||
# but for now need to add it here.
|
||||
ifeq ($(BUILD_DEPLOY), true)
|
||||
ALL_TOP_SRC_DIRS += $(DEPLOY_TOPDIR)/src
|
||||
endif
|
||||
|
||||
# Construct all possible src directories for the module.
|
||||
MODULE_CLASSES_DIRS := $(strip \
|
||||
$(foreach sub, $(CLASSES_SUBDIRS), \
|
||||
$(addsuffix /$(MODULE)/$(sub), $(ALL_TOP_SRC_DIRS))) \
|
||||
$(addsuffix /$(MODULE), $(IMPORT_MODULES_SRC)))
|
||||
|
||||
# Find all the .extra files in the src dirs.
|
||||
MOD_FILES := $(wildcard $(foreach f, $(MOD_FILENAME), $(addsuffix /$(f), \
|
||||
$(MODULE_CLASSES_DIRS))))
|
||||
|
||||
ifneq ($(MOD_FILES), )
|
||||
# Only make this call if modification files are found for this module
|
||||
ALL_MODULES := $(call FindAllModules)
|
||||
|
||||
# Read the contents of all the files into a variable. Replace space with / to
|
||||
# let space represent new lines in the variable as $(shell) normalizes all
|
||||
# whitespace.
|
||||
$(foreach f, $(MOD_FILES), \
|
||||
$(eval MOD_FILE_CONTENTS += $(shell $(GREP) -v ".\*" $f | $(TR) ' ' '/')))
|
||||
|
||||
# Filter the contents for modules that are actually being built
|
||||
MODULES_FILTER := $(addprefix %/, $(addsuffix ;, $(ALL_MODULES)))
|
||||
MODULES_FILTER += provides%
|
||||
MODIFICATIONS := $(filter $(MODULES_FILTER), $(MOD_FILE_CONTENTS))
|
||||
|
||||
# Convert the modification lines into arguments for the modification tool.
|
||||
# Filter out modifications for non existing to-modules.
|
||||
$(foreach line, $(MODIFICATIONS), \
|
||||
$(eval split_line := $(subst /,$(SPACE),$(line))) \
|
||||
$(eval command := $(word 1, $(split_line))) \
|
||||
$(eval package := $(word 2, $(split_line))) \
|
||||
$(eval to_module := $(patsubst %;,%,$(word 4, $(split_line)))) \
|
||||
$(eval ARGS += -$(command) $(package)/$(to_module)))
|
||||
|
||||
ifneq ($(ARGS), )
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java: \
|
||||
$(firstword $(call FindAllModuleInfos, $(MODULE))) \
|
||||
$(BUILD_TOOLS_JDK) \
|
||||
$(call DependOnVariable, ARGS)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@ $@.tmp
|
||||
$(TOOL_GENMODULEINFOSOURCE) $(ARGS) -o $@.tmp $<
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
TARGETS += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java
|
||||
endif
|
||||
|
||||
# This doesn't work because javac only accepts one single exports line per
|
||||
# exported package.
|
||||
# Restore the modifications to separate lines with spaces
|
||||
# MODIFICATIONS := $(subst /,$(SPACE),$(MODIFICATIONS))
|
||||
|
||||
# ifneq ($(MODIFICATIONS), )
|
||||
# $(eval $(call SetupTextFileProcessing, PROCESS_MODULE_INFO, \
|
||||
# SOURCE_FILES := $(firstword $(call FindAllModuleInfos, $(MODULE))), \
|
||||
# OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java, \
|
||||
# REPLACEMENTS := } => $(MODIFICATIONS) }, \
|
||||
# ))
|
||||
|
||||
# TARGETS += $(PROCESS_MODULE_INFO)
|
||||
# endif
|
||||
endif
|
||||
|
||||
# If no modifications are found for this module, remove any module-info.java
|
||||
# created by a previous build since that is no longer valid.
|
||||
ifeq ($(MODIFICATIONS), )
|
||||
ifneq ($(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java), )
|
||||
$(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java)
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
@ -25,7 +25,10 @@
|
||||
|
||||
# Include the legacy hotspot-spec.gmk (which in turns includes spec.gmk)
|
||||
BASE_SPEC:=$(SPEC)
|
||||
include $(dir $(SPEC))hotspot-spec.gmk
|
||||
# Assign to HOTSPOT_SPEC so that the variable HOTSPOT_SPEC can be
|
||||
# overridden when building the buildjdk.
|
||||
HOTSPOT_SPEC := $(dir $(SPEC))hotspot-spec.gmk
|
||||
include $(HOTSPOT_SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
@ -45,7 +48,7 @@ HOTSPOT_FILES := $(shell $(FIND) -L \
|
||||
# not doing it breaks builds on msys.
|
||||
$(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp: $(HOTSPOT_FILES)
|
||||
@$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
|
||||
@($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(HOTSPOT_MAKE_ARGS) \
|
||||
($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(HOTSPOT_MAKE_ARGS) \
|
||||
LOG_LEVEL=$(LOG_LEVEL) SPEC=$(HOTSPOT_SPEC) BASE_SPEC=$(BASE_SPEC))
|
||||
$(TOUCH) $@
|
||||
|
||||
|
268
make/Images.gmk
268
make/Images.gmk
@ -38,7 +38,7 @@ $(eval $(call IncludeCustomExtension, , Images-pre.gmk))
|
||||
|
||||
############################################################################
|
||||
|
||||
MAIN_MODULES += java.se java.smartcardio jdk.httpserver jdk.sctp \
|
||||
MAIN_MODULES += java.se.ee java.smartcardio jdk.httpserver jdk.sctp \
|
||||
jdk.security.auth jdk.security.jgss jdk.pack200 jdk.xml.dom \
|
||||
jdk.accessibility jdk.internal.le jdk.dynalink \
|
||||
jdk.scripting.nashorn jdk.scripting.nashorn.shell \
|
||||
@ -49,10 +49,10 @@ PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk
|
||||
jdk.localedata jdk.naming.dns jdk.naming.rmi jdk.zipfs
|
||||
|
||||
# tools
|
||||
TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev \
|
||||
TOOLS_MODULES += jdk.attach jdk.compiler \
|
||||
jdk.javadoc jdk.jcmd jdk.jconsole jdk.hotspot.agent jdk.jartool \
|
||||
jdk.jdeps jdk.jdi jdk.jdwp.agent jdk.jshell jdk.policytool jdk.rmic \
|
||||
jdk.xml.bind jdk.xml.ws
|
||||
jdk.jdeps jdk.jdi jdk.jdwp.agent jdk.jlink jdk.jshell \
|
||||
jdk.policytool jdk.rmic jdk.xml.bind jdk.xml.ws jdk.internal.opt
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
PROVIDER_MODULES += jdk.crypto.mscapi
|
||||
@ -65,104 +65,151 @@ endif
|
||||
JRE_MODULES := $(filter-out $(MODULES_FILTER), $(MAIN_MODULES) $(PROVIDER_MODULES))
|
||||
JDK_MODULES := $(filter-out $(MODULES_FILTER), $(JRE_MODULES) $(TOOLS_MODULES))
|
||||
|
||||
# compact3 builds have additional modules
|
||||
JDK_COMPACT3_MODULES := java.compact3 java.smartcardio jdk.httpserver jdk.naming.dns \
|
||||
jdk.naming.rmi jdk.sctp jdk.security.auth jdk.management
|
||||
# Param 1 - Name of module
|
||||
define ReadImportMetaData
|
||||
ifneq ($$(wildcard $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties), )
|
||||
include_in_jre :=
|
||||
include_in_jdk :=
|
||||
include $(IMPORT_MODULES_MAKE)/$$(strip $1)/build.properties
|
||||
ifeq ($$(include_in_jre), true)
|
||||
JRE_MODULES += $1
|
||||
endif
|
||||
ifeq ($$(include_in_jdk), true)
|
||||
JDK_MODULES += $1
|
||||
endif
|
||||
else
|
||||
# Default to include in all
|
||||
JRE_MODULES += $1
|
||||
JDK_MODULES += $1
|
||||
endif
|
||||
endef
|
||||
|
||||
IMPORTED_MODULES := $(call FindImportedModules)
|
||||
$(foreach m, $(IMPORTED_MODULES), $(eval $(call ReadImportMetaData, $m)))
|
||||
|
||||
# Compact builds have additional modules
|
||||
COMPACT_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec
|
||||
JRE_COMPACT1_MODULES := $(COMPACT_EXTRA_MODULES) java.compact1
|
||||
JRE_COMPACT2_MODULES := $(JRE_COMPACT1_MODULES) java.compact2 jdk.xml.dom jdk.httpserver
|
||||
JRE_COMPACT3_MODULES := $(JRE_COMPACT2_MODULES) java.compact3 java.smartcardio jdk.management \
|
||||
jdk.naming.dns jdk.naming.rmi jdk.sctp jdk.security.auth
|
||||
|
||||
# Replacing double-comma with a single comma is to workaround the issue
|
||||
# with some version of make on windows that doesn't substitute spaces
|
||||
# with one comma properly as with make 4.0
|
||||
define SubstComma
|
||||
$(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1)))
|
||||
endef
|
||||
SubstComma = \
|
||||
$(strip \
|
||||
$(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
|
||||
)
|
||||
|
||||
JRE_MODULES_LIST := $(call SubstComma, $(JRE_MODULES))
|
||||
JDK_MODULES_LIST := $(call SubstComma, $(JDK_MODULES))
|
||||
JRE_COMPACT1_MODULES_LIST := $(call SubstComma, $(JRE_COMPACT1_MODULES))
|
||||
JRE_COMPACT2_MODULES_LIST := $(call SubstComma, $(JRE_COMPACT2_MODULES))
|
||||
JRE_COMPACT3_MODULES_LIST := $(call SubstComma, $(JRE_COMPACT3_MODULES))
|
||||
|
||||
################################################################################
|
||||
# Release file
|
||||
|
||||
BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
|
||||
|
||||
# Common way to emit a line into the release or info file
|
||||
define info-file-item # name value
|
||||
$(PRINTF) '%s="%s"\n' $1 $2 >> $@
|
||||
endef
|
||||
|
||||
# Param 1 - The file containing the MODULES list
|
||||
define create-info-file
|
||||
$(call info-file-item, "JAVA_VERSION", "$(VERSION_NUMBER)")
|
||||
$(call info-file-item, "JAVA_FULL_VERSION", "$(VERSION_STRING)")
|
||||
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)")
|
||||
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)")
|
||||
$(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)")
|
||||
$(if $(JDK_ARCH_ABI_PROP_NAME), \
|
||||
$(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"))
|
||||
$(call info-file-item, "SOURCE", "$(strip $(ALL_SOURCE_TIPS))")
|
||||
endef
|
||||
|
||||
# Param 1 - The file containing the MODULES list
|
||||
define prepare-info-file
|
||||
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
endef
|
||||
|
||||
define info-file
|
||||
$(call prepare-info-file)
|
||||
$(call create-info-file)
|
||||
endef
|
||||
|
||||
# Create a variable dependency file common for all release info files.
|
||||
INFO_FILE_VARDEPS := $(call DependOnVariable, create-info-file)
|
||||
|
||||
ALL_SOURCE_TIPS = $(shell \
|
||||
if [ -f $(SUPPORT_OUTPUTDIR)/source_tips ] ; then \
|
||||
$(CAT) $(SUPPORT_OUTPUTDIR)/source_tips ; \
|
||||
fi)
|
||||
|
||||
$(BASE_RELEASE_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips
|
||||
$(info-file)
|
||||
|
||||
################################################################################
|
||||
|
||||
JRE_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jre-sorted-modules
|
||||
JDK_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jdk-sorted-modules
|
||||
JRE_COMPACT1_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact1-sorted-modules
|
||||
JRE_COMPACT2_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact2-sorted-modules
|
||||
JRE_COMPACT3_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact3-sorted-modules
|
||||
|
||||
|
||||
MODULES_CMDS := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped
|
||||
MODULES_LIBS := $(SUPPORT_OUTPUTDIR)/modules_libs-stripped
|
||||
MODULES_CONF := $(SUPPORT_OUTPUTDIR)/modules_conf
|
||||
|
||||
JIMAGE_TOOL := $(JAVA_SMALL) \
|
||||
-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
|
||||
-cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.module.ImageBuilder \
|
||||
--cmds $(MODULES_CMDS) \
|
||||
--libs $(MODULES_LIBS) \
|
||||
--configs $(MODULES_CONF) \
|
||||
--classes $(JDK_OUTPUTDIR)/modules \
|
||||
--endian $(OPENJDK_TARGET_CPU_ENDIAN) \
|
||||
#
|
||||
|
||||
MODULES_XML += $(SRC_ROOT)/modules.xml
|
||||
DEPENDENCIES := $(call CacheFind, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_conf \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs) \
|
||||
$(wildcard $(JDK_OUTPUTDIR)/modules/*/_*) \
|
||||
$(MODULES_XML)
|
||||
#
|
||||
JMODS := $(wildcard $(IMAGES_OUTPUTDIR)/jmods/*.jmod)
|
||||
|
||||
# Use this file inside the image as target for make rule
|
||||
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
|
||||
|
||||
$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \
|
||||
$(call DependOnVariable, JDK_MODULES_LIST)
|
||||
JLINK_TOOL := $(JLINK) --modulepath $(IMAGES_OUTPUTDIR)/jmods \
|
||||
--endian $(OPENJDK_BUILD_CPU_ENDIAN) \
|
||||
--release-info $(BASE_RELEASE_FILE)
|
||||
|
||||
ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true)
|
||||
JLINK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods
|
||||
endif
|
||||
|
||||
$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jdk jimage
|
||||
$(RM) -r $(JDK_IMAGE_DIR) $(JDK_SORTED_MODULES)
|
||||
$(JIMAGE_TOOL) --mods $(JDK_MODULES_LIST) --output $(JDK_IMAGE_DIR) \
|
||||
$(MODULES_XML) > $(JDK_SORTED_MODULES)
|
||||
$(RM) -r $(JDK_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --output $(JDK_IMAGE_DIR) \
|
||||
--addmods $(JDK_MODULES_LIST) $(JLINK_EXTRA_OPTS)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \
|
||||
$(call DependOnVariable, JRE_MODULES_LIST)
|
||||
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jre jimage
|
||||
$(RM) -r $(JRE_IMAGE_DIR) $(JRE_SORTED_MODULES)
|
||||
$(JIMAGE_TOOL) --mods $(JRE_MODULES_LIST) --output $(JRE_IMAGE_DIR) \
|
||||
$(MODULES_XML) > $(JRE_SORTED_MODULES)
|
||||
$(RM) -r $(JRE_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --output $(JRE_IMAGE_DIR) \
|
||||
--addmods $(JRE_MODULES_LIST)
|
||||
$(TOUCH) $@
|
||||
|
||||
JRE_COMPACT1_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact1
|
||||
JRE_COMPACT2_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact2
|
||||
JRE_COMPACT3_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact3
|
||||
|
||||
COMPACT_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec
|
||||
|
||||
$(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \
|
||||
$(call DependOnVariable, JRE_COMPACT1_MODULES_LIST)
|
||||
$(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JRE_COMPACT1_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jre compact1 jimage
|
||||
$(RM) -r $(JRE_COMPACT1_IMAGE_DIR) $(JRE_COMPACT1_SORTED_MODULES)
|
||||
$(JIMAGE_TOOL) \
|
||||
--mods $(call SubstComma, java.compact1 $(COMPACT_EXTRA_MODULES)) \
|
||||
--output $(JRE_COMPACT1_IMAGE_DIR) \
|
||||
$(MODULES_XML) > $(JRE_COMPACT1_SORTED_MODULES)
|
||||
$(RM) -r $(JRE_COMPACT1_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --addmods $(JRE_COMPACT1_MODULES_LIST) \
|
||||
--output $(JRE_COMPACT1_IMAGE_DIR)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \
|
||||
$(call DependOnVariable, JRE_COMPACT2_MODULES_LIST)
|
||||
$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JRE_COMPACT2_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jre compact2 jimage
|
||||
$(RM) -r $(JRE_COMPACT2_IMAGE_DIR) $(JRE_COMPACT2_SORTED_MODULES)
|
||||
$(JIMAGE_TOOL) \
|
||||
--mods $(call SubstComma, java.compact2 $(COMPACT_EXTRA_MODULES)) \
|
||||
--output $(JRE_COMPACT2_IMAGE_DIR) \
|
||||
$(MODULES_XML) > $(JRE_COMPACT2_SORTED_MODULES)
|
||||
$(RM) -r $(JRE_COMPACT2_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --addmods $(JRE_COMPACT2_MODULES_LIST) \
|
||||
--output $(JRE_COMPACT2_IMAGE_DIR)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES) \
|
||||
$(call DependOnVariable, JRE_COMPACT3_MODULES_LIST)
|
||||
$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JRE_COMPACT3_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jre compact3 jimage
|
||||
$(RM) -r $(JRE_COMPACT3_IMAGE_DIR) $(JRE_COMPACT3_SORTED_MODULES)
|
||||
$(JIMAGE_TOOL) \
|
||||
--mods $(call SubstComma, $(JDK_COMPACT3_MODULES) $(COMPACT_EXTRA_MODULES)) \
|
||||
--output $(JRE_COMPACT3_IMAGE_DIR) \
|
||||
$(MODULES_XML) > $(JRE_COMPACT3_SORTED_MODULES)
|
||||
$(RM) -r $(JRE_COMPACT3_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --addmods $(JRE_COMPACT3_MODULES_LIST) \
|
||||
--output $(JRE_COMPACT3_IMAGE_DIR)
|
||||
$(TOUCH) $@
|
||||
|
||||
TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
|
||||
@ -345,79 +392,6 @@ $(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/%
|
||||
JRE_TARGETS += $(JRE_DOC_TARGETS)
|
||||
JDK_TARGETS += $(JDK_DOC_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Release file
|
||||
|
||||
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release
|
||||
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release
|
||||
JRE_COMPACT1_INFO_FILE := $(JRE_COMPACT1_IMAGE_DIR)/release
|
||||
JRE_COMPACT2_INFO_FILE := $(JRE_COMPACT2_IMAGE_DIR)/release
|
||||
JRE_COMPACT3_INFO_FILE := $(JRE_COMPACT3_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
|
||||
|
||||
# Param 1 - The file containing the MODULES list
|
||||
define create-info-file
|
||||
$(call info-file-item, "JAVA_VERSION", "$(VERSION_NUMBER)")
|
||||
$(call info-file-item, "JAVA_FULL_VERSION", "$(VERSION_STRING)")
|
||||
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)")
|
||||
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)")
|
||||
$(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)")
|
||||
$(if $(JDK_ARCH_ABI_PROP_NAME), \
|
||||
$(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"))
|
||||
$(call info-file-item, "SOURCE", "$(strip $(ALL_SOURCE_TIPS))")
|
||||
$(call info-file-item, "MODULES", "`$(CAT) $1`")
|
||||
endef
|
||||
|
||||
# Param 1 - The file containing the MODULES list
|
||||
define prepare-info-file
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
endef
|
||||
|
||||
define info-file
|
||||
$(call prepare-info-file, $1)
|
||||
$(call create-info-file, $1)
|
||||
endef
|
||||
|
||||
# Create a variable dependency file common for all release info files. The
|
||||
# sorted module list will only change if the image is regenerated, which will
|
||||
# trigger a rebuild of these files anyway.
|
||||
INFO_FILE_VARDEPS := $(call DependOnVariable, create-info-file)
|
||||
|
||||
ALL_SOURCE_TIPS = $(shell \
|
||||
if [ -f $(SUPPORT_OUTPUTDIR)/source_tips ] ; then \
|
||||
$(CAT) $(SUPPORT_OUTPUTDIR)/source_tips ; \
|
||||
fi)
|
||||
|
||||
$(JRE_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips
|
||||
$(call info-file, $(JRE_SORTED_MODULES))
|
||||
|
||||
$(JDK_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips
|
||||
$(call info-file, $(JDK_SORTED_MODULES))
|
||||
|
||||
$(JRE_COMPACT1_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips
|
||||
$(call info-file, $(JRE_COMPACT1_SORTED_MODULES))
|
||||
$(call info-file-item, "JAVA_PROFILE", "compact1")
|
||||
|
||||
$(JRE_COMPACT2_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips
|
||||
$(call info-file, $(JRE_COMPACT2_SORTED_MODULES))
|
||||
$(call info-file-item, "JAVA_PROFILE", "compact2")
|
||||
|
||||
$(JRE_COMPACT3_INFO_FILE): $(INFO_FILE_VARDEPS) $(SUPPORT_OUTPUTDIR)/source_tips
|
||||
$(call info-file, $(JRE_COMPACT3_SORTED_MODULES))
|
||||
$(call info-file-item, "JAVA_PROFILE", "compact3")
|
||||
|
||||
JRE_TARGETS += $(JRE_INFO_FILE)
|
||||
JDK_TARGETS += $(JDK_INFO_FILE)
|
||||
JRE_COMPACT1_TARGETS += $(JRE_COMPACT1_INFO_FILE)
|
||||
JRE_COMPACT2_TARGETS += $(JRE_COMPACT2_INFO_FILE)
|
||||
JRE_COMPACT3_TARGETS += $(JRE_COMPACT3_INFO_FILE)
|
||||
|
||||
################################################################################
|
||||
# src.zip
|
||||
|
||||
@ -435,7 +409,7 @@ ifneq ($(findstring images, $(MAKECMDGOALS)), )
|
||||
DEST := $(JDK_IMAGE_DIR)/demo, \
|
||||
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demos/image), \
|
||||
$(call DoubleDollar, $(call DoubleDollar, \
|
||||
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \
|
||||
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \
|
||||
-type f -a ! \( -name "_the*" -o -name "javac_state" \) )))), \
|
||||
))
|
||||
|
||||
@ -445,7 +419,7 @@ endif
|
||||
################################################################################
|
||||
# /sample dir
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_SAMPLES, \
|
||||
$(eval $(call SetupCopyFiles,COPY_SAMPLES, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/sample/image, \
|
||||
DEST := $(JDK_IMAGE_DIR)/sample, \
|
||||
FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample/image), \
|
||||
|
224
make/Javadoc.gmk
224
make/Javadoc.gmk
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2016, 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
|
||||
@ -138,26 +138,48 @@ $(FULL_COMPANY_NAME) in the US and other countries.
|
||||
# to $(PATH_SEP) being interpreted as an end of
|
||||
# command (newline or shell ; character)
|
||||
ALL_SOURCE_DIRS := $(wildcard \
|
||||
$(JDK_TOPDIR)/src/*/share/classes \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/j* \
|
||||
$(if $(IMPORT_MODULES_SRC), $(IMPORT_MODULES_SRC)/*) \
|
||||
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
|
||||
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_TYPE)/classes \
|
||||
$(JDK_TOPDIR)/src/*/share/classes \
|
||||
$(HOTSPOT_TOPDIR)/src/*/share/classes \
|
||||
$(LANGTOOLS_TOPDIR)/src/*/share/classes \
|
||||
$(NASHORN_TOPDIR)/src/*/share/classes \
|
||||
$(CORBA_TOPDIR)/src/*/share/classes \
|
||||
$(JAXP_TOPDIR)/src/*/share/classes \
|
||||
$(JAXWS_TOPDIR)/src/*/share/classes \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/j* \
|
||||
$(SUPPORT_OUTPUTDIR)/rmic/j* \
|
||||
$(JDK_TOPDIR)/src/*/share/doc/stub \
|
||||
) \
|
||||
#
|
||||
|
||||
ALL_MODULE_SOURCE_DIRS := \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/* \
|
||||
$(if $(IMPORT_MODULES_SRC), $(IMPORT_MODULES_SRC)/*) \
|
||||
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
|
||||
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_TYPE)/classes \
|
||||
$(JDK_TOPDIR)/src/*/share/classes \
|
||||
$(HOTSPOT_TOPDIR)/src/*/share/classes \
|
||||
$(LANGTOOLS_TOPDIR)/src/*/share/classes \
|
||||
$(NASHORN_TOPDIR)/src/*/share/classes \
|
||||
$(CORBA_TOPDIR)/src/*/share/classes \
|
||||
$(JAXP_TOPDIR)/src/*/share/classes \
|
||||
$(JAXWS_TOPDIR)/src/*/share/classes \
|
||||
$(SUPPORT_OUTPUTDIR)/rmic/* \
|
||||
$(JDK_TOPDIR)/src/*/share/doc/stub \
|
||||
#
|
||||
|
||||
|
||||
# List with classpath separator between them
|
||||
EMPTY:=
|
||||
SPACE:= $(EMPTY) $(EMPTY)
|
||||
RELEASEDOCS_SOURCEPATH = \
|
||||
$(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_SOURCE_DIRS)))
|
||||
|
||||
RELEASEDOCS_MODULESOURCEPATH = \
|
||||
$(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_MODULE_SOURCE_DIRS)))
|
||||
|
||||
define prep-target
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
@ -372,6 +394,9 @@ COREAPI_OVERVIEW = $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html
|
||||
COREAPI_OPTIONS_FILE = $(DOCSTMPDIR)/coredocs.options
|
||||
COREAPI_PACKAGES_FILE = $(DOCSTMPDIR)/coredocs.packages
|
||||
|
||||
# The modules required to be documented
|
||||
COREAPI_MODULES = java.se.ee
|
||||
|
||||
coredocs: $(COREAPI_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -391,7 +416,9 @@ $(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW)
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:reference) ; \
|
||||
$(call OptionOnly,-Xdoclint/package:-org.omg.*) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(COREAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ISO-8859-1) ; \
|
||||
$(call OptionOnly,-splitIndex) ; \
|
||||
$(call OptionPair,-overview,$(COREAPI_OVERVIEW)) ; \
|
||||
@ -431,6 +458,9 @@ DOCLETAPI_INDEX_FILE = $(DOCLETAPI_DOCDIR)/index.html
|
||||
DOCLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/docletapi.options
|
||||
DOCLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/docletapi.packages
|
||||
|
||||
# The modules required to be documented
|
||||
DOCLETAPI_MODULES = jdk.javadoc
|
||||
|
||||
docletapidocs: $(DOCLETAPI_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -449,7 +479,9 @@ $(DOCLETAPI_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:all) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(DOCLETAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-breakiterator) ; \
|
||||
$(call OptionPair,-doctitle,$(DOCLETAPI_DOCTITLE)) ; \
|
||||
@ -488,6 +520,9 @@ OLD_DOCLETAPI_INDEX_FILE = $(OLD_DOCLETAPI_DOCDIR)/index.html
|
||||
OLD_DOCLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/old-docletapi.options
|
||||
OLD_DOCLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/old-docletapi.packages
|
||||
|
||||
# The modules required to be documented
|
||||
OLD_DOCLETAPI_MODULES = jdk.javadoc
|
||||
|
||||
olddocletapidocs: $(OLD_DOCLETAPI_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -506,7 +541,9 @@ $(OLD_DOCLETAPI_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:all) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(OLD_DOCLETAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-breakiterator) ; \
|
||||
$(call OptionPair,-doctitle,$(OLD_DOCLETAPI_DOCTITLE)) ; \
|
||||
@ -541,6 +578,9 @@ TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/com/sun/tools/doclets/Taglet.html
|
||||
TAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.options
|
||||
TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages
|
||||
|
||||
# The modules required to be documented
|
||||
TAGLETAPI_MODULES = jdk.javadoc
|
||||
|
||||
tagletapidocs: $(TAGLETAPI_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -564,7 +604,9 @@ $(TAGLETAPI_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:all) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(TAGLETAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nonavbar) ; \
|
||||
$(call OptionOnly,-noindex) ; \
|
||||
@ -599,6 +641,9 @@ DOMAPI_INDEX_FILE = $(DOMAPI_DOCDIR)/index.html
|
||||
DOMAPI_OPTIONS_FILE = $(DOCSTMPDIR)/domapi.options
|
||||
DOMAPI_PACKAGES_FILE = $(DOCSTMPDIR)/domapi.packages
|
||||
|
||||
# The modules required to be documented
|
||||
DOMAPI_MODULES = java.xml,jdk.xml.dom
|
||||
|
||||
domapidocs: $(DOMAPI_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -617,7 +662,9 @@ $(DOMAPI_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(DOMAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-splitIndex) ; \
|
||||
$(call OptionPair,-doctitle,$(DOMAPI_DOCTITLE)) ; \
|
||||
@ -663,6 +710,9 @@ JDI_INDEX_FILE = $(JDI_DOCDIR)/index.html
|
||||
JDI_OPTIONS_FILE = $(DOCSTMPDIR)/jdi.options
|
||||
JDI_PACKAGES_FILE = $(DOCSTMPDIR)/jdi.packages
|
||||
|
||||
# The modules required to be documented
|
||||
JDI_MODULES = jdk.jdi
|
||||
|
||||
jdidocs: $(JDI_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -681,7 +731,9 @@ $(JDI_OPTIONS_FILE): $(JDI_OVERVIEW)
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(JDI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionPair,-overview,$(JDI_OVERVIEW)) ; \
|
||||
$(call OptionPair,-doctitle,$(JDI_DOCTITLE)) ; \
|
||||
@ -751,6 +803,9 @@ JAAS_INDEX_FILE = $(JAAS_DOCDIR)/index.html
|
||||
JAAS_OPTIONS_FILE = $(DOCSTMPDIR)/jaas.options
|
||||
JAAS_PACKAGES_FILE = $(DOCSTMPDIR)/jaas.packages
|
||||
|
||||
# The modules required to be documented
|
||||
JAAS_MODULES = jdk.security.auth
|
||||
|
||||
jaasdocs: $(JAAS_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -769,7 +824,9 @@ $(JAAS_OPTIONS_FILE): $(JAAS_OVERVIEW)
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(JAAS_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionPair,-overview,$(JAAS_OVERVIEW)) ; \
|
||||
$(call OptionPair,-doctitle,$(JAAS_DOCTITLE)) ; \
|
||||
@ -805,6 +862,9 @@ JGSS_INDEX_FILE = $(JGSS_DOCDIR)/index.html
|
||||
JGSS_OPTIONS_FILE = $(DOCSTMPDIR)/jgss.options
|
||||
JGSS_PACKAGES_FILE = $(DOCSTMPDIR)/jgss.packages
|
||||
|
||||
# The modules required to be documented
|
||||
JGSS_MODULES = jdk.security.jgss
|
||||
|
||||
jgssdocs: $(JGSS_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -823,7 +883,9 @@ $(JGSS_OPTIONS_FILE): $(JGSS_OVERVIEW)
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(JGSS_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-overview,$(JGSS_OVERVIEW)) ; \
|
||||
@ -859,6 +921,9 @@ SMARTCARDIO_INDEX_FILE = $(SMARTCARDIO_DOCDIR)/index.html
|
||||
SMARTCARDIO_OPTIONS_FILE = $(DOCSTMPDIR)/smartcardio.options
|
||||
SMARTCARDIO_PACKAGES_FILE = $(DOCSTMPDIR)/smartcardio.packages
|
||||
|
||||
# The modules required to be documented
|
||||
SMARTCARDIO_MODULES = java.smartcardio
|
||||
|
||||
smartcardiodocs: $(SMARTCARDIO_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -877,7 +942,9 @@ $(SMARTCARDIO_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(SMARTCARDIO_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE)) ; \
|
||||
@ -911,6 +978,9 @@ HTTPSERVER_INDEX_HTML = $(HTTPSERVER_DOCDIR)/index.html
|
||||
HTTPSERVER_OPTIONS_FILE = $(DOCSTMPDIR)/httpserver.options
|
||||
HTTPSERVER_PACKAGES_FILE = $(DOCSTMPDIR)/httpserver.packages
|
||||
|
||||
# The modules required to be documented
|
||||
HTTPSERVER_MODULES = jdk.httpserver
|
||||
|
||||
httpserverdocs: $(HTTPSERVER_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -929,7 +999,9 @@ $(HTTPSERVER_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(HTTPSERVER_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE)) ; \
|
||||
@ -967,6 +1039,9 @@ MGMT_INDEX_FILE = $(MGMT_DOCDIR)/index.html
|
||||
MGMT_OPTIONS_FILE = $(DOCSTMPDIR)/mgmt.options
|
||||
MGMT_PACKAGES_FILE = $(DOCSTMPDIR)/mgmt.packages
|
||||
|
||||
# The modules required to be documented
|
||||
MGMT_MODULES = jdk.management
|
||||
|
||||
mgmtdocs: $(MGMT_INDEX_FILE)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -990,7 +1065,9 @@ $(MGMT_OPTIONS_FILE): $(MGMT_OVERVIEW)
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(MGMT_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-overview,$(MGMT_OVERVIEW)) ; \
|
||||
@ -1025,6 +1102,9 @@ ATTACH_INDEX_HTML = $(ATTACH_DOCDIR)/index.html
|
||||
ATTACH_OPTIONS_FILE = $(DOCSTMPDIR)/attach.options
|
||||
ATTACH_PACKAGES_FILE = $(DOCSTMPDIR)/attach.packages
|
||||
|
||||
# The modules required to be documented
|
||||
ATTACH_MODULES = jdk.attach
|
||||
|
||||
attachdocs: $(ATTACH_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -1043,7 +1123,9 @@ $(ATTACH_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(ATTACH_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-doctitle,$(ATTACH_DOCTITLE)) ; \
|
||||
@ -1077,6 +1159,9 @@ JCONSOLE_INDEX_HTML = $(JCONSOLE_DOCDIR)/index.html
|
||||
JCONSOLE_OPTIONS_FILE = $(DOCSTMPDIR)/jconsole.options
|
||||
JCONSOLE_PACKAGES_FILE = $(DOCSTMPDIR)/jconsole.packages
|
||||
|
||||
# The modules required to be documented
|
||||
JCONSOLE_MODULES = jdk.jconsole
|
||||
|
||||
jconsoledocs: $(JCONSOLE_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -1095,7 +1180,9 @@ $(JCONSOLE_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(JCONSOLE_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-doctitle,$(JCONSOLE_DOCTITLE)) ; \
|
||||
@ -1131,6 +1218,9 @@ TREEAPI_INDEX_HTML = $(TREEAPI_DOCDIR)/index.html
|
||||
TREEAPI_OPTIONS_FILE = $(DOCSTMPDIR)/treeapi.options
|
||||
TREEAPI_PACKAGES_FILE = $(DOCSTMPDIR)/treeapi.packages
|
||||
|
||||
# The modules required to be documented
|
||||
TREEAPI_MODULES = jdk.compiler
|
||||
|
||||
treeapidocs: $(TREEAPI_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -1149,7 +1239,9 @@ $(TREEAPI_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:all) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(TREEAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE)) ; \
|
||||
$(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
|
||||
@ -1185,6 +1277,9 @@ NASHORNAPI_INDEX_HTML = $(NASHORNAPI_DOCDIR)/index.html
|
||||
NASHORNAPI_OPTIONS_FILE = $(DOCSTMPDIR)/nashornapi.options
|
||||
NASHORNAPI_PACKAGES_FILE = $(DOCSTMPDIR)/nashornapi.packages
|
||||
|
||||
# The modules required to be documented
|
||||
NASHORNAPI_MODULES = jdk.scripting.nashorn
|
||||
|
||||
nashornapidocs: $(NASHORNAPI_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -1203,7 +1298,9 @@ $(NASHORNAPI_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:all) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(NASHORNAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionPair,-doctitle,$(NASHORNAPI_DOCTITLE)) ; \
|
||||
$(call OptionPair,-windowtitle,$(NASHORNAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
|
||||
@ -1239,6 +1336,9 @@ DYNALINKAPI_INDEX_HTML = $(DYNALINKAPI_DOCDIR)/index.html
|
||||
DYNALINKAPI_OPTIONS_FILE = $(DOCSTMPDIR)/dynalinkapi.options
|
||||
DYNALINKAPI_PACKAGES_FILE = $(DOCSTMPDIR)/dynalinkapi.packages
|
||||
|
||||
# The modules required to be documented
|
||||
DYNALINKAPI_MODULES = jdk.dynalink
|
||||
|
||||
dynalinkapidocs: $(DYNALINKAPI_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -1257,7 +1357,9 @@ $(DYNALINKAPI_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:all) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(DYNALINKAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionPair,-doctitle,$(DYNALINKAPI_DOCTITLE)) ; \
|
||||
$(call OptionPair,-windowtitle,$(DYNALINKAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
|
||||
@ -1291,6 +1393,9 @@ SCTPAPI_INDEX_HTML = $(SCTPAPI_DOCDIR)/index.html
|
||||
SCTPAPI_OPTIONS_FILE = $(DOCSTMPDIR)/sctp.options
|
||||
SCTPAPI_PACKAGES_FILE = $(DOCSTMPDIR)/sctp.packages
|
||||
|
||||
# The modules required to be documented
|
||||
SCTPAPI_MODULES = jdk.sctp
|
||||
|
||||
sctpdocs: $(SCTPAPI_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -1309,7 +1414,9 @@ $(SCTPAPI_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(SCTPAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-doctitle,$(SCTPAPI_DOCTITLE)) ; \
|
||||
@ -1343,6 +1450,9 @@ JACCESSAPI_INDEX_HTML = $(JACCESSAPI_DOCDIR)/index.html
|
||||
JACCESSAPI_OPTIONS_FILE = $(DOCSTMPDIR)/jaccess.options
|
||||
JACCESSAPI_PACKAGES_FILE = $(DOCSTMPDIR)/jaccess.packages
|
||||
|
||||
# The modules required to be documented
|
||||
JACCESSAPI_MODULES = jdk.accessibility
|
||||
|
||||
jaccessdocs: $(JACCESSAPI_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -1361,7 +1471,9 @@ $(JACCESSAPI_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:all) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(JACCESSAPI_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-doctitle,$(JACCESSAPI_DOCTITLE)) ; \
|
||||
@ -1395,6 +1507,9 @@ JDKNET_INDEX_HTML = $(JDKNET_DOCDIR)/index.html
|
||||
JDKNET_OPTIONS_FILE = $(DOCSTMPDIR)/jdknet.options
|
||||
JDKNET_PACKAGES_FILE = $(DOCSTMPDIR)/jdknet.packages
|
||||
|
||||
# The modules required to be documented
|
||||
JDKNET_MODULES = java.base
|
||||
|
||||
jdknetdocs: $(JDKNET_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
@ -1413,7 +1528,9 @@ $(JDKNET_OPTIONS_FILE):
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(JDKNET_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-doctitle,$(JDKNET_DOCTITLE)) ; \
|
||||
@ -1428,6 +1545,69 @@ $(JDKNET_PACKAGES_FILE): $(call PackageDependencies,$(JDKNET_PKGS))
|
||||
$(prep-target)
|
||||
$(call PackageFilter,$(JDKNET_PKGS))
|
||||
|
||||
#############################################################
|
||||
#
|
||||
# jlink plugin API docs
|
||||
#
|
||||
# TODO: Need to decide when the plugin API is ready to publish as experimental API.
|
||||
# This target is temporarily added for internal use for now.
|
||||
#
|
||||
|
||||
ALL_OTHER_TARGETS += jlinkdocs
|
||||
|
||||
JLINK_PLUGIN_FIRST_COPYRIGHT_YEAR = 2015
|
||||
JLINK_PLUGIN_DOCDIR := $(JDK_API_DOCSDIR)/jlink
|
||||
JLINK_PLUGIN2COREAPI := ../$(JDKJRE2COREAPI)
|
||||
JLINK_PLUGIN_DOCTITLE := JLink Plugin API - EXPERIMENTAL
|
||||
JLINK_PLUGIN_WINDOWTITLE := JLink Plugin API - EXPERIMENTAL
|
||||
JLINK_PLUGIN_HEADER := <strong>JLink Plugin API - EXPERIMENTAL</strong>
|
||||
JLINK_PLUGIN_BOTTOM := $(call CommonBottom,$(JLINK_PLUGIN_FIRST_COPYRIGHT_YEAR))
|
||||
JLINK_PLUGIN_PKGS = jdk.tools.jlink \
|
||||
jdk.tools.jlink.builder \
|
||||
jdk.tools.jlink.plugin
|
||||
|
||||
JLINK_PLUGIN_INDEX_HTML = $(JLINK_PLUGIN_DOCDIR)/index.html
|
||||
JLINK_PLUGIN_OPTIONS_FILE = $(DOCSTMPDIR)/jlinkplugins.options
|
||||
JLINK_PLUGIN_PACKAGES_FILE = $(DOCSTMPDIR)/jlinkplugins.packages
|
||||
|
||||
# The modules required to be documented
|
||||
JLINK_PLUGIN_MODULES = jdk.jlink
|
||||
|
||||
jlinkdocs: $(JLINK_PLUGIN_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
$(JLINK_PLUGIN_INDEX_HTML): GET2DOCSDIR=$(JLINK_PLUGIN2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(JLINK_PLUGIN_INDEX_HTML): $(JLINK_PLUGIN_OPTIONS_FILE) $(JLINK_PLUGIN_PACKAGES_FILE) $(COREAPI_INDEX_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JLINK_PLUGIN_OPTIONS_FILE),$(JLINK_PLUGIN_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD_SMALL) -d $(@D) \
|
||||
@$(JLINK_PLUGIN_OPTIONS_FILE) @$(JLINK_PLUGIN_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
$(JLINK_PLUGIN_OPTIONS_FILE):
|
||||
$(prep-target)
|
||||
@($(call COMMON_JAVADOCFLAGS) ; \
|
||||
$(call COMMON_JAVADOCTAGS) ; \
|
||||
$(call OptionOnly,-Xdoclint:none) ; \
|
||||
$(call OptionPair,-system,none) ; \
|
||||
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
|
||||
$(call OptionPair,-addmods,$(JLINK_PLUGIN_MODULES)) ; \
|
||||
$(call OptionPair,-encoding,ascii) ; \
|
||||
$(call OptionOnly,-nodeprecatedlist) ; \
|
||||
$(call OptionPair,-doctitle,$(JLINK_PLUGIN_DOCTITLE)) ; \
|
||||
$(call OptionPair,-windowtitle,$(JLINK_PLUGIN_WINDOWTITLE) $(DRAFT_WINTITLE)); \
|
||||
$(call OptionPair,-header,$(JLINK_PLUGIN_HEADER)$(DRAFT_HEADER)); \
|
||||
$(call OptionPair,-bottom,$(JLINK_PLUGIN_BOTTOM)$(DRAFT_BOTTOM)); \
|
||||
$(call OptionTrip,-linkoffline,$(JLINK_PLUGIN2COREAPI),$(COREAPI_DOCSDIR)/); \
|
||||
) >> $@
|
||||
|
||||
# Create a file with the package names in it
|
||||
$(JLINK_PLUGIN_PACKAGES_FILE): $(call PackageDependencies,$(JLINK_PLUGIN_PKGS))
|
||||
$(prep-target)
|
||||
$(call PackageFilter,$(JLINK_PLUGIN_PKGS))
|
||||
|
||||
|
||||
otherdocs: $(ALL_OTHER_TARGETS)
|
||||
|
||||
|
@ -36,6 +36,10 @@ ifneq ($(CYGPATH), )
|
||||
override JPRT_ARCHIVE_INSTALL_BUNDLE := \
|
||||
$(shell $(CYGPATH) -u $(JPRT_ARCHIVE_INSTALL_BUNDLE))
|
||||
endif
|
||||
ifdef JPRT_ARCHIVE_MODULES_BUNDLE
|
||||
override JPRT_ARCHIVE_MODULES_BUNDLE := \
|
||||
$(shell $(CYGPATH) -u $(JPRT_ARCHIVE_MODULES_BUNDLE))
|
||||
endif
|
||||
ifdef JPRT_ARCHIVE_TEST_BUNDLE
|
||||
override JPRT_ARCHIVE_TEST_BUNDLE := \
|
||||
$(shell $(CYGPATH) -u $(JPRT_ARCHIVE_TEST_BUNDLE))
|
||||
@ -54,6 +58,9 @@ endif
|
||||
ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
|
||||
JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
|
||||
endif
|
||||
ifndef JPRT_ARCHIVE_MODULES_BUNDLE
|
||||
JPRT_ARCHIVE_MODULES_BUNDLE=/tmp/jprt_bundles/modules.zip
|
||||
endif
|
||||
ifndef JPRT_ARCHIVE_TEST_BUNDLE
|
||||
JPRT_ARCHIVE_TEST_BUNDLE=/tmp/jprt_bundles/test-image.zip
|
||||
endif
|
||||
@ -66,7 +73,8 @@ ifeq ($(SKIP_BOOT_CYCLE), false)
|
||||
endif
|
||||
|
||||
# This target must be called in the context of a SPEC file
|
||||
jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) $(JPRT_ARCHIVE_TEST_BUNDLE)
|
||||
jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) $(JPRT_ARCHIVE_TEST_BUNDLE) \
|
||||
$(JPRT_ARCHIVE_MODULES_BUNDLE)
|
||||
|
||||
ifeq ($(GCOV_ENABLED), true)
|
||||
jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE)
|
||||
@ -78,6 +86,11 @@ $(JPRT_ARCHIVE_BUNDLE): bundles
|
||||
$(RM) $@
|
||||
$(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@
|
||||
|
||||
$(JPRT_ARCHIVE_MODULES_BUNDLE): bundles
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $(BUILD_OUTPUT)/bundles/modules.zip $@
|
||||
|
||||
$(JPRT_ARCHIVE_TEST_BUNDLE): bundles
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
@ -104,6 +117,8 @@ bundles: all
|
||||
$(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip .
|
||||
$(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIP) -y -q -r \
|
||||
$(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip .
|
||||
$(CD) $(IMAGES_OUTPUTDIR)/jmods && $(ZIP) -y -q -r \
|
||||
$(BUILD_OUTPUT)/bundles/modules.zip .
|
||||
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
|
||||
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r \
|
||||
$(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
|
||||
|
@ -28,6 +28,7 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JarArchive.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
# This rule will be depended on due to the MANIFEST line
|
||||
@ -40,10 +41,32 @@ $(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
|
||||
@@COMPANY_NAME@@ => $(COMPANY_NAME) , \
|
||||
))
|
||||
|
||||
$(eval $(call SetupJarArchive, JRTFS_JAR, \
|
||||
SRCS := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
|
||||
JIMAGE_PKGS := \
|
||||
jdk/internal/jimage \
|
||||
jdk/internal/jrtfs \
|
||||
#
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_JRTFS, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
|
||||
EXCLUDE_FILES := module-info.java, \
|
||||
INCLUDES := $(JIMAGE_PKGS), \
|
||||
BIN := $(SUPPORT_OUTPUTDIR)/jrtfs_classes))
|
||||
|
||||
# Because of the explicit INCLUDES in the compilation setup above, the service provider
|
||||
# file will not be copied unless META-INF/services would also be added to the INCLUDES.
|
||||
# Adding META-INF/services would include all files in that directory when only the one
|
||||
# is needed, which is why this explicit copy is defined instead.
|
||||
$(eval $(call SetupCopyFiles,COPY_JIMAGE_SERVICE_PROVIDER, \
|
||||
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
|
||||
DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
||||
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
|
||||
|
||||
$(eval $(call SetupJarArchive,BUILD_JRTFS_JAR, \
|
||||
DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \
|
||||
SRCS := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
||||
JAR := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar, \
|
||||
MANIFEST := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf, \
|
||||
))
|
||||
|
||||
all: $(JRTFS_JAR)
|
||||
all: $(BUILD_JRTFS_JAR)
|
||||
|
197
make/Main.gmk
197
make/Main.gmk
@ -42,8 +42,6 @@ include $(SRC_ROOT)/make/MainSupport.gmk
|
||||
|
||||
# Load the vital tools for all the makefiles.
|
||||
include $(SRC_ROOT)/make/common/MakeBase.gmk
|
||||
# Explicitly generate module deps makefile data
|
||||
include $(SRC_ROOT)/make/GenerateModuleDeps.gmk
|
||||
include $(SRC_ROOT)/make/common/Modules.gmk
|
||||
|
||||
# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
|
||||
@ -113,6 +111,24 @@ LANGTOOLS_GENSRC_TARGETS := $(filter %-gensrc-langtools, $(GENSRC_TARGETS))
|
||||
CORBA_GENSRC_TARGETS := $(filter %-gensrc-corba, $(GENSRC_TARGETS))
|
||||
HOTSPOT_GENSRC_TARGETS := $(filter %-gensrc-hotspot, $(GENSRC_TARGETS))
|
||||
|
||||
GENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
|
||||
GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
|
||||
$(GENSRC_MODULEINFO_MODULES))
|
||||
|
||||
GENSRC_MODULES := $(GENSRC_MODULEINFO_MODULES)
|
||||
GENSRC_TARGETS += $(sort $(GENSRC_MODULEINFO_TARGETS) \
|
||||
$(addsuffix -gensrc, $(GENSRC_MODULES)))
|
||||
|
||||
define DeclareModuleInfoRecipe
|
||||
$1-gensrc-moduleinfo:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
|
||||
-f GensrcModuleInfo.gmk MODULE=$1)
|
||||
|
||||
$1-gensrc: $1-gensrc-moduleinfo
|
||||
endef
|
||||
|
||||
$(foreach m, $(GENSRC_MODULEINFO_MODULES), $(eval $(call DeclareModuleInfoRecipe,$m)))
|
||||
|
||||
ALL_TARGETS += $(GENSRC_TARGETS)
|
||||
|
||||
################################################################################
|
||||
@ -136,11 +152,27 @@ $(eval $(call DeclareRecipesForPhase, COPY, \
|
||||
USE_WRAPPER := true, \
|
||||
MULTIPLE_MAKEFILES := true))
|
||||
|
||||
ALL_TARGETS += $(COPY_TARGETS)
|
||||
ALL_COPY_MODULES += $(COPY_MODULES)
|
||||
ALL_COPY_TARGETS += $(COPY_TARGETS)
|
||||
|
||||
IMPORT_COPY_MODULES := $(call FindImportedModules)
|
||||
IMPORT_COPY_TARGETS := $(addsuffix -copy, $(IMPORT_COPY_MODULES))
|
||||
ALL_COPY_MODULES += $(IMPORT_COPY_MODULES)
|
||||
ALL_COPY_TARGETS += $(IMPORT_COPY_TARGETS)
|
||||
|
||||
define DeclareImportCopyRecipe
|
||||
$1-copy:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
|
||||
-f CopyImportModules.gmk MODULE=$1)
|
||||
endef
|
||||
|
||||
$(foreach m, $(IMPORT_COPY_MODULES), $(eval $(call DeclareImportCopyRecipe,$m)))
|
||||
|
||||
ALL_TARGETS += $(ALL_COPY_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Targets for compiling all java modules. Nashorn is treated separately.
|
||||
JAVA_MODULES := $(call FindJavaModules)
|
||||
JAVA_MODULES := $(ALL_MODULES)
|
||||
JAVA_TARGETS := $(addsuffix -java, $(JAVA_MODULES))
|
||||
|
||||
define DeclareCompileJavaRecipe
|
||||
@ -214,7 +246,48 @@ samples-jdk:
|
||||
ALL_TARGETS += demos-jdk samples-jdk
|
||||
|
||||
################################################################################
|
||||
# Image targets
|
||||
# Jigsaw specific data and analysis targets.
|
||||
|
||||
generate-summary:
|
||||
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) -f GenerateModuleSummary.gmk)
|
||||
|
||||
ALL_TARGETS += generate-summary
|
||||
|
||||
################################################################################
|
||||
# Strip binaries targets
|
||||
|
||||
STRIP_MODULES := $(sort $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES) \
|
||||
$(GENDATA_MODULES))
|
||||
STRIP_TARGETS := $(addsuffix -strip, $(STRIP_MODULES))
|
||||
|
||||
define DeclareStripRecipe
|
||||
$1-strip:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f StripBinaries.gmk \
|
||||
MODULE=$1)
|
||||
endef
|
||||
|
||||
$(foreach m, $(STRIP_MODULES), $(eval $(call DeclareStripRecipe,$m)))
|
||||
|
||||
ALL_TARGETS += $(STRIP_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Jmod targets
|
||||
|
||||
JMOD_MODULES := $(ALL_MODULES)
|
||||
JMOD_TARGETS := $(addsuffix -jmod, $(JMOD_MODULES))
|
||||
|
||||
define DeclareJmodRecipe
|
||||
$1-jmod:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
|
||||
MODULE=$1)
|
||||
endef
|
||||
|
||||
$(foreach m, $(JMOD_MODULES), $(eval $(call DeclareJmodRecipe,$m)))
|
||||
|
||||
ALL_TARGETS += $(JMOD_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Images targets
|
||||
|
||||
# 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.
|
||||
@ -236,9 +309,6 @@ zip-security:
|
||||
zip-source:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
|
||||
|
||||
strip-binaries:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f StripBinaries.gmk)
|
||||
|
||||
jrtfs-jar:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
|
||||
|
||||
@ -251,7 +321,7 @@ profiles:
|
||||
mac-bundles-jdk:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
|
||||
|
||||
ALL_TARGETS += source-tips bootcycle-images zip-security zip-source strip-binaries \
|
||||
ALL_TARGETS += source-tips bootcycle-images zip-security zip-source \
|
||||
jrtfs-jar jimages profiles mac-bundles-jdk
|
||||
|
||||
################################################################################
|
||||
@ -265,6 +335,28 @@ docs-jvmtidoc:
|
||||
|
||||
ALL_TARGETS += docs-javadoc docs-jvmtidoc
|
||||
|
||||
################################################################################
|
||||
# Cross compilation support
|
||||
|
||||
ifeq ($(CREATE_BUILDJDK), true)
|
||||
# This target is only called by the recursive call below.
|
||||
create-buildjdk-compile-hotspot-helper: hotspot
|
||||
create-buildjdk-compile-modules-helper: jdk.jlink-launchers java.base-copy
|
||||
endif
|
||||
|
||||
create-buildjdk-copy:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk)
|
||||
|
||||
create-buildjdk-compile-hotspot create-buildjdk-compile-modules:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
|
||||
$@-helper \
|
||||
SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
|
||||
HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
|
||||
CREATING_BUILDJDK=true)
|
||||
|
||||
ALL_TARGETS += create-buildjdk-copy create-buildjdk-compile-hotspot \
|
||||
create-buildjdk-compile-modules
|
||||
|
||||
################################################################################
|
||||
# Build tests
|
||||
#
|
||||
@ -321,16 +413,6 @@ test-make:
|
||||
ALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \
|
||||
test-hotspot-internal test-jdk-jtreg-native test-make
|
||||
|
||||
################################################################################
|
||||
# Verification targets
|
||||
|
||||
verify-modules:
|
||||
@$(call TargetEnter)
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CheckModules.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
ALL_TARGETS += verify-modules
|
||||
|
||||
################################################################################
|
||||
# Install targets
|
||||
|
||||
@ -370,6 +452,8 @@ else
|
||||
|
||||
$(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
|
||||
|
||||
$(GENSRC_MODULEINFO_TARGETS): buildtools-jdk
|
||||
|
||||
$(GENDATA_TARGETS): interim-langtools buildtools-jdk
|
||||
|
||||
interim-rmic: interim-langtools
|
||||
@ -407,8 +491,11 @@ else
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
|
||||
|
||||
# Declare dependencies from <module>-lib to <module>-java
|
||||
# Skip modules that do not have java source.
|
||||
# Skip modules that do not have java source. When creating a BUILD_JDK, the
|
||||
# java compilation has already been done by the normal build and copied in.
|
||||
ifneq ($(CREATING_BUILDJDK), true)
|
||||
$(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
|
||||
endif
|
||||
|
||||
# Declare dependencies from all other <module>-lib to java.base-lib
|
||||
$(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
|
||||
@ -438,31 +525,57 @@ else
|
||||
|
||||
jdk.jdeps-gendata: java rmic
|
||||
|
||||
# Declare dependencies from <module>-strip to libs, launchers, gendata and copy
|
||||
$(foreach m, $(LIBS_MODULES), $(eval $m-strip: $m-libs))
|
||||
$(foreach m, $(LAUNCHER_MODULES), $(eval $m-strip: $m-launchers))
|
||||
$(foreach m, $(GENDATA_MODULES), $(eval $m-strip: $m-gendata))
|
||||
$(foreach m, $(COPY_MODULES), $(eval $m-strip: $m-copy))
|
||||
|
||||
# Declare dependencies between jmod targets
|
||||
$(foreach m, $(JMOD_MODULES), \
|
||||
$(eval $m-jmod: $(addsuffix -jmod, $(call FindDepsForModule,$m))))
|
||||
|
||||
# Declare dependencies from <module>-jmod to all other module targets
|
||||
$(foreach m, $(STRIP_MODULES), $(eval $m-jmod: $m-strip))
|
||||
$(foreach m, $(JAVA_MODULES), $(eval $m-jmod: $m-java))
|
||||
$(foreach m, $(GENDATA_MODULES), $(eval $m-jmod: $m-gendata))
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m-jmod: $m-rmic))
|
||||
$(foreach m, $(LIBS_MODULES), $(eval $m-jmod: $m-libs))
|
||||
$(foreach m, $(LAUNCHER_MODULES), $(eval $m-jmod: $m-launchers))
|
||||
$(foreach m, $(COPY_MODULES), $(eval $m-jmod: $m-copy))
|
||||
|
||||
# Jmods cannot be created until we have the jlink tool ready to run, which requires
|
||||
# all java modules to be compiled and jdk.jlink-launchers.
|
||||
$(JMOD_TARGETS): java java.base-libs jdk.jlink-launchers
|
||||
|
||||
ifeq ($(CREATE_BUILDJDK), true)
|
||||
$(JMOD_TARGETS): create-buildjdk
|
||||
endif
|
||||
|
||||
zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
|
||||
$(filter jdk.crypto%, $(JAVA_TARGETS))
|
||||
|
||||
zip-source: gensrc rmic
|
||||
|
||||
strip-binaries: libs launchers gendata copy
|
||||
jrtfs-jar: interim-langtools
|
||||
|
||||
jrtfs-jar: buildtools-jdk
|
||||
jimages: jmods zip-source source-tips demos samples jrtfs-jar
|
||||
|
||||
jimages: exploded-image zip-source strip-binaries source-tips demos samples \
|
||||
jrtfs-jar
|
||||
|
||||
profiles: exploded-image strip-binaries source-tips
|
||||
profiles: jmods zip-source source-tips jrtfs-jar
|
||||
|
||||
mac-bundles-jdk: jimages
|
||||
|
||||
bootcycle-images: jimages
|
||||
|
||||
docs-javadoc: gensrc rmic
|
||||
docs-javadoc: $(GENSRC_TARGETS) rmic
|
||||
|
||||
docs-jvmtidoc: hotspot
|
||||
|
||||
test: jimages test-image
|
||||
|
||||
verify-modules: exploded-image
|
||||
create-buildjdk-copy: jdk.jlink-java java.base-gendata
|
||||
|
||||
create-buildjdk-compile-modules: create-buildjdk-copy create-buildjdk-compile-hotspot
|
||||
|
||||
test-make: clean-test-make
|
||||
|
||||
@ -482,6 +595,8 @@ else
|
||||
|
||||
install: product-images
|
||||
|
||||
generate-summary: jmods
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
@ -494,7 +609,7 @@ gensrc: $(GENSRC_TARGETS)
|
||||
|
||||
gendata: $(GENDATA_TARGETS)
|
||||
|
||||
copy: $(COPY_TARGETS)
|
||||
copy: $(ALL_COPY_TARGETS)
|
||||
|
||||
java: $(JAVA_TARGETS)
|
||||
|
||||
@ -504,6 +619,10 @@ libs: $(LIBS_TARGETS)
|
||||
|
||||
launchers: $(LAUNCHER_TARGETS)
|
||||
|
||||
jmods: $(JMOD_TARGETS)
|
||||
|
||||
strip-binaries: $(STRIP_TARGETS)
|
||||
|
||||
# Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
|
||||
# is actually handled by jdk.jdi-gensrc
|
||||
jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
|
||||
@ -516,8 +635,7 @@ $(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
|
||||
$(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
|
||||
$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
|
||||
$(foreach m, $(COPY_MODULES), $(eval $m: $m-copy))
|
||||
|
||||
$(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
|
||||
demos: demos-jdk
|
||||
|
||||
samples: samples-jdk
|
||||
@ -525,6 +643,9 @@ samples: samples-jdk
|
||||
# The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
|
||||
exploded-image: $(ALL_MODULES)
|
||||
|
||||
create-buildjdk: create-buildjdk-compile-modules create-buildjdk-copy \
|
||||
create-buildjdk-compile-hotspot
|
||||
|
||||
mac-bundles: mac-bundles-jdk
|
||||
|
||||
# The $(BUILD_OUTPUT)/images directory contain the resulting deliverables,
|
||||
@ -532,7 +653,13 @@ mac-bundles: mac-bundles-jdk
|
||||
|
||||
# This target builds the product images, e.g. the JRE and JDK image
|
||||
# (and possibly other, more specific versions)
|
||||
product-images: jimages demos samples zip-security verify-modules
|
||||
product-images: jimages demos samples zip-security exploded-image
|
||||
|
||||
# When cross compiling and building a partial BUILDJDK for the build host,
|
||||
# the summary generation cannot be run.
|
||||
ifneq ($(CREATE_BUILDJDK), true)
|
||||
product-images: generate-summary
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
product-images: mac-bundles
|
||||
@ -548,9 +675,9 @@ test-image: prepare-test-image test-image-hotspot-jtreg-native \
|
||||
# all-images is the top-most target, it builds all our deliverables ("images").
|
||||
all-images: product-images test-image docs-image
|
||||
|
||||
ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
|
||||
ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers jmods \
|
||||
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples exploded-image \
|
||||
mac-bundles product-images docs-image test-image all-images
|
||||
create-buildjdk mac-bundles product-images docs-image test-image all-images
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -575,7 +702,7 @@ ALL_TARGETS += default jdk images docs all
|
||||
# file.
|
||||
|
||||
CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
|
||||
images make-support test-make bundles
|
||||
images make-support test-make bundles buildjdk
|
||||
CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
|
||||
CLEAN_SUPPORT_DIRS += demos
|
||||
CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
|
||||
|
@ -67,7 +67,6 @@ define Clean-gensrc
|
||||
@$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
|
@ -57,25 +57,29 @@ endif
|
||||
NO_STRIP_CMDS_FILTER += %.cgi
|
||||
|
||||
# Don't include debug info for executables.
|
||||
ifneq ($(wildcard $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)), )
|
||||
# OS X stores symbol information in a .dylib file inside a .dSYM directory -
|
||||
# that file should not be stripped, so we prune the tree at the .dSYM directory.
|
||||
ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \
|
||||
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE) \( -type f -o -type l \) \
|
||||
-print -o -name "*.dSYM" -prune))
|
||||
COPY_CMDS_SRC := $(filter $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC))
|
||||
STRIP_CMDS_SRC := $(filter-out $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC))
|
||||
endif
|
||||
|
||||
# OS X stores symbol information in a .dylib file inside a .dSYM directory -
|
||||
# that file should not be stripped, so we prune the tree at the .dSYM directory.
|
||||
ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \
|
||||
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds \( -type f -o -type l \) \
|
||||
-print -o -name "*.dSYM" -prune))
|
||||
COPY_CMDS_SRC := $(filter $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC))
|
||||
STRIP_CMDS_SRC := $(filter-out $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC))
|
||||
|
||||
# OS X stores symbol information in a .dylib file inside a .dSYM directory -
|
||||
# that file should not be stripped, so we prune the tree at the .dSYM directory.
|
||||
# Example: support/modules_libs/java.base/libjsig.dylib.dSYM/Contents/Resources/DWARF/libjsig.dylib
|
||||
STRIP_LIBS_SRC := \
|
||||
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs \
|
||||
ifneq ($(wildcard $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)), )
|
||||
# OS X stores symbol information in a .dylib file inside a .dSYM directory -
|
||||
# that file should not be stripped, so we prune the tree at the .dSYM directory.
|
||||
# Example: support/modules_libs/java.base/libjsig.dylib.dSYM/Contents/Resources/DWARF/libjsig.dylib
|
||||
STRIP_LIBS_SRC := \
|
||||
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE) \
|
||||
-name '*$(SHARED_LIBRARY_SUFFIX)' -type f -print -o -name "*.dSYM" -prune)
|
||||
# Make sure symbolic links are copied and not stripped.
|
||||
COPY_LIBS_SRC := \
|
||||
$(filter-out $(STRIP_LIBS_SRC), \
|
||||
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs -type f -o -type l))
|
||||
|
||||
# Make sure symbolic links are copied and not stripped.
|
||||
COPY_LIBS_SRC := \
|
||||
$(filter-out $(STRIP_LIBS_SRC), \
|
||||
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE) -type f -o -type l))
|
||||
endif
|
||||
|
||||
$(eval $(call SetupCopyFiles,STRIP_MODULES_CMDS, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds, \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2001, 2015, 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
|
||||
@ -99,6 +99,7 @@ CORE_PKGS = \
|
||||
java.lang.instrument \
|
||||
java.lang.invoke \
|
||||
java.lang.management \
|
||||
java.lang.module \
|
||||
java.lang.ref \
|
||||
java.lang.reflect \
|
||||
java.math \
|
||||
|
@ -75,13 +75,13 @@ define add_file_to_copy
|
||||
ifneq ($$($1_COPY_$$($2_TARGET)), 1)
|
||||
$1_COPY_$$($2_TARGET) := 1
|
||||
# Now we can setup the dependency that will trigger the copying.
|
||||
$$($1_BIN)$$($2_TARGET) : $2
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(CP) $$< $$@
|
||||
$(CHMOD) -f ug+w $$@
|
||||
|
||||
# And do not forget this target
|
||||
$1_ALL_COPY_TARGETS += $$($1_BIN)$$($2_TARGET)
|
||||
$1_ALL_COPY_TARGETS += $$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET)
|
||||
endif
|
||||
endef
|
||||
|
||||
@ -133,7 +133,7 @@ define add_file_to_clean
|
||||
$(CHMOD) -f ug+w $$@
|
||||
|
||||
# And do not forget this target
|
||||
$1_ALL_COPY_CLEAN_TARGETS += $$($1_BIN)$$($2_TARGET)
|
||||
$1_ALL_COPY_CLEAN_TARGETS += $$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET)
|
||||
endif
|
||||
endef
|
||||
|
||||
@ -154,6 +154,7 @@ endef
|
||||
# SRC:=one or more directories to search for sources. The order of the source roots
|
||||
# is significant. The first found file of a certain name has priority.
|
||||
# BIN:=store classes here
|
||||
# MODULE:=Name of module being compiled. If set, classes are put in BIN/MODULE.
|
||||
# CLASSPATH:=a list of additional entries to set as classpath to javac
|
||||
# INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
|
||||
# EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
|
||||
@ -190,6 +191,10 @@ define SetupJavaCompilationBody
|
||||
$1_SJAVAC_PORTFILE := $$($$($1_SETUP)_SJAVAC_PORTFILE)
|
||||
$1_SERVER_JVM := $$($$($1_SETUP)_SERVER_JVM)
|
||||
$1_DISABLE_SJAVAC := $$($$($1_SETUP)_DISABLE_SJAVAC)
|
||||
|
||||
ifneq ($$($1_MODULE), )
|
||||
$1_MODULE_SUBDIR := /$$($1_MODULE)
|
||||
endif
|
||||
|
||||
# Make sure the dirs exist.
|
||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory >$$d<)))
|
||||
@ -303,7 +308,7 @@ define SetupJavaCompilationBody
|
||||
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst \
|
||||
$$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
|
||||
|
||||
$1_COMPILE_TARGET := $$($1_BIN)/_the.$1_batch
|
||||
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
|
||||
|
||||
ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
|
||||
# Using sjavac to compile.
|
||||
@ -336,7 +341,8 @@ define SetupJavaCompilationBody
|
||||
$1_VARDEPS := $$($1_JVM) $$($1_SJAVAC) $$($1_SJAVAC_ARGS_STRING) $$($1_FLAGS) \
|
||||
$$($1_HEADERS_ARG) $$($1_BIN) $$($1_EXCLUDES) $$($1_INCLUDES) \
|
||||
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_BIN)/_the.$1.vardeps)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
|
||||
|
||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
|
||||
$$(call MakeDir, $$(@D) $$(dir $$($1_SJAVAC_PORTFILE)))
|
||||
@ -345,7 +351,7 @@ define SetupJavaCompilationBody
|
||||
$$(eval $$(call ListPathsSafely,$1_SJAVAC_ARGS_STRING, $$($1_SJAVAC_ARGS_FILE)))
|
||||
endif
|
||||
$$(call LogWarn, Compiling $1)
|
||||
$$(call ExecuteWithLog, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch, \
|
||||
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
||||
$$($1_JVM) $$($1_SJAVAC) \
|
||||
$$($1_REMOTE) \
|
||||
-j 1 \
|
||||
@ -353,7 +359,7 @@ define SetupJavaCompilationBody
|
||||
--permit-sources-without-package \
|
||||
--compare-found-sources $$@.tmp \
|
||||
--log=$(LOG_LEVEL) \
|
||||
--state-dir=$$($1_BIN) \
|
||||
--state-dir=$$($1_BIN)$$($1_MODULE_SUBDIR) \
|
||||
$$($1_SJAVAC_ARGS) \
|
||||
$$($1_FLAGS) \
|
||||
$$($1_HEADERS_ARG) \
|
||||
@ -362,11 +368,13 @@ define SetupJavaCompilationBody
|
||||
# Create a pubapi file that only changes when the pubapi changes. Dependent
|
||||
# compilations can use this file to only get recompiled when pubapi has changed.
|
||||
# Grep returns 1 if no matching lines are found. Do not fail for this.
|
||||
$(GREP) -e "^I" $$($1_BIN)/javac_state > $$($1_BIN)/_the.$1_pubapi.tmp \
|
||||
$(GREP) -e "^I" $$($1_BIN)$$($1_MODULE_SUBDIR)/javac_state > $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi.tmp \
|
||||
|| test "$$$$?" = "1"
|
||||
if [ ! -f $$($1_BIN)/_the.$1_pubapi ] \
|
||||
|| [ "`$(DIFF) $$($1_BIN)/_the.$1_pubapi $$($1_BIN)/_the.$1_pubapi.tmp`" != "" ]; then \
|
||||
$(MV) $$($1_BIN)/_the.$1_pubapi.tmp $$($1_BIN)/_the.$1_pubapi; \
|
||||
if [ ! -f $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi ] \
|
||||
|| [ "`$(DIFF) $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi \
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi.tmp`" != "" ]; then \
|
||||
$(MV) $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi.tmp \
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi; \
|
||||
fi
|
||||
|
||||
else
|
||||
@ -380,11 +388,12 @@ define SetupJavaCompilationBody
|
||||
$$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
|
||||
$(MKDIR) -p $$(@D)
|
||||
if [ -d "$$($1_HEADERS).$1.tmp" ]; then \
|
||||
for f in `ls $$($1_HEADERS).$1.tmp`; do \
|
||||
for f in `$(CD) $$($1_HEADERS).$1.tmp && $(FIND) . -type f`; do \
|
||||
if [ ! -f "$$($1_HEADERS)/$$$$f" ] \
|
||||
|| [ "`$(DIFF) $$($1_HEADERS)/$$$$f $$($1_HEADERS).$1.tmp/$$$$f`" != "" ]; then \
|
||||
$(CP) -f $$($1_HEADERS).$1.tmp/$$$$f $$($1_HEADERS)/$$$$f; \
|
||||
fi; \
|
||||
$(MKDIR) -p `$(DIRNAME) $$($1_HEADERS)/$$$$f`; \
|
||||
$(CP) -f $$($1_HEADERS).$1.tmp/$$$$f $$($1_HEADERS)/$$$$f; \
|
||||
fi; \
|
||||
done; \
|
||||
fi
|
||||
$(RM) -r $$($1_HEADERS).$1.tmp
|
||||
@ -396,7 +405,8 @@ define SetupJavaCompilationBody
|
||||
$1_VARDEPS := $$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) $$($1_BIN) \
|
||||
$$($1_HEADERS_ARG) $$($1_EXCLUDES) $$($1_INCLUDES) \
|
||||
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_BIN)/_the.$1.vardeps)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
|
||||
|
||||
ifeq ($$($1_DISABLE_SJAVAC)x$(ENABLE_JAVAC_SERVER), xyes)
|
||||
$1_JAVAC_CMD := $$($1_SJAVAC) $$($1_REMOTE)
|
||||
@ -409,7 +419,7 @@ define SetupJavaCompilationBody
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
|
||||
$$(call LogWarn, Compiling $$(words $$($1_SRCS)) files for $1)
|
||||
$$(call ExecuteWithLog, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch, \
|
||||
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
||||
$$($1_JVM) $$($1_JAVAC_CMD) $$($1_FLAGS) \
|
||||
-implicit:none \
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$@.tmp) && \
|
||||
@ -431,7 +441,7 @@ define SetupJavaCompilationBody
|
||||
|
||||
$$(eval $$(call SetupJarArchive, ARCHIVE_$1, \
|
||||
DEPENDENCIES:=$$($1), \
|
||||
SRCS:=$$($1_BIN), \
|
||||
SRCS:=$$($1_BIN)$$($1_MODULE_SUBDIR), \
|
||||
SUFFIXES:=$$($1_SUFFIXES), \
|
||||
EXCLUDE:=$$($1_EXCLUDES), \
|
||||
INCLUDES:=$$($1_INCLUDES), \
|
||||
|
@ -247,7 +247,7 @@ REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
|
||||
$(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) \
|
||||
2> /dev/null)))))
|
||||
|
||||
# Emit the repo:tip pairs to $@
|
||||
# Emit the repo:tip pairs to $@, but only if they changed since last time
|
||||
define GetSourceTips
|
||||
$(CD) $(SRC_ROOT) ; \
|
||||
for i in $(REPO_LIST) IGNORE ; do \
|
||||
@ -260,8 +260,13 @@ define GetSourceTips
|
||||
$(PRINTF) " %s:%s" \
|
||||
"$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
|
||||
fi; \
|
||||
done >> $@
|
||||
$(PRINTF) "\n" >> $@
|
||||
done > $@.tmp
|
||||
$(PRINTF) "\n" >> $@.tmp
|
||||
if [ ! -f $@ ] || [ "`$(CAT) $@`" != "`$(CAT) $@.tmp`" ]; then \
|
||||
$(MV) $@.tmp $@ ; \
|
||||
else \
|
||||
$(RM) $@.tmp ; \
|
||||
fi
|
||||
endef
|
||||
|
||||
# Create the HGTIP_FILENAME file. Called from closed/make/SourceBundles.gmk
|
||||
@ -644,10 +649,10 @@ endif
|
||||
|
||||
# Defines the sub directory structure to store variable value file in
|
||||
DependOnVariableDirName = \
|
||||
$(strip $(subst $(SRC_ROOT)/,,\
|
||||
$(if $(filter /%, $(firstword $(MAKEFILE_LIST))), \
|
||||
$(strip $(addsuffix $(if $(MODULE),/$(MODULE)), \
|
||||
$(subst $(SRC_ROOT)/,, $(if $(filter /%, $(firstword $(MAKEFILE_LIST))), \
|
||||
$(firstword $(MAKEFILE_LIST)), \
|
||||
$(CURDIR)/$(firstword $(MAKEFILE_LIST)))))
|
||||
$(CURDIR)/$(firstword $(MAKEFILE_LIST))))))
|
||||
|
||||
# Defines the name of the file to store variable value in. Generates a name
|
||||
# unless parameter 2 is given.
|
||||
|
@ -26,6 +26,9 @@
|
||||
ifndef _MODULES_GMK
|
||||
_MODULES_GMK := 1
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , common/Modules.gmk))
|
||||
|
||||
################################################################################
|
||||
# Some platforms don't have the serviceability agent
|
||||
ifeq ($(INCLUDE_SA), false)
|
||||
@ -35,7 +38,9 @@ endif
|
||||
################################################################################
|
||||
# Module list macros
|
||||
|
||||
ALL_TOP_SRC_DIRS := \
|
||||
# Use append so that the custom extension may add to this variable
|
||||
|
||||
ALL_TOP_SRC_DIRS += \
|
||||
$(HOTSPOT_TOPDIR)/src \
|
||||
$(JDK_TOPDIR)/src \
|
||||
$(LANGTOOLS_TOPDIR)/src \
|
||||
@ -45,37 +50,74 @@ ALL_TOP_SRC_DIRS := \
|
||||
$(NASHORN_TOPDIR)/src \
|
||||
#
|
||||
|
||||
# Find all modules with java sources by looking in the source dirs
|
||||
define FindJavaModules
|
||||
$(filter-out $(MODULES_FILTER), $(sort $(notdir \
|
||||
$(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir \
|
||||
$(wildcard $(patsubst %,%/*/share/classes/*, $(ALL_TOP_SRC_DIRS)) \
|
||||
$(patsubst %,%/*/$(OPENJDK_TARGET_OS)/classes/*, $(ALL_TOP_SRC_DIRS)) \
|
||||
$(patsubst %,%/*/$(OPENJDK_TARGET_OS_TYPE)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))))
|
||||
endef
|
||||
# Find all module-info.java files for the current build target platform and
|
||||
# configuration.
|
||||
# Param 1 - Module to find for, set to * for finding all
|
||||
FindAllModuleInfos = \
|
||||
$(wildcard \
|
||||
$(patsubst %,%/$(strip $1)/$(OPENJDK_TARGET_OS)/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \
|
||||
$(patsubst %,%/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \
|
||||
$(patsubst %,%/$(strip $1)/share/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \
|
||||
$(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC)))
|
||||
|
||||
# Find all modules with source for the target platform.
|
||||
define FindAllModules
|
||||
$(sort $(filter-out $(MODULES_FILTER) closed demo sample, \
|
||||
$(notdir $(patsubst %/,%, $(dir \
|
||||
$(wildcard $(patsubst %, %/*/share, $(ALL_TOP_SRC_DIRS)) \
|
||||
$(patsubst %, %/*/$(OPENJDK_TARGET_OS), $(ALL_TOP_SRC_DIRS)) \
|
||||
$(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS))))))))
|
||||
endef
|
||||
# Extract the module names from the paths of module-info.java files. The
|
||||
# position of the module directory differs depending on if this is an imported
|
||||
# src dir or not.
|
||||
GetModuleNameFromModuleInfo = \
|
||||
$(strip $(foreach mi, $1, \
|
||||
$(if $(filter $(addsuffix %, $(IMPORT_MODULES_SRC)), $(mi)), \
|
||||
$(notdir $(patsubst %/,%, $(dir $(mi)))), \
|
||||
$(notdir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(mi)))))))))))
|
||||
|
||||
# Find all modules by looking for module-info.java files and looking at parent
|
||||
# directories.
|
||||
FindAllModules = \
|
||||
$(sort $(filter-out $(MODULES_FILTER), \
|
||||
$(call GetModuleNameFromModuleInfo, $(MODULE_INFOS))))
|
||||
|
||||
FindImportedModules = \
|
||||
$(if $(IMPORT_MODULES_CLASSES), $(notdir $(wildcard $(IMPORT_MODULES_CLASSES)/*)))
|
||||
|
||||
################################################################################
|
||||
# The module deps makefile is generated in make/GenerateModuleDeps.gmk
|
||||
# Extract module dependencies from module-info.java files.
|
||||
|
||||
MODULE_DEPS_MAKEFILE := $(MAKESUPPORT_OUTPUTDIR)/module-deps.gmk
|
||||
|
||||
MODULE_INFOS := $(call FindAllModuleInfos, *)
|
||||
|
||||
$(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
|
||||
$(call DependOnVariable, MODULE_INFOS, $(MAKESUPPORT_OUTPUTDIR)/MODULE_INFOS.vardeps)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(foreach m, $(MODULE_INFOS), \
|
||||
( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \
|
||||
$(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\
|
||||
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
|
||||
/requires/ { sub(/;/, ""); \
|
||||
sub(/requires/, ""); \
|
||||
sub(/public/, ""); \
|
||||
sub(/\/\/.*/, ""); \
|
||||
sub(/\/\*.*\*\//, ""); \
|
||||
gsub(/ /, ""); \
|
||||
printf(" %s", $$0) } \
|
||||
END { printf("\n") }' $m \
|
||||
) >> $@ $(NEWLINE))
|
||||
|
||||
-include $(MODULE_DEPS_MAKEFILE)
|
||||
|
||||
# Param 1: Module to find deps for
|
||||
define FindDepsForModule
|
||||
FindDepsForModule = \
|
||||
$(DEPS_$(strip $1))
|
||||
endef
|
||||
|
||||
# Finds transitive dependencies in 3 levels.
|
||||
# Param 1: Module to find transitive deps for
|
||||
FindTransitiveDepsForModule = \
|
||||
$(sort $(call FindDepsForModule, $1) \
|
||||
$(foreach m, $(call FindDepsForModule, $1), \
|
||||
$(call FindDepsForModule, $m) \
|
||||
$(foreach n, $(call FindDepsForModule, $m), \
|
||||
$(call FindDepsForModule, $n))))
|
||||
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , common/Modules.gmk))
|
||||
|
||||
endif # _MODULES_GMK
|
||||
|
@ -74,6 +74,7 @@ endef
|
||||
# AS - Assembler
|
||||
# MT - Windows MT tool
|
||||
# RC - Windows RC tool
|
||||
# OBJCOPY - The objcopy tool for debug symbol handling
|
||||
# STRIP - The tool to use for stripping debug symbols
|
||||
# SYSROOT_CFLAGS - Compiler flags for using the specific sysroot
|
||||
# SYSROOT_LDFLAGS - Linker flags for using the specific sysroot
|
||||
@ -90,6 +91,7 @@ define DefineNativeToolchainBody
|
||||
$$(call SetIfEmpty, $1_AS, $$($$($1_EXTENDS)_AS))
|
||||
$$(call SetIfEmpty, $1_MT, $$($$($1_EXTENDS)_MT))
|
||||
$$(call SetIfEmpty, $1_RC, $$($$($1_EXTENDS)_RC))
|
||||
$$(call SetIfEmpty, $1_OBJCOPY, $$($$($1_EXTENDS)_OBJCOPY))
|
||||
$$(call SetIfEmpty, $1_STRIP, $$($$($1_EXTENDS)_STRIP))
|
||||
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_EXTENDS)_SYSROOT_CFLAGS))
|
||||
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_EXTENDS)_SYSROOT_LDFLAGS))
|
||||
@ -105,6 +107,7 @@ $(eval $(call DefineNativeToolchain, TOOLCHAIN_DEFAULT, \
|
||||
AS := $(AS), \
|
||||
MT := $(MT), \
|
||||
RC := $(RC), \
|
||||
OBJCOPY := $(OBJCOPY), \
|
||||
STRIP := $(STRIP), \
|
||||
SYSROOT_CFLAGS := $(SYSROOT_CFLAGS), \
|
||||
SYSROOT_LDFLAGS := $(SYSROOT_LDFLAGS), \
|
||||
@ -118,13 +121,14 @@ $(eval $(call DefineNativeToolchain, TOOLCHAIN_LINK_CXX, \
|
||||
|
||||
# Create a toolchain with the BUILD compiler, used for build tools that
|
||||
# are to be run during the build.
|
||||
# The BUILD_SYSROOT_*FLAGS variables are empty for now.
|
||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_BUILD, \
|
||||
CC := $(BUILD_CC), \
|
||||
CXX := $(BUILD_CXX), \
|
||||
LD := $(BUILD_LD), \
|
||||
AR := $(BUILD_AR), \
|
||||
AS := $(BUILD_AS), \
|
||||
OBJCOPY := $(BUILD_OBJCOPY), \
|
||||
STRIP := $(BUILD_STRIP), \
|
||||
SYSROOT_CFLAGS := $(BUILD_SYSROOT_CFLAGS), \
|
||||
SYSROOT_LDFLAGS := $(BUILD_SYSROOT_LDFLAGS), \
|
||||
))
|
||||
@ -437,6 +441,7 @@ define SetupNativeCompilationBody
|
||||
$$(call SetIfEmpty, $1_AS, $$($$($1_TOOLCHAIN)_AS))
|
||||
$$(call SetIfEmpty, $1_MT, $$($$($1_TOOLCHAIN)_MT))
|
||||
$$(call SetIfEmpty, $1_RC, $$($$($1_TOOLCHAIN)_RC))
|
||||
$$(call SetIfEmpty, $1_OBJCOPY, $$($$($1_TOOLCHAIN)_OBJCOPY))
|
||||
$$(call SetIfEmpty, $1_STRIP, $$($$($1_TOOLCHAIN)_STRIP))
|
||||
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_CFLAGS))
|
||||
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_LDFLAGS))
|
||||
@ -720,9 +725,9 @@ define SetupNativeCompilationBody
|
||||
# Setup the command line creating debuginfo files, to be run after linking.
|
||||
# It cannot be run separately since it updates the original target file
|
||||
$1_CREATE_DEBUGINFO_CMDS := \
|
||||
$(OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
|
||||
$(CD) $$($1_OUTPUT_DIR) && \
|
||||
$(OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)
|
||||
$$($1_OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
|
||||
$(CD) $$($1_OUTPUT_DIR) && \
|
||||
$$($1_OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
$1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_BASENAME).dSYM
|
||||
|
@ -38,7 +38,8 @@ JAVAC_WARNINGS := -Xlint:all -Werror
|
||||
# and the interim javac, to be run by the boot jdk.
|
||||
$(eval $(call SetupJavaCompiler,BOOT_JAVAC, \
|
||||
JAVAC := $(JAVAC), \
|
||||
FLAGS := -XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror, \
|
||||
FLAGS := $(BOOT_JDK_SOURCETARGET) -XDignore.symbol.file=true -g \
|
||||
-Xlint:all$(COMMA)-deprecation$(COMMA)-options -Werror, \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
@ -80,9 +81,6 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
JDK_BOOTCLASSPATH := $(call PathList, \
|
||||
$(filter-out $(JDK_OUTPUTDIR)/modules/_%, $(wildcard $(JDK_OUTPUTDIR)/modules/*)))
|
||||
|
||||
# After the jdk is built, we want to build demos using only the recently
|
||||
# generated jdk classes and nothing else, no jdk source, etc etc.
|
||||
# I.e. the rt.jar, but since rt.jar has not yet been generated
|
||||
@ -90,7 +88,7 @@ JDK_BOOTCLASSPATH := $(call PathList, \
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
|
||||
JVM := $(JAVA_SMALL), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := -bootclasspath $(JDK_BOOTCLASSPATH) $(DISABLE_WARNINGS), \
|
||||
FLAGS := -upgrademodulepath $(JDK_OUTPUTDIR)/modules -system none $(DISABLE_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
|
2139
modules.xml
2139
modules.xml
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2016, 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
|
||||
@ -32,7 +32,6 @@ import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
import java.security.BasicPermission;
|
||||
import java.util.Objects;
|
||||
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||
|
||||
import sun.hotspot.parser.DiagnosticCommand;
|
||||
|
||||
@ -211,8 +210,6 @@ public class WhiteBox {
|
||||
public native int deoptimizeFrames(boolean makeNotEntrant);
|
||||
public native void deoptimizeAll();
|
||||
|
||||
@HotSpotIntrinsicCandidate
|
||||
public void deoptimize() {}
|
||||
public boolean isMethodCompiled(Executable method) {
|
||||
return isMethodCompiled(method, false /*not osr*/);
|
||||
}
|
||||
@ -422,6 +419,19 @@ public class WhiteBox {
|
||||
.findAny()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
// Jigsaw
|
||||
public native void DefineModule(Object module, String version, String location,
|
||||
Object[] packages);
|
||||
public native void AddModuleExports(Object from_module, String pkg, Object to_module);
|
||||
public native void AddReadsModule(Object from_module, Object source_module);
|
||||
public native boolean CanReadModule(Object asking_module, Object source_module);
|
||||
public native boolean IsExportedToModule(Object from_module, String pkg, Object to_module);
|
||||
public native void AddModulePackage(Object module, String pkg);
|
||||
public native void AddModuleExportsToAllUnnamed(Object module, String pkg);
|
||||
public native void AddModuleExportsToAll(Object module, String pkg);
|
||||
public native Object GetModuleByPackageName(Object ldr, String pkg);
|
||||
|
||||
public native int getOffsetForName0(String name);
|
||||
public int getOffsetForName(String name) throws Exception {
|
||||
int offset = getOffsetForName0(name);
|
||||
@ -452,7 +462,7 @@ public class WhiteBox {
|
||||
public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);
|
||||
|
||||
// Sharing
|
||||
public native boolean isSharedClass(Class<?> c);
|
||||
public native boolean isShared(Object o);
|
||||
public native boolean isSharedClass(Class<?> c);
|
||||
public native boolean areSharedStringsIgnored();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user