提交 5478410f 编写于 作者: D dholmes

Merge

...@@ -68,24 +68,25 @@ else ...@@ -68,24 +68,25 @@ else
endif endif
JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR) ! -type d) JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR) ! -type d) JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR),$(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 $(JRE_IMAGE_DIR),$(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, remove -L
# Copy empty directories (jre/lib/applet).
$(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/% $(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 '$<' '$@' if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -L '$<' '$@'; fi
$(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/% $(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 '$<' '$@' if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -L '$<' '$@'; fi
$(JDK_BUNDLE_DIR)/MacOS/libjli.dylib: $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
$(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
......
...@@ -317,7 +317,7 @@ ifeq ($(OPENJDK_TARGET_CPU_BITS),32) ...@@ -317,7 +317,7 @@ ifeq ($(OPENJDK_TARGET_CPU_BITS),32)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $(JVMCFG) $(RM) $(JVMCFG)
$(PRINTF) "-client KNOWN\n">$(JVMCFG) $(PRINTF) "-client KNOWN\n">$(JVMCFG)
$(PRINTF) "-server IGNORE\n">>$(JVMCFG) $(PRINTF) "-server ALIASED_TO -client\n">>$(JVMCFG)
$(PRINTF) "-hotspot ALIASED_TO -client\n">>$(JVMCFG) $(PRINTF) "-hotspot ALIASED_TO -client\n">>$(JVMCFG)
$(PRINTF) "-classic WARN\n">>$(JVMCFG) $(PRINTF) "-classic WARN\n">>$(JVMCFG)
$(PRINTF) "-native ERROR\n">>$(JVMCFG) $(PRINTF) "-native ERROR\n">>$(JVMCFG)
......
...@@ -68,7 +68,7 @@ BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/%.java) \ ...@@ -68,7 +68,7 @@ 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_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) $(JDK_OUTPUTDIR)/gensrc/javax/swing/SwingBeanInfoBase.java $(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS) $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/SwingBeanInfoBase.java $(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS)
$(ECHO) Generating beaninfo $(ECHO) Generating beaninfo
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing $(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing
$(JAVA) -Djava.awt.headless=true -jar $(JAVADOC_JARS) -doclet GenDocletBeanInfo \ $(JAVA) -Djava.awt.headless=true -jar $(JAVADOC_JARS) -doclet GenDocletBeanInfo \
...@@ -84,7 +84,7 @@ $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) $(JDK_OU ...@@ -84,7 +84,7 @@ $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) $(JDK_OU
# 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/javax/swing # 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?
$(JDK_OUTPUTDIR)/gensrc/javax/swing/SwingBeanInfoBase.java: $(DOCLETSRC_DIR)/javax/swing/SwingBeanInfoBase.java $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/SwingBeanInfoBase.java: $(DOCLETSRC_DIR)/javax/swing/SwingBeanInfoBase.java
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) $< $@ $(CP) $< $@
......
...@@ -23,84 +23,95 @@ ...@@ -23,84 +23,95 @@
# questions. # questions.
# #
# This file is responsible for extracting the x11 native struct offsets to # This file is responsible for extracting the x11 native struct offsets to
# the xawt Java library. This is done by compiling and running a native # the xawt Java library. The tool needs to be run on the os/arch that
# binary, which dumps output to a text file. The offsets differ on 32 and 64 # will host the final jvm, thus the tool cannot be used when cross compiling.
# bit systems, so care must be taken here.
# To enable cross compiling, the two versions of the generated offset file,
# sizes.32 and sizes.64 are committed into the source code repository.
# These are the ones used.
# Note: Some of the more complex logic here is most likely not needed anymore. # However when not cross compiling, the offset generator tool is built and
# run, to verify that it still generates the same sizes.32 and sizes.64.
GENSRC_X11WRAPPERS := GENSRC_X11WRAPPERS :=
# Put temporary c-code and executable to calculate offsets here.
# Also put verification offset file here as well.
GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc # Put the generated Java classes used to interface X11 from awt here.
GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc/sun/awt/X11
GENSRC_SIZER_SRC := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator # The pre-calculated offset file are stored here:
GENSRC_SIZER_DIR := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
# Normal case is to generate version according to target bits
GENSRC_SIZES := sizes.$(OPENJDK_TARGET_CPU_BITS)
# Normal case is to generate only according to target bits
GENSRC_X11_VERSION := $(OPENJDK_TARGET_CPU_BITS)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
ifneq ($(OPENJDK_TARGET_OS), linux) ifneq ($(OPENJDK_TARGET_OS), linux)
# On all 64-bit systems except Linux, generate both 32 and 64 bit versions # On all 64-bit systems except Linux, generate both 32 and 64 bit versions
GENSRC_SIZES := sizes.32 sizes.64 GENSRC_X11_VERSION := 32 64
endif endif
else else
ifeq ($(OPENJDK_TARGET_OS), solaris) ifeq ($(OPENJDK_TARGET_OS), solaris)
# As a special case, solaris 32-bit also generates the 64-bit version # As a special case, solaris 32-bit also generates the 64-bit version
GENSRC_SIZES := sizes.32 sizes.64 GENSRC_X11_VERSION := 32 64
endif endif
endif endif
########################################################################################## GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes.,$(GENSRC_X11_VERSION))
# Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
# file prefix it is given so those not needed need to be hidden.
$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
$(MKDIR) -p $(@D)
$(RM) '$@'
$(SORT) $< > $@
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt $(BUILD_TOOLS) # Run the tool on the offset files copied from the source repository to generate several Java classes
# used in awt.
$(JDK_OUTPUTDIR)/gensrc/_the.generated.x11 : $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS)
$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
$(TOUCH) $@
GENSRC_X11WRAPPERS += $(JDK_OUTPUTDIR)/gensrc/_the.generated.x11
ifneq ($(COMPILE_TYPE),cross)
# This is not a cross compile, regenerate the offset file, so that we
# can compare it with the version in the source code repository.
# Generate the C code for the program that will output the offset file.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.c : $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS)
$(ECHO) "Generating X11 wrapper ($*-bit version)" $(ECHO) "Generating X11 wrapper ($*-bit version)"
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $@ $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
$(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c # Compile the C code into an executable.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $@ $@.tmp (cd $(@D) && $(CC) -m$* -o $@ $< \
(cd $(@D) && $(BUILD_CC) -m$* -o $@.tmp $< \
$(X_CFLAGS) \ $(X_CFLAGS) \
$(X_LIBS) \ $(X_LIBS) \
-I$(JDK_OUTPUTDIR)/include \ -I$(JDK_OUTPUTDIR)/include \
-I$(JDK_TOPDIR)/src/share/javavm/export \ -I$(JDK_TOPDIR)/src/share/javavm/export \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \ -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
-I$(JDK_TOPDIR)//src/share/native/common \ -I$(JDK_TOPDIR)/src/share/native/common \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \ -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
-I$(JDK_TOPDIR)/src/solaris/native/sun/awt \ -I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \ -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc) -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
$(MV) $@.tmp $@
# Run the generated sizer binary to create the sizes text file .PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.% : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe
$(MKDIR) -p $(@D) # Run the executable create the offset file and check that it is identical
$(RM) $@ $@.tmp # to the offset file in the source code repository.
$< > $@.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification : $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
$(MV) $@.tmp $@
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-x86)
# On solaris-x86 we also need to create the 64-bit version, but we can't run a 64-bit binary
# As a workaround, copy this from a pre-generated file.
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator/sizes.64-solaris-i386
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $@ $(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
$(CP) $< $@ $(ECHO) Verifying $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp to $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
endif $(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
mv $@.tmp $@
$(GENSRC_X11WRAPPERS_DST)/_the.generated.x11 : $(foreach S,$(GENSRC_SIZES),$(GENSRC_X11WRAPPERS_TMP)/sizer/$(S)) $(BUILD_TOOLS) GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/sizes.$(OPENJDK_TARGET_CPU_BITS).verification
$(RM) $@
$(MKDIR) -p $(@D)/sun/awt/X11
$(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-x86_64)
# On solaris-x86_64, as a safety measure, compare the generated file with the checked-in version
$(ECHO) COMPARING $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 and $(GENSRC_SIZER_SRC)/sizes.64-solaris-i386
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 $(GENSRC_SIZER_SRC)/sizes.64-solaris-i386
endif endif
$(TOUCH) $@
GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_DST)/_the.generated.x11
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册