This commit is contained in:
J. Duke 2017-07-05 22:23:25 +02:00
commit c97a86e153
15 changed files with 1044 additions and 1666 deletions

View File

@ -384,3 +384,4 @@ d7f519b004254b19e384131d9f0d0e40e31a0fd3 jdk-9+137
7dcf453eacae79ee86a6bcc75fd0b546fc99b48a jdk-9+139 7dcf453eacae79ee86a6bcc75fd0b546fc99b48a jdk-9+139
a5815c6098a241d3a1df64d22b84b3524e4a77df jdk-9+140 a5815c6098a241d3a1df64d22b84b3524e4a77df jdk-9+140
f64afae7f1a5608e438585bbf0bc23785e69cba0 jdk-9+141 f64afae7f1a5608e438585bbf0bc23785e69cba0 jdk-9+141
2b3e5caafe3594ea507c37675c4d3086f415dc64 jdk-9+142

View File

@ -759,6 +759,10 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
# on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
$2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing" $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
;; ;;
s390 )
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
$2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
;;
* ) * )
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer" $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
$2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing" $2CFLAGS_JDK="${$2CFLAGS_JDK} -fno-strict-aliasing"
@ -940,6 +944,10 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI. # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
$2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=power7 -mtune=power8" $2JVM_CFLAGS="[$]$2JVM_CFLAGS -mcpu=power7 -mtune=power8"
fi fi
elif test "x$OPENJDK_$1_CPU" = xs390x; then
if test "x$OPENJDK_$1_OS" = xlinux; then
$2JVM_CFLAGS="[$]$2JVM_CFLAGS -mbackchain -march=z10"
fi
fi fi
if test "x$OPENJDK_$1_CPU_ENDIAN" = xlittle; then if test "x$OPENJDK_$1_CPU_ENDIAN" = xlittle; then
@ -999,6 +1007,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
# Setup some hard coded includes # Setup some hard coded includes
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \ $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-I${JDK_TOPDIR}/src/java.base/share/native/include \ -I${JDK_TOPDIR}/src/java.base/share/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_$1_OS/native/include \ -I${JDK_TOPDIR}/src/java.base/$OPENJDK_$1_OS/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/include \ -I${JDK_TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/include \

View File

@ -5093,7 +5093,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1477108079 DATE_WHEN_GENERATED=1478079760
############################################################################### ###############################################################################
# #
@ -49840,6 +49840,10 @@ $as_echo "$supports" >&6; }
# on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
;; ;;
s390 )
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
;;
* ) * )
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer" COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
@ -50122,6 +50126,10 @@ $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLA
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI. # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8" JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
fi fi
elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
if test "x$OPENJDK_TARGET_OS" = xlinux; then
JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
fi
fi fi
if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
@ -50270,6 +50278,7 @@ $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLA
# Setup some hard coded includes # Setup some hard coded includes
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-I${JDK_TOPDIR}/src/java.base/share/native/include \ -I${JDK_TOPDIR}/src/java.base/share/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \ -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \ -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
@ -50655,6 +50664,10 @@ $as_echo "$supports" >&6; }
# on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing" OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
;; ;;
s390 )
OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
;;
* ) * )
OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer" OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing" OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
@ -50937,6 +50950,10 @@ $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLA
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI. # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8" OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
fi fi
elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
if test "x$OPENJDK_BUILD_OS" = xlinux; then
OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
fi
fi fi
if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
@ -51085,6 +51102,7 @@ $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLA
# Setup some hard coded includes # Setup some hard coded includes
OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \ OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-I${JDK_TOPDIR}/src/java.base/share/native/include \ -I${JDK_TOPDIR}/src/java.base/share/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \ -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \ -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \

View File

@ -265,6 +265,10 @@ IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
BUNDLES_OUTPUTDIR=$(BUILD_OUTPUT)/bundles BUNDLES_OUTPUTDIR=$(BUILD_OUTPUT)/bundles
TESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make TESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make
MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support
# By default, output javadoc directly into image
JAVADOC_OUTPUTDIR = $(DOCS_IMAGE_DIR)
# This does not get overridden in a bootcycle build # This does not get overridden in a bootcycle build
CONFIGURESUPPORT_OUTPUTDIR:=@CONFIGURESUPPORT_OUTPUTDIR@ CONFIGURESUPPORT_OUTPUTDIR:=@CONFIGURESUPPORT_OUTPUTDIR@
BUILDJDK_OUTPUTDIR=$(BUILD_OUTPUT)/buildjdk BUILDJDK_OUTPUTDIR=$(BUILD_OUTPUT)/buildjdk
@ -788,7 +792,7 @@ INTERIM_IMAGE_DIR := $(SUPPORT_OUTPUTDIR)/interim-image
# Docs image # Docs image
DOCS_IMAGE_SUBDIR := docs DOCS_IMAGE_SUBDIR := docs
DOCS_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(DOCS_IMAGE_SUBDIR) DOCS_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_IMAGE_SUBDIR)
# Macosx bundles directory definitions # Macosx bundles directory definitions
JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle

View File

@ -348,7 +348,7 @@ jdk.accessibility_ADD_JAVAC_FLAGS := -Xlint:-exports
################################################################################ ################################################################################
jdk.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:-com.sun.tools.*' \ jdk.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*' \
-XDstringConcat=inline -XDstringConcat=inline
jdk.compiler_CLEAN_FILES := $(wildcard \ jdk.compiler_CLEAN_FILES := $(wildcard \
$(patsubst %, $(JDK_TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \ $(patsubst %, $(JDK_TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
@ -436,10 +436,6 @@ jdk.jdi_EXCLUDE_FILES += jdi-overview.html
################################################################################ ################################################################################
jdk.jsobject_ADD_JAVAC_FLAGS := -Xlint:-exports
################################################################################
jdk.dev_CLEAN_FILES := $(wildcard \ jdk.dev_CLEAN_FILES := $(wildcard \
$(patsubst %, $(JDK_TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \ $(patsubst %, $(JDK_TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \
com/sun/tools/script/shell)) com/sun/tools/script/shell))
@ -476,6 +472,13 @@ jdk.localedata_COPY := _dict _th
# data files and shouldn't go in the product # data files and shouldn't go in the product
jdk.localedata_EXCLUDE_FILES += sun/text/resources/ext/BreakIteratorRules_th.java jdk.localedata_EXCLUDE_FILES += sun/text/resources/ext/BreakIteratorRules_th.java
################################################################################
# If this is an imported module that has prebuilt classes, only compile
# module-info.java.
ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
$(MODULE)_INCLUDE_FILES := module-info.java
endif
################################################################################ ################################################################################
# Setup the compilation for the module # Setup the compilation for the module
# #

View File

@ -39,6 +39,7 @@ ALL_MODULEINFO_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*/module_info.clas
$(PACKAGES_ATTRIBUTE_TARGET): $(ALL_MODULEINFO_CLASSES) $(BUILD_JIGSAW_CLASSES) $(PACKAGES_ATTRIBUTE_TARGET): $(ALL_MODULEINFO_CLASSES) $(BUILD_JIGSAW_CLASSES)
$(call LogInfo, Optimizing the exploded image) $(call LogInfo, Optimizing the exploded image)
$(TOOL_ADD_PACKAGES_ATTRIBUTE) $(JDK_OUTPUTDIR) $(TOOL_ADD_PACKAGES_ATTRIBUTE) $(JDK_OUTPUTDIR)
$(TOUCH) $@
TARGETS := $(PACKAGES_ATTRIBUTE_TARGET) TARGETS := $(PACKAGES_ATTRIBUTE_TARGET)

File diff suppressed because it is too large Load Diff

View File

@ -341,15 +341,15 @@ ALL_TARGETS += source-tips create-hgtip-files bootcycle-images zip-security \
# Docs targets # Docs targets
docs-javadoc: docs-javadoc:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs) +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-javadoc)
docs-jvmtidoc: docs-copy:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk jvmtidocs) +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-copy)
zip-docs: docs-zip:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk zip-docs) +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-zip)
ALL_TARGETS += docs-javadoc docs-jvmtidoc zip-docs ALL_TARGETS += docs-javadoc docs-copy docs-zip
################################################################################ ################################################################################
# Cross compilation support # Cross compilation support
@ -683,9 +683,10 @@ else
docs-javadoc: $(GENSRC_TARGETS) rmic docs-javadoc: $(GENSRC_TARGETS) rmic
docs-jvmtidoc: hotspot # The gensrc step for jdk.jdi creates an html file that is used by docs-copy.
docs-copy: hotspot jdk.jdi-gensrc
zip-docs: docs-javadoc docs-jvmtidoc docs-zip: docs-javadoc docs-copy
test: jdk-image test-image test: jdk-image test-image
@ -812,7 +813,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
endif endif
# This target builds the documentation image # This target builds the documentation image
docs-image: docs-javadoc docs-jvmtidoc docs-image: docs-javadoc docs-copy
# This target builds the test image # This target builds the test image
test-image: prepare-test-image test-image-hotspot-jtreg-native \ test-image: prepare-test-image test-image-hotspot-jtreg-native \
@ -860,7 +861,7 @@ CLEAN_SUPPORT_DIRS += demos
CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS)) CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS)) CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
CLEAN_PHASES := gensrc java native include docs CLEAN_PHASES := gensrc java native include
CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES)) CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES)) CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
# Construct targets of the form clean-$module-$phase # Construct targets of the form clean-$module-$phase
@ -872,6 +873,9 @@ clean: $(CLEAN_DIR_TARGETS)
($(CD) $(OUTPUT_ROOT) && $(RM) -r build*.log*) ($(CD) $(OUTPUT_ROOT) && $(RM) -r build*.log*)
$(ECHO) Cleaned all build artifacts. $(ECHO) Cleaned all build artifacts.
clean-docs:
$(call CleanDocs)
$(CLEAN_DIR_TARGETS): $(CLEAN_DIR_TARGETS):
$(call CleanDir,$(patsubst clean-%, %, $@)) $(call CleanDir,$(patsubst clean-%, %, $@))
@ -911,7 +915,7 @@ dist-clean: clean
) )
$(ECHO) Cleaned everything, you will have to re-run configure. $(ECHO) Cleaned everything, you will have to re-run configure.
ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \ ALL_TARGETS += clean clean-docs dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \
$(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \ $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \
$(CLEAN_MODULE_PHASE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS)

View File

@ -41,6 +41,15 @@ define RunTests
JOBS=$(JOBS) $1) || true JOBS=$(JOBS) $1) || true
endef endef
define CleanDocs
@$(PRINTF) "Cleaning docs ..."
@$(PRINTF) "\n" $(LOG_DEBUG)
$(RM) -r $(SUPPORT_OUTPUTDIR)/docs
$(RM) -r $(SUPPORT_OUTPUTDIR)/javadoc
$(RM) -r $(IMAGES_OUTPUTDIR)/docs
@$(PRINTF) " done\n"
endef
# Cleans the dir given as $1 # Cleans the dir given as $1
define CleanDir define CleanDir
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..." @$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
@ -99,15 +108,6 @@ define Clean-include
@$(PRINTF) " done\n" @$(PRINTF) " done\n"
endef endef
define Clean-docs
@$(PRINTF) "Cleaning docs ..."
@$(PRINTF) "\n" $(LOG_DEBUG)
$(RM) -r $(SUPPORT_OUTPUTDIR)/docs
$(RM) -r $(IMAGES_OUTPUTDIR)/docs
$(RM) $(OUTPUT_ROOT)/bundles/jdk-*-docs.zip
@$(PRINTF) " done\n"
endef
define CleanModule define CleanModule
$(call Clean-gensrc, $1) $(call Clean-gensrc, $1)
$(call Clean-java, $1) $(call Clean-java, $1)

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -28,61 +28,68 @@ default: all
include $(SPEC) include $(SPEC)
include MakeBase.gmk include MakeBase.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
include Modules.gmk
SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
# Hook to include the corresponding custom file, if present. # Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, , ZipSource.gmk)) $(eval $(call IncludeCustomExtension, , ZipSource.gmk))
################################################################################ ################################################################################
# Create the directory structure for src.zip using symlinks.
# <module>/<package>/<file>.java
# Use ?= to enable override in custom makefile # Find extra source dirs for a module that are not part of normal compilation
SRC_ZIP_INCLUDES ?= \ # but should be included in src.zip.
com \ # $1: Module to find dirs for
java \ ExtraSrcDirs = \
javax \ $(wildcard $(SUPPORT_OUTPUTDIR)/rmic/$(strip $1))
jdk \
org \
sun \
#
SRC_ZIP_EXCLUDES ?= ALL_MODULES := $(FindAllModules)
SRC_ZIP_SRCS += $(wildcard \ # Generate the src dirs in the first make invocation and then call this makefile
$(JDK_TOPDIR)/src/*/share/classes \ # again to create src.zip.
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \ $(foreach m, $(ALL_MODULES), \
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_API_DIR)/classes \ $(foreach d, $(call FindModuleSrcDirs, $m) $(call ExtraSrcDirs, $m), \
$(LANGTOOLS_TOPDIR)/src/*/share/classes \ $(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$d)/$m) \
$(CORBA_TOPDIR)/src/*/share/classes \ $(if $(SRC_GENERATED), , \
$(JAXP_TOPDIR)/src/*/share/classes \ $(eval $$($d_TARGET): $d ; \
$(JAXWS_TOPDIR)/src/*/share/classes \ $$(if $(filter $(TOPDIR)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \
$(SUPPORT_OUTPUTDIR)/gensrc/j* \ ) \
$(SUPPORT_OUTPUTDIR)/rmic/j* \
) \ ) \
# $(eval SRC_ZIP_SRCS += $$($d_TARGET)) \
$(eval SRC_ZIP_SRCS_$m += $$($d_TARGET)) \
) \
)
# Need to copy launcher src files into desired directory structure TARGETS += $(SRC_ZIP_SRCS)
# before zipping the sources.
$(eval $(call SetupCopyFiles,COPY_LAUNCHER_SRC, \
SRC := $(JDK_TOPDIR)/src/java.base, \
DEST := $(SUPPORT_OUTPUTDIR)/src/launcher, \
FLATTEN := true, \
FILES := $(wildcard \
$(JDK_TOPDIR)/src/java.base/share/native/launcher/* \
$(JDK_TOPDIR)/src/java.base/share/native/libjli/* \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli/java_md*)))
# This dir needs to exist before macro is evaluated to avoid warning from find. ################################################################################
$(call MakeDir, $(SUPPORT_OUTPUTDIR)/src) # Only evaluate the creation of src.zip in a sub make call when the symlinked
$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \ # src directory structure has been generated.
SRC := $(SRC_ZIP_SRCS) $(SUPPORT_OUTPUTDIR)/src, \ ifeq ($(SRC_GENERATED), true)
INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \ $(eval $(call SetupZipArchive, BUILD_SRC_ZIP, \
EXCLUDES := $(SRC_ZIP_EXCLUDES), \ SRC := $(dir $(SRC_ZIP_SRCS)), \
EXCLUDE_FILES := $(SRC_ZIP_EXCLUDE_FILES), \ INCLUDES := $(SRC_ZIP_INCLUDES), \
SUFFIXES := .java .c .h, \ INCLUDE_FILES := $(SRC_ZIP_INCLUDE_FILES), \
ZIP := $(SUPPORT_OUTPUTDIR)/src.zip, \ EXCLUDES := $(SRC_ZIP_EXCLUDES), \
EXTRA_DEPS := $(COPY_LAUNCHER_SRC))) EXCLUDE_FILES := $(SRC_ZIP_EXCLUDE_FILES), \
SUFFIXES := .java, \
ZIP := $(SUPPORT_OUTPUTDIR)/src.zip, \
))
do-zip: $(BUILD_SRC_ZIP)
.PHONY: do-zip
endif
zip: $(SRC_ZIP_SRCS)
+$(MAKE) $(MAKE_ARGS) -f ZipSource.gmk do-zip SRC_GENERATED=true
TARGETS += zip
################################################################################ ################################################################################
all: $(BUILD_SRC_ZIP) all: $(TARGETS)
.PHONY: default all .PHONY: default all zip

View File

@ -575,25 +575,21 @@ RelativePath = \
$($(strip $1)_dotdots)/$($(strip $1)_suffix) $($(strip $1)_dotdots)/$($(strip $1)_suffix)
################################################################################ ################################################################################
# link-file-* works similarly to install file but creates a symlink instead on # link-file-* works similarly to install-file but creates a symlink instead.
# platforms that support it. There are two versions, either creating a relative # There are two versions, either creating a relative or an absolute link. Be
# or an absolute link. # careful when using this on Windows since the symlink created is only valid in
ifeq ($(OPENJDK_BUILD_OS), windows) # the unix emulation environment.
link-file-absolute = $(install-file) define link-file-relative
link-file-relative = $(install-file)
else
define link-file-relative
$(call MakeDir, $(@D)) $(call MakeDir, $(@D))
$(RM) $@ $(RM) $@
$(LN) -s $(call RelativePath, $<, $(@D)) $@ $(LN) -s $(call RelativePath, $<, $(@D)) $@
endef endef
define link-file-absolute define link-file-absolute
$(call MakeDir, $(@D)) $(call MakeDir, $(@D))
$(RM) $@ $(RM) $@
$(LN) -s $< $@ $(LN) -s $< $@
endef endef
endif
################################################################################ ################################################################################
# Filter out duplicate sub strings while preserving order. Keeps the first occurance. # Filter out duplicate sub strings while preserving order. Keeps the first occurance.

View File

@ -108,6 +108,7 @@ PLATFORM_MODULES += \
jdk.charsets \ jdk.charsets \
jdk.crypto.ec \ jdk.crypto.ec \
jdk.crypto.pkcs11 \ jdk.crypto.pkcs11 \
jdk.desktop \
jdk.dynalink \ jdk.dynalink \
jdk.jsobject \ jdk.jsobject \
jdk.localedata \ jdk.localedata \
@ -177,6 +178,16 @@ FindAllModuleInfos = \
$(patsubst %,%/$(strip $1)/$(sub)/module-info.java, $(TOP_SRC_DIRS))) \ $(patsubst %,%/$(strip $1)/$(sub)/module-info.java, $(TOP_SRC_DIRS))) \
$(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC))) $(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC)))
# Find module-info.java files in the specific source dir
# Param 1 - Src dir to find module-info.java files in
FindModuleInfosForSrcDir = \
$(wildcard \
$(foreach sub, $(SRC_SUBDIRS), \
$(patsubst %,%/*/$(sub)/module-info.java, $(strip $1)) \
) \
$(patsubst %,%/*/module-info.java, $(strip $1)) \
)
# Extract the module names from the paths of module-info.java files. The # 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 # position of the module directory differs depending on if this is an imported
# src dir or not. # src dir or not.
@ -192,6 +203,13 @@ FindAllModules = \
$(sort $(filter-out $(MODULES_FILTER), \ $(sort $(filter-out $(MODULES_FILTER), \
$(call GetModuleNameFromModuleInfo, $(MODULE_INFOS)))) $(call GetModuleNameFromModuleInfo, $(MODULE_INFOS))))
# Find all modules in a specific src dir
# Param 1 - Src dir to find modules in
FindModulesForSrcDir = \
$(sort $(filter-out $(MODULES_FILTER), \
$(call GetModuleNameFromModuleInfo, $(call FindModuleInfosForSrcDir, $1)) \
))
FindImportedModules = \ FindImportedModules = \
$(filter-out $(MODULES_FILTER), \ $(filter-out $(MODULES_FILTER), \
$(if $(IMPORT_MODULES_CLASSES), $(notdir $(wildcard $(IMPORT_MODULES_CLASSES)/*)))) $(if $(IMPORT_MODULES_CLASSES), $(notdir $(wildcard $(IMPORT_MODULES_CLASSES)/*))))

View File

@ -746,9 +746,10 @@ define SetupNativeCompilationBody
# This is a rough heuristic and may not always print accurate information. # This is a rough heuristic and may not always print accurate information.
$$($1_BUILD_INFO): $$($1_SRCS) $$($1_COMPILE_VARDEPS_FILE) $$($1_BUILD_INFO): $$($1_SRCS) $$($1_COMPILE_VARDEPS_FILE)
ifeq ($$(wildcard $$($1_TARGET)),) ifeq ($$(wildcard $$($1_TARGET)),)
$(ECHO) 'Creating $$($1_BASENAME) from $$(words $$(filter-out %.vardeps, $$?)) file(s)' $(ECHO) 'Creating $$(subst $$(BUILD_OUTPUT)/,,$$($1_TARGET)) from $$(words \
$$(filter-out %.vardeps, $$?)) file(s)'
else else
$(ECHO) $$(strip 'Updating $$($1_BASENAME)' \ $(ECHO) $$(strip 'Updating $$(subst $$(BUILD_OUTPUT)/,,$$($1_TARGET))' \
$$(if $$(filter-out %.vardeps, $$?), \ $$(if $$(filter-out %.vardeps, $$?), \
'due to $$(words $$(filter-out %.vardeps, $$?)) file(s)', \ 'due to $$(words $$(filter-out %.vardeps, $$?)) file(s)', \
$$(if $$(filter %.vardeps, $$?), 'due to makefile changes'))) $$(if $$(filter %.vardeps, $$?), 'due to makefile changes')))

View File

@ -73,6 +73,11 @@ define SetupZipArchiveBody
else else
$1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES))) $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
endif endif
else
ifneq ($$($1_SUFFIXES),)
$1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \
$$(addprefix -i$(SPACE)$(DQUOTE),*$$s$(DQUOTE)))
endif
endif endif
ifneq ($$($1_INCLUDE_FILES),) ifneq ($$($1_INCLUDE_FILES),)
$1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES)) $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))

View File

@ -74,13 +74,14 @@ jdk_% core_%s svc_%:
jaxp_%: jaxp_%:
@$(NO_STOPPING)$(call SUBDIR_TEST, $(JAXP_DIR), CONCURRENCY=$(JDK_TEST_JOBS) TEST="$@" $@) @$(NO_STOPPING)$(call SUBDIR_TEST, $(JAXP_DIR), CONCURRENCY=$(JDK_TEST_JOBS) TEST="$@" $@)
ifeq ($(TEST_JOBS), 0) SUB_MAKE_ARGS :=
HOTSPOT_TEST_JOBS=1 ifneq ($(TEST_JOBS), 0)
else ifneq ($(TEST_JOBS), )
HOTSPOT_TEST_JOBS=$(TEST_JOBS) SUB_MAKE_ARGS += CONCURRENCY=$(TEST_JOBS)
endif
endif endif
hotspot_%: hotspot_%:
@$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), CONCURRENCY=$(HOTSPOT_TEST_JOBS) TEST="$@" $@) @$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), $(SUB_MAKE_ARGS) TEST="$@" $@)
# #
# jtreg_tests # jtreg_tests