提交 fe4cf769 编写于 作者: K katleman

Merge

...@@ -549,7 +549,10 @@ else ...@@ -549,7 +549,10 @@ else
_WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe _WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe
WSCRIPT :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2)) WSCRIPT :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2))
endif endif
# If CONFIGURE_BUILD is defined, checks were already done by configure.
ifndef CONFIGURE_BUILD
WSCRIPT:=$(call AltCheckSpaces,WSCRIPT) WSCRIPT:=$(call AltCheckSpaces,WSCRIPT)
endif #! CONFIGURE_BUILD
# batch mode no modal dialogs on errors, please. # batch mode no modal dialogs on errors, please.
WSCRIPT += -B WSCRIPT += -B
...@@ -562,7 +565,10 @@ else ...@@ -562,7 +565,10 @@ else
_CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe _CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe
CSCRIPT :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2)) CSCRIPT :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2))
endif endif
# If CONFIGURE_BUILD is defined, checks were already done by configure.
ifndef CONFIGURE_BUILD
CSCRIPT:=$(call AltCheckSpaces,CSCRIPT) CSCRIPT:=$(call AltCheckSpaces,CSCRIPT)
endif #! CONFIGURE_BUILD
# CABARC: path to cabarc.exe (used in creating install bundles) # CABARC: path to cabarc.exe (used in creating install bundles)
ifdef ALT_CABARC ifdef ALT_CABARC
...@@ -584,7 +590,10 @@ else ...@@ -584,7 +590,10 @@ else
_MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe _MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe
MSICERT :=$(call FileExists,$(_MSICERT1),$(_MSICERT2)) MSICERT :=$(call FileExists,$(_MSICERT1),$(_MSICERT2))
endif endif
# If CONFIGURE_BUILD is defined, checks were already done by configure.
ifndef CONFIGURE_BUILD
MSICERT:=$(call AltCheckSpaces,MSICERT) MSICERT:=$(call AltCheckSpaces,MSICERT)
endif #! CONFIGURE_BUILD
# Import JDK images allow for partial builds, components not built are # Import JDK images allow for partial builds, components not built are
# imported (or copied from) these import areas when needed. # imported (or copied from) these import areas when needed.
......
...@@ -124,10 +124,10 @@ $(BEANSRCDIR)/text/%BeanInfo.java: $(FAKESRC)/$(SWINGPKG)/text/%.java ...@@ -124,10 +124,10 @@ $(BEANSRCDIR)/text/%BeanInfo.java: $(FAKESRC)/$(SWINGPKG)/text/%.java
$(BEANSRCDIR)/%BeanInfo.java: $(FAKESRC)/$(SWINGPKG)/%.java $(BEANSRCDIR)/%BeanInfo.java: $(FAKESRC)/$(SWINGPKG)/%.java
@$(ECHO) $< >> $(TEMPDIR)/.beans.list @$(ECHO) $< >> $(TEMPDIR)/.beans.list
$(BEANSRCDIR)/SwingBeanInfoBase.java: $(DOCLETSRC)/beaninfo/SwingBeanInfoBase.java $(BEANSRCDIR)/SwingBeanInfoBase.java: $(DOCLETSRC)/javax/swing/SwingBeanInfoBase.java
$(CP) $< $@ $(CP) $< $@
$(BEANSRCDIR)/BeanInfoUtils.java: $(DOCLETSRC)/beaninfo/BeanInfoUtils.java $(BEANSRCDIR)/BeanInfoUtils.java: $(DOCLETSRC)/sun/swing/BeanInfoUtils.java
$(CP) $< $@ $(CP) $< $@
# #
......
...@@ -39,10 +39,7 @@ include NativeCompilation.gmk ...@@ -39,10 +39,7 @@ include NativeCompilation.gmk
# Setup the java compilers for the JDK build. # Setup the java compilers for the JDK build.
include Setup.gmk include Setup.gmk
# Setup the build tools. import: import-only
include Tools.gmk
import: $(BUILD_TOOLS) import-only
import-only: import-only:
# Import (corba jaxp jaxws langtools hotspot) # Import (corba jaxp jaxws langtools hotspot)
+$(MAKE) -f Import.gmk +$(MAKE) -f Import.gmk
...@@ -91,17 +88,19 @@ demos: ...@@ -91,17 +88,19 @@ demos:
# into packages, or installed. # into packages, or installed.
images: images:
+$(MAKE) -f CreateJars.gmk +$(MAKE) -f CreateJars.gmk
+$(MAKE) -f Images.gmk +$(MAKE) -f Images.gmk
ifeq ($(OPENJDK_TARGET_OS), macosx)
+$(MAKE) -f Bundles.gmk
endif
overlay-images: overlay-images:
+$(MAKE) -f CompileLaunchers.gmk OVERLAY_IMAGES=true +$(MAKE) -f CompileLaunchers.gmk OVERLAY_IMAGES=true
+$(MAKE) -f Images.gmk overlay-images +$(MAKE) -f Images.gmk overlay-images
# Create platform specific image layouts sign-jars:
bundles: +$(MAKE) -f SignJars.gmk
+$(MAKE) -f Bundles.gmk
BINARIES:=$(notdir $(wildcard $(IMAGES_OUTPUTDIR)/j2sdk-image/bin/*)) BINARIES:=$(notdir $(wildcard $(JDK_IMAGE_DIR)/bin/*))
INSTALLDIR:=openjdk-$(RELEASE) INSTALLDIR:=openjdk-$(RELEASE)
# Install the jdk image, in a very crude way. Not taking into # Install the jdk image, in a very crude way. Not taking into
...@@ -111,7 +110,7 @@ install: ...@@ -111,7 +110,7 @@ install:
echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk. echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk.
$(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR) $(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
$(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/* $(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/*
$(CP) -rp $(IMAGES_OUTPUTDIR)/j2sdk-image/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR) $(CP) -rp $(JDK_IMAGE_DIR)/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
$(MKDIR) -p $(INSTALL_PREFIX)/bin $(MKDIR) -p $(INSTALL_PREFIX)/bin
$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES)) $(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true $(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
......
...@@ -33,9 +33,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) ...@@ -33,9 +33,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
bundles: jre-bundle jdk-bundle bundles: jre-bundle jdk-bundle
# JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
JDK_BUNDLE_DIR := $(IMAGES_OUTPUTDIR)/j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
JRE_BUNDLE_DIR := $(IMAGES_OUTPUTDIR)/j2re-bundle/jre$(JDK_VERSION).jre/Contents
MACOSX_SRC := $(JDK_TOPDIR)/src/macosx MACOSX_SRC := $(JDK_TOPDIR)/src/macosx
...@@ -70,21 +68,21 @@ else ...@@ -70,21 +68,21 @@ else
endif endif
JDK_FILE_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/j2sdk-image ! -type d) JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR) ! -type d)
JRE_FILE_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/j2re-image ! -type d) JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR) ! -type d)
JDK_TARGET_LIST := $(subst $(IMAGES_OUTPUTDIR)/j2sdk-image,$(JDK_BUNDLE_DIR)/Home,$(JDK_FILE_LIST)) JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR),$(JDK_BUNDLE_DIR)/Home,$(JDK_FILE_LIST))
JRE_TARGET_LIST := $(subst $(IMAGES_OUTPUTDIR)/j2re-image,$(JRE_BUNDLE_DIR)/Home,$(JRE_FILE_LIST)) JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR),$(JRE_BUNDLE_DIR)/Home,$(JRE_FILE_LIST))
# The old builds implementation of this did not preserve symlinks so # The old builds implementation of this did not preserve symlinks so
# make sure they are followed and the contents copied instead. # make sure they are followed and the contents copied instead.
# To fix this, just replace copy with install-file macro. # To fix this, just replace copy with install-file macro.
$(JDK_BUNDLE_DIR)/Home/%: $(IMAGES_OUTPUTDIR)/j2sdk-image/% $(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) -f -R -L '$<' '$@' $(CP) -f -R -L '$<' '$@'
$(JRE_BUNDLE_DIR)/Home/%: $(IMAGES_OUTPUTDIR)/j2re-image/% $(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) -f -R -L '$<' '$@' $(CP) -f -R -L '$<' '$@'
...@@ -93,7 +91,7 @@ $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib: ...@@ -93,7 +91,7 @@ $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $@ $(RM) $@
$(LN) -s ../Home/lib/jli/libjli.dylib $@ $(LN) -s ../Home/jre/lib/jli/libjli.dylib $@
$(JRE_BUNDLE_DIR)/MacOS/libjli.dylib: $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
......
...@@ -33,6 +33,9 @@ include NativeCompilation.gmk ...@@ -33,6 +33,9 @@ include NativeCompilation.gmk
# Setup the java compilers for the JDK build. # Setup the java compilers for the JDK build.
include Setup.gmk include Setup.gmk
# Prepare the find cache. Only used if running on windows.
$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src))
# Append demo goals to this variable. # Append demo goals to this variable.
BUILD_DEMOS= BUILD_DEMOS=
...@@ -185,7 +188,7 @@ ifndef OPENJDK ...@@ -185,7 +188,7 @@ ifndef OPENJDK
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%,\ BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%,\
$(JDK_OUTPUTDIR)/demo/nbproject/%,\ $(JDK_OUTPUTDIR)/demo/nbproject/%,\
$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/demo/nbproject/ -type f)) $(call CacheFind,$(JDK_TOPDIR)/src/closed/share/demo/nbproject))
$(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/closed/share/demo/nbproject/% $(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) $< $@ $(CP) $< $@
...@@ -317,7 +320,7 @@ $(eval $(call SetupJVMTIDemo,versionCheck, agent_util)) ...@@ -317,7 +320,7 @@ $(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
# The jpda demo (com/sun/tools/example) is oddly enough stored in src/share/classes. # The jpda demo (com/sun/tools/example) is oddly enough stored in src/share/classes.
# At least, we do not need to compile the jpda demo, just jar/zip up the sources. # At least, we do not need to compile the jpda demo, just jar/zip up the sources.
JPDA_SOURCES:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example -type f) JPDA_SOURCES:=$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/tools/example)
# The number of files are few enough so that we can use echo safely below to list them. # The number of files are few enough so that we can use echo safely below to list them.
JPDA_FILES:=$(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES)) JPDA_FILES:=$(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES))
...@@ -363,7 +366,7 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \ ...@@ -363,7 +366,7 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \
# The netbeans project files are copied into the demo directory. # The netbeans project files are copied into the demo directory.
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%,\ BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%,\
$(JDK_OUTPUTDIR)/demo/nbproject/%,\ $(JDK_OUTPUTDIR)/demo/nbproject/%,\
$(shell $(FIND) $(JDK_TOPDIR)/src/share/demo/nbproject/ -type f)) $(call CacheFind,$(JDK_TOPDIR)/src/share/demo/nbproject))
$(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/share/demo/nbproject/% $(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/share/demo/nbproject/%
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
...@@ -439,7 +442,7 @@ endif ...@@ -439,7 +442,7 @@ endif
################################################################################################## ##################################################################################################
ifndef OPENJDK ifndef OPENJDK
DB_DEMO_ZIPFILE := $(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/db -name "*demo*.zip") DB_DEMO_ZIPFILE := $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*demo*.zip)
$(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE) $(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
......
...@@ -42,8 +42,7 @@ EXCLUDES += com/sun/pept \ ...@@ -42,8 +42,7 @@ EXCLUDES += com/sun/pept \
com/sun/tools/example/trace\ com/sun/tools/example/trace\
com/sun/tools/example/debug/bdi\ com/sun/tools/example/debug/bdi\
com/sun/tools/example/debug/event\ com/sun/tools/example/debug/event\
com/sun/tools/example/debug/gui \ com/sun/tools/example/debug/gui
com/oracle/security
ifdef OPENJDK ifdef OPENJDK
EXCLUDES+= sun/dc \ EXCLUDES+= sun/dc \
...@@ -86,6 +85,8 @@ ifneq ($(OPENJDK_TARGET_OS),solaris) ...@@ -86,6 +85,8 @@ ifneq ($(OPENJDK_TARGET_OS),solaris)
sun/nio/ch/SolarisEventPort.java \ sun/nio/ch/SolarisEventPort.java \
sun/tools/attach/SolarisAttachProvider.java \ sun/tools/attach/SolarisAttachProvider.java \
sun/tools/attach/SolarisVirtualMachine.java sun/tools/attach/SolarisVirtualMachine.java
EXCLUDES += com/oracle/security
endif endif
# In the old build, this isn't excluded on macosx, even though it probably # In the old build, this isn't excluded on macosx, even though it probably
...@@ -227,14 +228,20 @@ ifeq ($(OPENJDK_TARGET_OS), windows) ...@@ -227,14 +228,20 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
sun/nio/ch/SimpleAsynchronousFileChannelImpl.java sun/nio/ch/SimpleAsynchronousFileChannelImpl.java
endif endif
# Exclude nimbus files from rt.jar # These files do not appear in the build result of the old build. This
# is because they are generated sources, but the AUTO_JAVA_FILES won't
# pick them up since they aren't generated when the source dirs are
# searched and they aren't referenced by any other classes so they won't
# be picked up by implicit compilation. On a rebuild, they are picked up
# and compiled. Exclude them here to produce the same rt.jar as the old
# build does when building just once.
EXFILES+=javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \ EXFILES+=javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \ javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
javax/swing/plaf/nimbus/ScrollBarPainter.java \ javax/swing/plaf/nimbus/ScrollBarPainter.java \
javax/swing/plaf/nimbus/SliderPainter.java \ javax/swing/plaf/nimbus/SliderPainter.java \
javax/swing/plaf/nimbus/SpinnerPainter.java \ javax/swing/plaf/nimbus/SpinnerPainter.java \
javax/swing/plaf/nimbus/SplitPanePainter.java \ javax/swing/plaf/nimbus/SplitPanePainter.java \
javax/swing/plaf/nimbus/TabbedPanePainter.java javax/swing/plaf/nimbus/TabbedPanePainter.java
# Acquire a list of files that should be copied straight over to the classes. # Acquire a list of files that should be copied straight over to the classes.
include CopyIntoClasses.gmk include CopyIntoClasses.gmk
...@@ -285,6 +292,7 @@ $(eval $(call SetupJavaCompilation,BUILD_JDK,\ ...@@ -285,6 +292,7 @@ $(eval $(call SetupJavaCompilation,BUILD_JDK,\
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \ $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
$(MACOSX_SRC_DIRS) \ $(MACOSX_SRC_DIRS) \
$(JDK_OUTPUTDIR)/gensrc \ $(JDK_OUTPUTDIR)/gensrc \
$(JDK_OUTPUTDIR)/gensrc_no_srczip \
$(CLOSED_SRC_DIRS),\ $(CLOSED_SRC_DIRS),\
INCLUDES:=$(JDK_USER_DEFINED_FILTER),\ INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
EXCLUDES:=$(EXCLUDES),\ EXCLUDES:=$(EXCLUDES),\
...@@ -294,35 +302,6 @@ $(eval $(call SetupJavaCompilation,BUILD_JDK,\ ...@@ -294,35 +302,6 @@ $(eval $(call SetupJavaCompilation,BUILD_JDK,\
COPY_FILES:=$(COPY_FILES),\ COPY_FILES:=$(COPY_FILES),\
HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers)) HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers))
##########################################################################################
# Special handling of header file generation for classes in the jigsaw base module which
# currently can't add the annotaion GenerateNativeHeaders. For these specific classes the
# java file and the class have the same names which enables shortcutting the dependencies.
JDK_BASE_HEADER_CLASSES:=java.lang.Integer \
java.lang.Long \
java.net.SocketOptions \
sun.nio.ch.IOStatus \
java.io.FileSystem
JDK_BASE_HEADER_JAVA_FILES:=$(patsubst %,$(JDK_TOPDIR)/src/share/classes/%.java,\
$(subst .,/,$(JDK_BASE_HEADER_CLASSES)))
ifeq ($(OPENJDK_TARGET_OS),windows)
JDK_BASE_HEADER_CLASSES_WINDOWS:=sun.nio.ch.PollArrayWrapper
JDK_BASE_HEADER_CLASSES+=$(JDK_BASE_HEADER_CLASSES_WINDOWS)
JDK_BASE_HEADER_JAVA_FILES+=$(patsubst %,$(JDK_TOPDIR)/src/windows/classes/%.java,\
$(subst .,/,$(JDK_BASE_HEADER_CLASSES_WINDOWS)))
endif
# Set prereqs to the java files since make doesn't know about the class files. Add BUILD_JDK
# as an order only dependency to avoid race with the java compilation.
$(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers: $(JDK_BASE_HEADER_JAVA_FILES) | $(BUILD_JDK)
$(ECHO) Generating headers for jdk base classes
$(JAVAH) -bootclasspath $(JDK_OUTPUTDIR)/classes -d $(JDK_OUTPUTDIR)/gensrc_headers \
$(JDK_BASE_HEADER_CLASSES)
$(TOUCH) $@
########################################################################################## ##########################################################################################
ifndef OPENJDK ifndef OPENJDK
...@@ -387,7 +366,6 @@ endif ...@@ -387,7 +366,6 @@ endif
# copy with -a to preserve timestamps so dependencies down the line aren't messed up # copy with -a to preserve timestamps so dependencies down the line aren't messed up
all: $(BUILD_JDK) $(BUILD_ALTCLASSES) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \ all: $(BUILD_JDK) $(BUILD_ALTCLASSES) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \
$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \ $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin
$(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers
.PHONY: all .PHONY: all
...@@ -32,6 +32,9 @@ include NativeCompilation.gmk ...@@ -32,6 +32,9 @@ include NativeCompilation.gmk
# Setup the java compilers for the JDK build. # Setup the java compilers for the JDK build.
include Setup.gmk include Setup.gmk
# Prepare the find cache. Only used on windows.
$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src/share/bin))
# Build tools # Build tools
include Tools.gmk include Tools.gmk
......
...@@ -35,6 +35,9 @@ include Setup.gmk ...@@ -35,6 +35,9 @@ include Setup.gmk
# Copy files (can now depend on $(COPY_FILES)) # Copy files (can now depend on $(COPY_FILES))
include CopyFiles.gmk include CopyFiles.gmk
# Prepare the find cache. Only used if running on windows.
$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src))
# Build tools # Build tools
include Tools.gmk include Tools.gmk
...@@ -2607,7 +2610,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI,\ ...@@ -2607,7 +2610,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI,\
LIBRARY:=sunmscapi,\ LIBRARY:=sunmscapi,\
OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\ OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi,\ SRC:=$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi,\
INCLUDE_FILES:=security.cpp, \
LANG:=C++,\ LANG:=C++,\
OPTIMIZATION:=LOW, \ OPTIMIZATION:=LOW, \
CFLAGS:=$(CFLAGS_JDKLIB) \ CFLAGS:=$(CFLAGS_JDKLIB) \
......
...@@ -169,7 +169,7 @@ COPY_FILES += \ ...@@ -169,7 +169,7 @@ COPY_FILES += \
# are uncommented and the configuration file is stored in the output META-INF directory. # are uncommented and the configuration file is stored in the output META-INF directory.
# Make sure the output directory is created. # Make sure the output directory is created.
$(shell $(MKDIR) -p $(JDK_OUTPUTDIR)/classes/META-INF/services) $(eval $(call MakeDir,$(JDK_OUTPUTDIR)/classes/META-INF/services))
# Find all META-INF/services/* files # Find all META-INF/services/* files
ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF) ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
ALL_META-INF_DIRS_targetapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF) ALL_META-INF_DIRS_targetapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -type d -a -name META-INF)
......
此差异已折叠。
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
# questions. # questions.
# #
# Prepare the find cache. This is only used on windows.
$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/windows/classes))
# All .properties files to be compiled are appended to this variable. # All .properties files to be compiled are appended to this variable.
ALL_COMPILED_PROPSOURCES:= ALL_COMPILED_PROPSOURCES:=
# All generated .java files from compilation are appended to this variable. # All generated .java files from compilation are appended to this variable.
...@@ -117,44 +120,54 @@ endef ...@@ -117,44 +120,54 @@ endef
#com/apple/laf/resources #com/apple/laf/resources
ifeq ($(OPENJDK_TARGET_OS),macosx) ifeq ($(OPENJDK_TARGET_OS),macosx)
$(eval $(call add_properties_to_compile,COM_APPLE_LAF,\ $(eval $(call add_properties_to_compile,COM_APPLE_LAF,\
$(shell find $(JDK_TOPDIR)/src/macosx/classes/com/apple/laf/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/macosx/classes/com/apple/laf/resources)),\
ListResourceBundle))
endif endif
#com/sun/accessibility/internal/resources #com/sun/accessibility/internal/resources
$(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY,\ $(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY_HK,\ $(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#com/sun/imageio/plugins/common #com/sun/imageio/plugins/common
$(eval $(call add_properties_to_clean,COM_SUN_IMAGEIO,\ $(eval $(call add_properties_to_clean,COM_SUN_IMAGEIO,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/imageio -name "*.properties"))) $(filter %.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/imageio))))
#com/sun/java/swing/plaf/gtk/resources #com/sun/java/swing/plaf/gtk/resources
ifneq ($(OPENJDK_TARGET_OS), windows) ifneq ($(OPENJDK_TARGET_OS), windows)
# Only compile GTK resource bundles on Solaris/Linux # Only compile GTK resource bundles on Solaris/Linux
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK_HK,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
endif endif
#com/sun/java/swing/plaf/motif/resources #com/sun/java/swing/plaf/motif/resources
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF_HK,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_MOTIF_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#com/sun/java/swing/plaf/windows/resources #com/sun/java/swing/plaf/windows/resources
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS_HK,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_WINDOWS_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#com/sun/java/util/jar/pack #com/sun/java/util/jar/pack
$(eval $(call add_properties_to_clean,JNDI_COSNAMING,\ $(eval $(call add_properties_to_clean,JNDI_COSNAMING,\
$(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/intrinsic.properties)) $(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/intrinsic.properties))
...@@ -169,138 +182,171 @@ $(eval $(call add_properties_to_clean,JNDI_COSNAMING,\ ...@@ -169,138 +182,171 @@ $(eval $(call add_properties_to_clean,JNDI_COSNAMING,\
#FIXME: The "xmlsecurity*.properties" pattern is not ideal; we might want to find #FIXME: The "xmlsecurity*.properties" pattern is not ideal; we might want to find
#a better way to select the properties files that are needed. #a better way to select the properties files that are needed.
$(eval $(call add_properties_to_clean,XML_SECURITY,\ $(eval $(call add_properties_to_clean,XML_SECURITY,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource -name "xmlsecurity*.properties"))) $(filter $(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity%.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource))))
#com/sun/rowset #com/sun/rowset
$(eval $(call add_properties_to_clean,COM_SUN_ROWSET,\ $(eval $(call add_properties_to_clean,COM_SUN_ROWSET,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/rowset -name "*.properties"))) $(filter %.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/rowset))))
$(eval $(call add_properties_to_clean,COM_SUN_ROWSET_HK,\ $(eval $(call add_properties_to_clean,COM_SUN_ROWSET_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/rowset -name "*zh_TW.properties"),\ $(filter %zh_TW.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/rowset)),\
%zh_TW,%zh_HK)) %zh_TW,%zh_HK))
#com/sun/servicetag/resources #com/sun/servicetag/resources
#com/sun/swing/internal/plaf/basic/resources #com/sun/swing/internal/plaf/basic/resources
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC_HK,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_BASIC_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#com/sun/swing/internal/plaf/metal/resources #com/sun/swing/internal/plaf/metal/resources
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL_HK,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_METAL_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources -name "*.properties"),\ $(filter %.properties,$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources)),\
ListResourceBundle,%zh_TW,%zh_HK)) ListResourceBundle,%zh_TW,%zh_HK))
#com/sun/swing/internal/plaf/synth/resources #com/sun/swing/internal/plaf/synth/resources
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH_HK,\ $(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_SYNTH_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#com/sun/tools/jdi/resources #com/sun/tools/jdi/resources
$(eval $(call add_properties_to_compile,COM_SUN_TOOLS_JDI,\ $(eval $(call add_properties_to_compile,COM_SUN_TOOLS_JDI,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/tools/jdi/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/tools/jdi/resources)),\
ListResourceBundle))
#com/sun/tools/script/shell #com/sun/tools/script/shell
#java/util #java/util
#javax/sql/rowset #javax/sql/rowset
$(eval $(call add_properties_to_clean,JAVAX_SQL_ROWSET,\ $(eval $(call add_properties_to_clean,JAVAX_SQL_ROWSET,\
$(shell find $(JDK_TOPDIR)/src/share/classes/javax/sql/rowset -name "*.properties"))) $(filter %.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/javax/sql/rowset))))
#sun/awt/resources #sun/awt/resources
$(eval $(call add_properties_to_compile,SUN_AWT,\ $(eval $(call add_properties_to_compile,SUN_AWT,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/awt/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/awt/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_AWT_HK,\ $(eval $(call add_properties_to_compile,SUN_AWT_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/awt/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/awt/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#sun/awt/windows/ #sun/awt/windows/
ifeq ($(OPENJDK_TARGET_OS),windows) ifeq ($(OPENJDK_TARGET_OS),windows)
$(eval $(call add_properties_to_compile,SUN_AWT,\ $(eval $(call add_properties_to_compile,SUN_AWT,\
$(shell find $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows -name "awtLocalization*.properties"),\ $(filter $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows/awtLocalization%.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/windows/classes/sun/awt/windows)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_AWT_HK,\ $(eval $(call add_properties_to_compile,SUN_AWT_HK,\
$(shell find $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows -name "awtLocalization*.properties"),\ $(filter $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows/awtLocalization%.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/windows/classes/sun/awt/windows)),\
ListResourceBundle,%zh_TW,%zh_HK))
endif endif
#sun/launcher/resources #sun/launcher/resources
$(eval $(call add_properties_to_compile,SUN_LAUNCHER,\ $(eval $(call add_properties_to_compile,SUN_LAUNCHER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/launcher/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/launcher/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_LAUNCHER_HK,\ $(eval $(call add_properties_to_compile,SUN_LAUNCHER_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/launcher/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/launcher/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#sun/management/resources #sun/management/resources
$(eval $(call add_properties_to_compile,SUN_MANAGEMENT,\ $(eval $(call add_properties_to_compile,SUN_MANAGEMENT,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/management/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/management/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_MANAGEMENT_KH,\ $(eval $(call add_properties_to_compile,SUN_MANAGEMENT_KH,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/management/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/management/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#sun/print #sun/print
#sun/print/resources #sun/print/resources
$(eval $(call add_properties_to_compile,SUN_PRINT,\ $(eval $(call add_properties_to_compile,SUN_PRINT,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/print/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/print/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_PRINT_HK,\ $(eval $(call add_properties_to_compile,SUN_PRINT_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/print/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/print/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#sun/rmi/registry/resources #sun/rmi/registry/resources
$(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY,\ $(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources -name "*.properties"))) $(filter %.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources))))
$(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY_HK,\ $(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources -name "*zh_TW.properties"),\ $(filter %zh_TW.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources)),\
%zh_TW,%zh_HK)) %zh_TW,%zh_HK))
#sun/rmi/rmic/resources #sun/rmi/rmic/resources
$(eval $(call add_properties_to_clean,SUN_RMI_RMIC,\ $(eval $(call add_properties_to_clean,SUN_RMI_RMIC,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/rmic/resources -name "*.properties"))) $(filter %.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/rmic/resources))))
#sun/rmi/server/resources #sun/rmi/server/resources
$(eval $(call add_properties_to_clean,SUN_RMI_SERVER,\ $(eval $(call add_properties_to_clean,SUN_RMI_SERVER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources -name "*.properties"))) $(filter %.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources))))
$(eval $(call add_properties_to_clean,SUN_RMI_SERVER_HK,\ $(eval $(call add_properties_to_clean,SUN_RMI_SERVER_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources -name "*zh_TW.properties"),\ $(filter %zh_TW.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources)),\
%zh_TW,%zh_HK)) %zh_TW,%zh_HK))
# sun/tools/jar/resources # sun/tools/jar/resources
$(eval $(call add_properties_to_compile,SUN_TOOLS_JAR,\ $(eval $(call add_properties_to_compile,SUN_TOOLS_JAR,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_TOOLS_JAR_HK,\ $(eval $(call add_properties_to_compile,SUN_TOOLS_JAR_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
#sun/tools/javac/resources #sun/tools/javac/resources
# It's unclear if the other localized property files here are supposed to be copied or not # It's unclear if the other localized property files here are supposed to be copied or not
# but the old build system didn't copy them. # but the old build system didn't copy them.
$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\ $(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/javac/resources -name "javac.properties"))) $(filter %javac.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/javac/resources))))
#sun/tools/jconsole/resources #sun/tools/jconsole/resources
$(eval $(call add_properties_to_clean,SUN_TOOLS_JCONSOLE,\ $(eval $(call add_properties_to_clean,SUN_TOOLS_JCONSOLE,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources -name "*.properties"))) $(filter %.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources))))
#sun/tools/serialver #sun/tools/serialver
$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\ $(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/serialver -name "*.properties"),,,resources)) $(filter %.properties,\
$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/tools/serialver)),,,resources))
#sun/util/logging/resources #sun/util/logging/resources
$(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING,\ $(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources)),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING_HK,\ $(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources -name "*.properties"),\ $(filter %.properties,\
ListResourceBundle,%zh_TW,%zh_HK)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources)),\
ListResourceBundle,%zh_TW,%zh_HK))
# sun/util/resources # sun/util/resources
$(eval $(call add_properties_to_compile,SUN_UTIL,\ $(eval $(call add_properties_to_compile,SUN_UTIL,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/util/resources -name "*.properties"),\ $(filter %.properties,\
sun.util.resources.LocaleNamesBundle)) $(call CacheFind,$(JDK_TOPDIR)/src/share/classes/sun/util/resources)),\
sun.util.resources.LocaleNamesBundle))
# Now setup the rule for the generation of the resource bundles. # Now setup the rule for the generation of the resource bundles.
$(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties : $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS) $(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties : $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS)
......
...@@ -45,7 +45,6 @@ GENSRC_SWING_NIMBUS := $(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus ...@@ -45,7 +45,6 @@ GENSRC_SWING_NIMBUS := $(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus
# Generate beaninfo java files # Generate beaninfo java files
# #
BEAN_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc/javax/swing/beaninfo
DOCLETSRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans DOCLETSRC_DIR = $(JDK_TOPDIR)/make/tools/swing-beans
# javax.swing package # javax.swing package
...@@ -69,25 +68,31 @@ BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/%.java) \ ...@@ -69,25 +68,31 @@ BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/%.java) \
# Dummy variable so far, in the old build system it was false by default # Dummy variable so far, in the old build system it was false by default
SWINGBEAN_DEBUG_FLAG = false SWINGBEAN_DEBUG_FLAG = false
# GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(JDK_OUTPUTDIR)/btclasses # GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(JDK_OUTPUTDIR)/btclasses
$(JDK_OUTPUTDIR)/gensrc/_the.generated_beaninfo: $(BEANS_SRC) $(BEAN_GENSRC_DIR)/SwingBeanInfoBase.java $(BEAN_GENSRC_DIR)/BeanInfoUtils.java $(BUILD_TOOLS) $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) $(JDK_OUTPUTDIR)/gensrc/javax/swing/SwingBeanInfoBase.java $(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS)
$(ECHO) Generating beaninfo $(ECHO) Generating beaninfo
$(JAVA) -Djava.awt.headless=true -jar $(JAVADOC_JARS) -doclet GenDocletBeanInfo -x $(SWINGBEAN_DEBUG_FLAG) -d $(BEAN_GENSRC_DIR) -t $(DOCLETSRC_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \ $(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing
$(JAVA) -Djava.awt.headless=true -jar $(JAVADOC_JARS) -doclet GenDocletBeanInfo \
-x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing \
-t $(DOCLETSRC_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
-XDignore.symbol.file=true \ -XDignore.symbol.file=true \
-classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC) $(LOG_INFO) -classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC) $(LOG_INFO)
# Move the JTextComponent into its proper package directory.
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/text
$(MV) $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/JTextComponentBeanInfo.java $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/text/JTextComponentBeanInfo.java
$(TOUCH) $@ $(TOUCH) $@
# This file is the part of dt.jar # This file is the part of dt.jar
# For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo # For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/javax/swing
# Should it be moved under $(JDK_TOPDIR)/src/share/classes/javax/swing instead? # Should it be moved under $(JDK_TOPDIR)/src/share/classes/javax/swing instead?
$(BEAN_GENSRC_DIR)/SwingBeanInfoBase.java: $(DOCLETSRC_DIR)/beaninfo/SwingBeanInfoBase.java $(JDK_OUTPUTDIR)/gensrc/javax/swing/SwingBeanInfoBase.java: $(DOCLETSRC_DIR)/javax/swing/SwingBeanInfoBase.java
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) $< $@ $(CP) $< $@
# This file is the part of dt.jar # This file is the part of dt.jar
# For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo # For some reason it is under $(JDK_TOPDIR)/make/tools/swing-beans/sun/swing
# Should it be moved under $(JDK_TOPDIR)/src/share/classes/sun/swing instead? # Should it be moved under $(JDK_TOPDIR)/src/share/classes/sun/swing instead?
$(BEAN_GENSRC_DIR)/BeanInfoUtils.java: $(DOCLETSRC_DIR)/beaninfo/BeanInfoUtils.java $(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java: $(DOCLETSRC_DIR)/sun/swing/BeanInfoUtils.java
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) $< $@ $(CP) $< $@
GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc/_the.generated_beaninfo GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo
...@@ -54,7 +54,7 @@ endif ...@@ -54,7 +54,7 @@ endif
########################################################################################## ##########################################################################################
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt $(BUILD_TOOLS)
$(ECHO) "Generating X11 wrapper ($*-bit version)" $(ECHO) "Generating X11 wrapper ($*-bit version)"
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $@ $(RM) $@
...@@ -92,7 +92,7 @@ $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/solaris/classes/sun ...@@ -92,7 +92,7 @@ $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/solaris/classes/sun
$(CP) $< $@ $(CP) $< $@
endif endif
$(GENSRC_X11WRAPPERS_DST)/_the.generated.x11 : $(foreach S,$(GENSRC_SIZES),$(GENSRC_X11WRAPPERS_TMP)/sizer/$(S)) $(GENSRC_X11WRAPPERS_DST)/_the.generated.x11 : $(foreach S,$(GENSRC_SIZES),$(GENSRC_X11WRAPPERS_TMP)/sizer/$(S)) $(BUILD_TOOLS)
$(RM) $@ $(RM) $@
$(MKDIR) -p $(@D)/sun/awt/X11 $(MKDIR) -p $(@D)/sun/awt/X11
$(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes $(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes
......
...@@ -30,6 +30,15 @@ include Setup.gmk ...@@ -30,6 +30,15 @@ include Setup.gmk
default: images default: images
# Prepare the find cache. Only used if running on windows.
$(eval $(call FillCacheFind,\
$(wildcard $(JDK_OUTPUTDIR)/bin \
$(JDK_OUTPUTDIR)/lib \
$(IMAGES_OUTPUTDIR)/lib \
$(JDK_OUTPUTDIR)/include \
$(JDK_OUTPUTDIR)/sample \
$(JDK_OUTPUTDIR)/demo)))
include Tools.gmk include Tools.gmk
# Note: This double-colon rule is intentional, to support # Note: This double-colon rule is intentional, to support
...@@ -68,12 +77,6 @@ define AddFileToCopy ...@@ -68,12 +77,6 @@ define AddFileToCopy
$4 += $2/$$($2_$3_FILE) $4 += $2/$$($2_$3_FILE)
endef endef
JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-image
JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-image
JDK_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-overlay-image
JRE_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-overlay-image
################################################################################ ################################################################################
# #
# JRE and JDK build rules # JRE and JDK build rules
...@@ -132,7 +135,7 @@ WINDOWS_JDKJRE_BIN_FILES := \ ...@@ -132,7 +135,7 @@ WINDOWS_JDKJRE_BIN_FILES := \
$(SALIB_NAME) $(SALIB_NAME)
# Find all files in bin dir # Find all files in bin dir
ALL_BIN_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f) ALL_BIN_LIST := $(call CacheFind,$(JDK_OUTPUTDIR)/bin)
# Prevent sjavac from entering the images. # Prevent sjavac from entering the images.
ALL_BIN_LIST := $(filter-out %/sjavac,$(ALL_BIN_LIST)) ALL_BIN_LIST := $(filter-out %/sjavac,$(ALL_BIN_LIST))
...@@ -144,7 +147,7 @@ ifneq ($(OPENJDK_TARGET_OS),windows) ...@@ -144,7 +147,7 @@ ifneq ($(OPENJDK_TARGET_OS),windows)
else else
# On windows, the libraries are in the bin dir, only filter out debuginfo files # On windows, the libraries are in the bin dir, only filter out debuginfo files
# for executables. "java" is both a library and executable. # for executables. "java" is both a library and executable.
ALL_BIN_EXEC_FILES := $(filter-out java.exe,$(notdir $(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f -name "*.exe"))) ALL_BIN_EXEC_FILES := $(filter-out java.exe,$(notdir $(filter %.exe,$(ALL_BIN_LIST))))
ALL_BIN_DEBUG_FILTER := $(addprefix %,$(patsubst %.exe,%.debuginfo,$(ALL_BIN_EXEC_FILES)) \ ALL_BIN_DEBUG_FILTER := $(addprefix %,$(patsubst %.exe,%.debuginfo,$(ALL_BIN_EXEC_FILES)) \
$(patsubst %.exe,%.diz,$(ALL_BIN_EXEC_FILES))) %.pdb $(patsubst %.exe,%.diz,$(ALL_BIN_EXEC_FILES))) %.pdb
ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER),$(ALL_BIN_LIST)) ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER),$(ALL_BIN_LIST))
...@@ -212,13 +215,13 @@ endif ...@@ -212,13 +215,13 @@ endif
# Find all files to copy from $(JDK_OUTPUTDIR)/lib # Find all files to copy from $(JDK_OUTPUTDIR)/lib
# Jar files are not expected to be here # Jar files are not expected to be here
ALL_JDKOUT_LIB_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \ ALL_JDKOUT_LIB_LIST := $(call not-containing,_the.,$(filter-out %.jar,\
\( -name "_the*" -o -name "javac_state " -o -name "*.jar" \) ) $(call CacheFind,$(JDK_OUTPUTDIR)/lib)))
# Find all files to copy from $(IMAGES_OUTPUTDIR)/lib # Find all files to copy from $(IMAGES_OUTPUTDIR)/lib
# This is were the jar files are and might not exist if building overlay-images # This is were the jar files are and might not exist if building overlay-images
ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib),) ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib),)
ALL_IMAGES_LIB_LIST := $(shell $(FIND) $(IMAGES_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \ ALL_IMAGES_LIB_LIST := $(call not-containing,_the.,\
\( -name "_the*" -o -name "javac_state " \) ) $(call CacheFind,$(IMAGES_OUTPUTDIR)/lib))
endif endif
# Filter files to copy for each destination # Filter files to copy for each destination
...@@ -493,13 +496,13 @@ define CreateOverlayDemoRule ...@@ -493,13 +496,13 @@ define CreateOverlayDemoRule
JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET) JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET)
endef endef
JDK_OVERLAY_DEMO_SOURCES := $(shell $(FIND) $(JDK_OUTPUTDIR)/demo -name "*$(SHARED_LIBRARY_SUFFIX)") JDK_OVERLAY_DEMO_SOURCES := $(filter %$(SHARED_LIBRARY_SUFFIX),$(call CacheFind,$(JDK_OUTPUTDIR)/demo))
$(foreach lib,$(JDK_OVERLAY_DEMO_SOURCES),$(eval $(call CreateOverlayDemoRule,$(lib)))) $(foreach lib,$(JDK_OVERLAY_DEMO_SOURCES),$(eval $(call CreateOverlayDemoRule,$(lib))))
################################################################################ ################################################################################
# /sample dir # /sample dir
$(foreach f,$(shell $(FIND) $(JDK_OUTPUTDIR)/sample -type f),\ $(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/sample),\
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS))) $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS)))
################################################################################ ################################################################################
...@@ -518,7 +521,7 @@ ifndef OPENJDK ...@@ -518,7 +521,7 @@ ifndef OPENJDK
$(install-file) $(install-file)
JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%,$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped,\ JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%,$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped,\
$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/db -name "*.zip" ! -name "*demo*")) \ $(call not-containing,demo,$(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip))) \
$(JDK_IMAGE_DIR)/db/README-JDK.html $(JDK_IMAGE_DIR)/db/README-JDK.html
endif endif
...@@ -526,7 +529,7 @@ endif ...@@ -526,7 +529,7 @@ endif
################################################################################ ################################################################################
# /include dir # /include dir
$(foreach f,$(shell $(FIND) $(JDK_OUTPUTDIR)/include -type f),\ $(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/include),\
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS))) $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS)))
################################################################################ ################################################################################
...@@ -625,8 +628,7 @@ $(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip ...@@ -625,8 +628,7 @@ $(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip
ifneq ($(POST_STRIP_CMD),) ifneq ($(POST_STRIP_CMD),)
ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(OPENJDK_TARGET_OS), windows)
EXEC_LIST_BIN:=$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*.exe \ EXEC_LIST_BIN:=$(filter-out %$(notdir $(MSVCR_DLL)),$(filter %.exe %.dll,$(ALL_BIN_LIST)))
-o -name \*.dll | $(EGREP) -v -i "$(MSVCR_DLL)")
else else
# Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed # Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX)` \ EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX)` \
......
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
include $(SPEC)
include MakeBase.gmk
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Oracle JDK
# builds respectively.)
#
# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE
# jar files do not require signing, but those for JDK do. If an unsigned
# jar file is installed into JDK, things will break when the crypto
# routines are called.
#
# All jars are created in CreateJars.gmk. This Makefile does the signing
# of the jars for JDK.
#
# For JDK, the binaries use pre-built/pre-signed binary files stored in
# the closed workspace that are not shipped in the OpenJDK workspaces.
# We still build the JDK files to verify the files compile, and in
# preparation for possible signing. Developers working on JCE in JDK
# must sign the JCE files before testing. The JCE signing key is kept
# separate from the JDK workspace to prevent its disclosure.
#
# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
# be built, signed, and then the resulting jar files MUST BE CHECKED
# INTO THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT
# BE FORGOTTEN*, otherwise a bug fixed in the source code will not be
# reflected in the shipped binaries. The "sign-jars" target in the top
# level Makefile should be used to generate the required files.
#
# Default target
all:
ifndef OPENJDK
README-MAKEFILE_WARNING := \
"\nPlease read makefiles/SignJars.gmk for further build instructions.\n"
#
# Location for JCE codesigning key.
#
SIGNING_KEY_DIR := /security/ws/JCE-signing/src
SIGNING_KEYSTORE := $(SIGNING_KEY_DIR)/KeyStore.jks
SIGNING_PASSPHRASE := $(SIGNING_KEY_DIR)/passphrase.txt
SIGNING_ALIAS := oracle_jce_rsa
#
# Defines for signing the various jar files.
#
check-keystore:
@if [ ! -f $(SIGNING_KEYSTORE) -o ! -f $(SIGNING_PASSPHRASE) ]; then \
$(PRINTF) "\n$(SIGNING_KEYSTORE): Signing mechanism *NOT* available..."; \
$(PRINTF) $(README-MAKEFILE_WARNING); \
exit 2; \
fi
$(JCE_OUTPUTDIR)/%: $(IMAGES_OUTPUTDIR)/unsigned/%
$(MKDIR) -p $(@D)
$(CP) $< $@
$(JARSIGNER) -keystore $(SIGNING_KEYSTORE) \
$@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE)
@$(PRINTF) "\nJar codesigning finished.\n"
JAR_LIST := jce.jar \
local_policy.jar \
sunec.jar \
sunjce_provider.jar \
sunpkcs11.jar \
US_export_policy.jar
SIGNED_JARS := $(addprefix $(JCE_OUTPUTDIR)/,$(JAR_LIST))
$(SIGNED_JARS): check-keystore
all: $(SIGNED_JARS)
@$(PRINTF) "\n***The jar files built by the 'jar-sign' target must***"
@$(PRINTF) "\n***still be checked into the closed workspace! ***"
@$(PRINTF) $(README-MAKEFILE_WARNING)
endif # !OPENJDK
...@@ -23,15 +23,25 @@ ...@@ -23,15 +23,25 @@
# questions. # questions.
# #
# Cache all finds needed for this file. Only used on windows.
$(eval $(call FillCacheFind,$(JDK_TOPDIR)/make/tools \
$(JDK_TOPDIR)/src/solaris/classes \
$(JDK_TOPDIR)/makefiles/sun))
TOOLS_SRC:=$(JDK_TOPDIR)/make/tools/src \
$(JDK_TOPDIR)/makefiles/sun/awt/X11 \
$(JDK_TOPDIR)/makefiles/sun/osxapp \
$(JDK_TOPDIR)/make/tools/swing-beans
ifneq ($(OPENJDK_TARGET_OS),windows)
TOOLS_SRC+=$(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
endif
# The exception handling of swing beaninfo which have the own tool directory # The exception handling of swing beaninfo which have the own tool directory
ifeq (,$(BUILD_TOOLS)) ifeq (,$(BUILD_TOOLS))
$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\ $(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
SETUP:=GENERATE_OLDBYTECODE,\ SETUP:=GENERATE_OLDBYTECODE,\
SRC:=$(JDK_TOPDIR)/make/tools/src \ SRC:=$(TOOLS_SRC),\
$(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator \
$(JDK_TOPDIR)/makefiles/sun/awt/X11 \
$(JDK_TOPDIR)/makefiles/sun/osxapp \
$(JDK_TOPDIR)/make/tools/swing-beans,\
BIN:=$(JDK_OUTPUTDIR)/btclasses)) BIN:=$(JDK_OUTPUTDIR)/btclasses))
endif endif
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
package java.io; package java.io;
import java.lang.annotation.Native;
/** /**
* Package-private abstract class for the local filesystem abstraction. * Package-private abstract class for the local filesystem abstraction.
...@@ -98,10 +99,10 @@ abstract class FileSystem { ...@@ -98,10 +99,10 @@ abstract class FileSystem {
/* -- Attribute accessors -- */ /* -- Attribute accessors -- */
/* Constants for simple boolean attributes */ /* Constants for simple boolean attributes */
public static final int BA_EXISTS = 0x01; @Native public static final int BA_EXISTS = 0x01;
public static final int BA_REGULAR = 0x02; @Native public static final int BA_REGULAR = 0x02;
public static final int BA_DIRECTORY = 0x04; @Native public static final int BA_DIRECTORY = 0x04;
public static final int BA_HIDDEN = 0x08; @Native public static final int BA_HIDDEN = 0x08;
/** /**
* Return the simple boolean attributes for the file or directory denoted * Return the simple boolean attributes for the file or directory denoted
...@@ -110,9 +111,9 @@ abstract class FileSystem { ...@@ -110,9 +111,9 @@ abstract class FileSystem {
*/ */
public abstract int getBooleanAttributes(File f); public abstract int getBooleanAttributes(File f);
public static final int ACCESS_READ = 0x04; @Native public static final int ACCESS_READ = 0x04;
public static final int ACCESS_WRITE = 0x02; @Native public static final int ACCESS_WRITE = 0x02;
public static final int ACCESS_EXECUTE = 0x01; @Native public static final int ACCESS_EXECUTE = 0x01;
/** /**
* Check whether the file or directory denoted by the given abstract * Check whether the file or directory denoted by the given abstract
...@@ -203,9 +204,9 @@ abstract class FileSystem { ...@@ -203,9 +204,9 @@ abstract class FileSystem {
public abstract File[] listRoots(); public abstract File[] listRoots();
/* -- Disk usage -- */ /* -- Disk usage -- */
public static final int SPACE_TOTAL = 0; @Native public static final int SPACE_TOTAL = 0;
public static final int SPACE_FREE = 1; @Native public static final int SPACE_FREE = 1;
public static final int SPACE_USABLE = 2; @Native public static final int SPACE_USABLE = 2;
public abstract long getSpace(File f, int t); public abstract long getSpace(File f, int t);
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
package java.lang; package java.lang;
import java.lang.annotation.Native;
import java.util.Properties; import java.util.Properties;
/** /**
...@@ -54,13 +55,13 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -54,13 +55,13 @@ public final class Integer extends Number implements Comparable<Integer> {
* A constant holding the minimum value an {@code int} can * A constant holding the minimum value an {@code int} can
* have, -2<sup>31</sup>. * have, -2<sup>31</sup>.
*/ */
public static final int MIN_VALUE = 0x80000000; @Native public static final int MIN_VALUE = 0x80000000;
/** /**
* A constant holding the maximum value an {@code int} can * A constant holding the maximum value an {@code int} can
* have, 2<sup>31</sup>-1. * have, 2<sup>31</sup>-1.
*/ */
public static final int MAX_VALUE = 0x7fffffff; @Native public static final int MAX_VALUE = 0x7fffffff;
/** /**
* The {@code Class} instance representing the primitive type * The {@code Class} instance representing the primitive type
...@@ -1295,7 +1296,7 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1295,7 +1296,7 @@ public final class Integer extends Number implements Comparable<Integer> {
* *
* @since 1.5 * @since 1.5
*/ */
public static final int SIZE = 32; @Native public static final int SIZE = 32;
/** /**
* The number of bytes used to represent a {@code int} value in two's * The number of bytes used to represent a {@code int} value in two's
...@@ -1513,5 +1514,5 @@ public final class Integer extends Number implements Comparable<Integer> { ...@@ -1513,5 +1514,5 @@ public final class Integer extends Number implements Comparable<Integer> {
} }
/** use serialVersionUID from JDK 1.0.2 for interoperability */ /** use serialVersionUID from JDK 1.0.2 for interoperability */
private static final long serialVersionUID = 1360826667806852920L; @Native private static final long serialVersionUID = 1360826667806852920L;
} }
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
package java.lang; package java.lang;
import java.lang.annotation.Native;
import java.math.*; import java.math.*;
/** /**
...@@ -54,13 +55,13 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -54,13 +55,13 @@ public final class Long extends Number implements Comparable<Long> {
* A constant holding the minimum value a {@code long} can * A constant holding the minimum value a {@code long} can
* have, -2<sup>63</sup>. * have, -2<sup>63</sup>.
*/ */
public static final long MIN_VALUE = 0x8000000000000000L; @Native public static final long MIN_VALUE = 0x8000000000000000L;
/** /**
* A constant holding the maximum value a {@code long} can * A constant holding the maximum value a {@code long} can
* have, 2<sup>63</sup>-1. * have, 2<sup>63</sup>-1.
*/ */
public static final long MAX_VALUE = 0x7fffffffffffffffL; @Native public static final long MAX_VALUE = 0x7fffffffffffffffL;
/** /**
* The {@code Class} instance representing the primitive type * The {@code Class} instance representing the primitive type
...@@ -1317,7 +1318,7 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1317,7 +1318,7 @@ public final class Long extends Number implements Comparable<Long> {
* *
* @since 1.5 * @since 1.5
*/ */
public static final int SIZE = 64; @Native public static final int SIZE = 64;
/** /**
* The number of bytes used to represent a {@code long} value in two's * The number of bytes used to represent a {@code long} value in two's
...@@ -1540,5 +1541,5 @@ public final class Long extends Number implements Comparable<Long> { ...@@ -1540,5 +1541,5 @@ public final class Long extends Number implements Comparable<Long> {
} }
/** use serialVersionUID from JDK 1.0.2 for interoperability */ /** use serialVersionUID from JDK 1.0.2 for interoperability */
private static final long serialVersionUID = 4290774380558885855L; @Native private static final long serialVersionUID = 4290774380558885855L;
} }
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
package java.net; package java.net;
import java.lang.annotation.Native;
/** /**
* Interface of methods to get/set socket options. This interface is * Interface of methods to get/set socket options. This interface is
* implemented by: <B>SocketImpl</B> and <B>DatagramSocketImpl</B>. * implemented by: <B>SocketImpl</B> and <B>DatagramSocketImpl</B>.
...@@ -137,7 +139,7 @@ public interface SocketOptions { ...@@ -137,7 +139,7 @@ public interface SocketOptions {
* @see Socket#getTcpNoDelay * @see Socket#getTcpNoDelay
*/ */
public final static int TCP_NODELAY = 0x0001; @Native public final static int TCP_NODELAY = 0x0001;
/** /**
* Fetch the local address binding of a socket (this option cannot * Fetch the local address binding of a socket (this option cannot
...@@ -158,7 +160,7 @@ public interface SocketOptions { ...@@ -158,7 +160,7 @@ public interface SocketOptions {
* @see DatagramSocket#getLocalAddress * @see DatagramSocket#getLocalAddress
*/ */
public final static int SO_BINDADDR = 0x000F; @Native public final static int SO_BINDADDR = 0x000F;
/** Sets SO_REUSEADDR for a socket. This is used only for MulticastSockets /** Sets SO_REUSEADDR for a socket. This is used only for MulticastSockets
* in java, and it is set by default for MulticastSockets. * in java, and it is set by default for MulticastSockets.
...@@ -166,7 +168,7 @@ public interface SocketOptions { ...@@ -166,7 +168,7 @@ public interface SocketOptions {
* Valid for: DatagramSocketImpl * Valid for: DatagramSocketImpl
*/ */
public final static int SO_REUSEADDR = 0x04; @Native public final static int SO_REUSEADDR = 0x04;
/** /**
* Sets SO_BROADCAST for a socket. This option enables and disables * Sets SO_BROADCAST for a socket. This option enables and disables
...@@ -177,7 +179,7 @@ public interface SocketOptions { ...@@ -177,7 +179,7 @@ public interface SocketOptions {
* @since 1.4 * @since 1.4
*/ */
public final static int SO_BROADCAST = 0x0020; @Native public final static int SO_BROADCAST = 0x0020;
/** Set which outgoing interface on which to send multicast packets. /** Set which outgoing interface on which to send multicast packets.
* Useful on hosts with multiple network interfaces, where applications * Useful on hosts with multiple network interfaces, where applications
...@@ -189,7 +191,7 @@ public interface SocketOptions { ...@@ -189,7 +191,7 @@ public interface SocketOptions {
* @see MulticastSocket#getInterface() * @see MulticastSocket#getInterface()
*/ */
public final static int IP_MULTICAST_IF = 0x10; @Native public final static int IP_MULTICAST_IF = 0x10;
/** Same as above. This option is introduced so that the behaviour /** Same as above. This option is introduced so that the behaviour
* with IP_MULTICAST_IF will be kept the same as before, while * with IP_MULTICAST_IF will be kept the same as before, while
...@@ -201,7 +203,7 @@ public interface SocketOptions { ...@@ -201,7 +203,7 @@ public interface SocketOptions {
* @see MulticastSocket#getNetworkInterface() * @see MulticastSocket#getNetworkInterface()
* @since 1.4 * @since 1.4
*/ */
public final static int IP_MULTICAST_IF2 = 0x1f; @Native public final static int IP_MULTICAST_IF2 = 0x1f;
/** /**
* This option enables or disables local loopback of multicast datagrams. * This option enables or disables local loopback of multicast datagrams.
...@@ -209,7 +211,7 @@ public interface SocketOptions { ...@@ -209,7 +211,7 @@ public interface SocketOptions {
* @since 1.4 * @since 1.4
*/ */
public final static int IP_MULTICAST_LOOP = 0x12; @Native public final static int IP_MULTICAST_LOOP = 0x12;
/** /**
* This option sets the type-of-service or traffic class field * This option sets the type-of-service or traffic class field
...@@ -217,7 +219,7 @@ public interface SocketOptions { ...@@ -217,7 +219,7 @@ public interface SocketOptions {
* @since 1.4 * @since 1.4
*/ */
public final static int IP_TOS = 0x3; @Native public final static int IP_TOS = 0x3;
/** /**
* Specify a linger-on-close timeout. This option disables/enables * Specify a linger-on-close timeout. This option disables/enables
...@@ -235,7 +237,7 @@ public interface SocketOptions { ...@@ -235,7 +237,7 @@ public interface SocketOptions {
* @see Socket#setSoLinger * @see Socket#setSoLinger
* @see Socket#getSoLinger * @see Socket#getSoLinger
*/ */
public final static int SO_LINGER = 0x0080; @Native public final static int SO_LINGER = 0x0080;
/** Set a timeout on blocking Socket operations: /** Set a timeout on blocking Socket operations:
* <PRE> * <PRE>
...@@ -256,7 +258,7 @@ public interface SocketOptions { ...@@ -256,7 +258,7 @@ public interface SocketOptions {
* @see ServerSocket#setSoTimeout * @see ServerSocket#setSoTimeout
* @see DatagramSocket#setSoTimeout * @see DatagramSocket#setSoTimeout
*/ */
public final static int SO_TIMEOUT = 0x1006; @Native public final static int SO_TIMEOUT = 0x1006;
/** /**
* Set a hint the size of the underlying buffers used by the * Set a hint the size of the underlying buffers used by the
...@@ -273,7 +275,7 @@ public interface SocketOptions { ...@@ -273,7 +275,7 @@ public interface SocketOptions {
* @see DatagramSocket#setSendBufferSize * @see DatagramSocket#setSendBufferSize
* @see DatagramSocket#getSendBufferSize * @see DatagramSocket#getSendBufferSize
*/ */
public final static int SO_SNDBUF = 0x1001; @Native public final static int SO_SNDBUF = 0x1001;
/** /**
* Set a hint the size of the underlying buffers used by the * Set a hint the size of the underlying buffers used by the
...@@ -291,7 +293,7 @@ public interface SocketOptions { ...@@ -291,7 +293,7 @@ public interface SocketOptions {
* @see DatagramSocket#setReceiveBufferSize * @see DatagramSocket#setReceiveBufferSize
* @see DatagramSocket#getReceiveBufferSize * @see DatagramSocket#getReceiveBufferSize
*/ */
public final static int SO_RCVBUF = 0x1002; @Native public final static int SO_RCVBUF = 0x1002;
/** /**
* When the keepalive option is set for a TCP socket and no data * When the keepalive option is set for a TCP socket and no data
...@@ -314,7 +316,7 @@ public interface SocketOptions { ...@@ -314,7 +316,7 @@ public interface SocketOptions {
* @see Socket#setKeepAlive * @see Socket#setKeepAlive
* @see Socket#getKeepAlive * @see Socket#getKeepAlive
*/ */
public final static int SO_KEEPALIVE = 0x0008; @Native public final static int SO_KEEPALIVE = 0x0008;
/** /**
* When the OOBINLINE option is set, any TCP urgent data received on * When the OOBINLINE option is set, any TCP urgent data received on
...@@ -325,5 +327,5 @@ public interface SocketOptions { ...@@ -325,5 +327,5 @@ public interface SocketOptions {
* @see Socket#setOOBInline * @see Socket#setOOBInline
* @see Socket#getOOBInline * @see Socket#getOOBInline
*/ */
public final static int SO_OOBINLINE = 0x1003; @Native public final static int SO_OOBINLINE = 0x1003;
} }
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
package sun.nio.ch; package sun.nio.ch;
import java.lang.annotation.Native;
// Constants for reporting I/O status // Constants for reporting I/O status
...@@ -32,12 +33,12 @@ public final class IOStatus { ...@@ -32,12 +33,12 @@ public final class IOStatus {
private IOStatus() { } private IOStatus() { }
public static final int EOF = -1; // End of file @Native public static final int EOF = -1; // End of file
public static final int UNAVAILABLE = -2; // Nothing available (non-blocking) @Native public static final int UNAVAILABLE = -2; // Nothing available (non-blocking)
public static final int INTERRUPTED = -3; // System call interrupted @Native public static final int INTERRUPTED = -3; // System call interrupted
public static final int UNSUPPORTED = -4; // Operation not supported @Native public static final int UNSUPPORTED = -4; // Operation not supported
public static final int THROWN = -5; // Exception thrown in JNI code @Native public static final int THROWN = -5; // Exception thrown in JNI code
public static final int UNSUPPORTED_CASE = -6; // This case not supported @Native public static final int UNSUPPORTED_CASE = -6; // This case not supported
// The following two methods are for use in try/finally blocks where a // The following two methods are for use in try/finally blocks where a
// status value needs to be normalized before being returned to the invoker // status value needs to be normalized before being returned to the invoker
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
package sun.nio.ch; package sun.nio.ch;
import java.lang.annotation.Native;
/** /**
* Manipulates a native array of structs corresponding to (fd, events) pairs. * Manipulates a native array of structs corresponding to (fd, events) pairs.
* *
...@@ -46,19 +48,19 @@ class PollArrayWrapper { ...@@ -46,19 +48,19 @@ class PollArrayWrapper {
long pollArrayAddress; // pollArrayAddress long pollArrayAddress; // pollArrayAddress
private static final short FD_OFFSET = 0; // fd offset in pollfd @Native private static final short FD_OFFSET = 0; // fd offset in pollfd
private static final short EVENT_OFFSET = 4; // events offset in pollfd @Native private static final short EVENT_OFFSET = 4; // events offset in pollfd
static short SIZE_POLLFD = 8; // sizeof pollfd struct static short SIZE_POLLFD = 8; // sizeof pollfd struct
// events masks // events masks
static final short POLLIN = AbstractPollArrayWrapper.POLLIN; @Native static final short POLLIN = AbstractPollArrayWrapper.POLLIN;
static final short POLLOUT = AbstractPollArrayWrapper.POLLOUT; @Native static final short POLLOUT = AbstractPollArrayWrapper.POLLOUT;
static final short POLLERR = AbstractPollArrayWrapper.POLLERR; @Native static final short POLLERR = AbstractPollArrayWrapper.POLLERR;
static final short POLLHUP = AbstractPollArrayWrapper.POLLHUP; @Native static final short POLLHUP = AbstractPollArrayWrapper.POLLHUP;
static final short POLLNVAL = AbstractPollArrayWrapper.POLLNVAL; @Native static final short POLLNVAL = AbstractPollArrayWrapper.POLLNVAL;
static final short POLLREMOVE = AbstractPollArrayWrapper.POLLREMOVE; @Native static final short POLLREMOVE = AbstractPollArrayWrapper.POLLREMOVE;
static final short POLLCONN = 0x0002; @Native static final short POLLCONN = 0x0002;
private int size; // Size of the pollArray private int size; // Size of the pollArray
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册