annotate make/UpdateX11Wrappers.gmk @ 51872:0ce279d8c9cd

8207941: javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java fails on machines without Arial font [testbug] Reviewed-by: goetz, psadhukhan
author mbaesken
date Tue, 24 Jul 2018 09:27:42 +0200
parents a5b237cfccef
children ecc2bcc3beb0
rev   line source
erikj@12892 1 #
ihse@49564 2 # Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
erikj@12892 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
erikj@12892 4 #
erikj@12892 5 # This code is free software; you can redistribute it and/or modify it
erikj@12892 6 # under the terms of the GNU General Public License version 2 only, as
erikj@12892 7 # published by the Free Software Foundation. Oracle designates this
erikj@12892 8 # particular file as subject to the "Classpath" exception as provided
erikj@12892 9 # by Oracle in the LICENSE file that accompanied this code.
erikj@12892 10 #
erikj@12892 11 # This code is distributed in the hope that it will be useful, but WITHOUT
erikj@12892 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
erikj@12892 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
erikj@12892 14 # version 2 for more details (a copy is included in the LICENSE file that
erikj@12892 15 # accompanied this code).
erikj@12892 16 #
erikj@12892 17 # You should have received a copy of the GNU General Public License version
erikj@12892 18 # 2 along with this work; if not, write to the Free Software Foundation,
erikj@12892 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
erikj@12892 20 #
erikj@12892 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
erikj@12892 22 # or visit www.oracle.com if you need additional information or have any
erikj@12892 23 # questions.
erikj@12892 24 #
erikj@12892 25
ihse@49564 26 ################################################################################
ihse@49564 27
ihse@49564 28 default: all
ihse@49564 29
ihse@49564 30 include $(SPEC)
ihse@49564 31 include MakeBase.gmk
ihse@49564 32 include NativeCompilation.gmk
ihse@49564 33 include ToolsJdk.gmk
ihse@49564 34
ihse@49564 35 ################################################################################
erikj@15149 36 # This file is responsible for extracting the x11 native struct offsets to
erikj@15149 37 # the xawt Java library. The tool needs to be run on the os/arch that
erikj@15149 38 # will host the final jvm, thus the tool cannot be used when cross compiling.
ihse@49564 39 #
ihse@49564 40 # Two versions of the generated offset file, sizes-32.txt and sizes-64.txt are
ihse@49564 41 # committed into the source code repository. These are the ones used in
ihse@49564 42 # GensrcX11Wrappers.gmk to generate the Java code during the build.
ihse@49564 43 ################################################################################
ohair@13702 44
ihse@49564 45 ifeq ($(COMPILE_TYPE), cross)
ihse@49564 46 $(error It is not possible to update the x11wrappers when cross-compiling)
ohair@13702 47 endif
erikj@12892 48
ihse@49564 49 X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
erikj@12892 50
ihse@49564 51 GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
ihse@49564 52
ihse@49564 53 BITS := $(OPENJDK_TARGET_CPU_BITS)
ihse@49564 54
ihse@49564 55 # Generate the C code for the program that will output the offset file.
ihse@49564 56 $(X11WRAPPERS_OUTPUT)/src/data_generator.c: $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
ihse@49564 57 $(call LogInfo, Generating X11 wrapper data generator source code)
erikj@35241 58 $(call MakeDir, $(@D))
ihse@49564 59 $(call ExecuteWithLog, $@, \
ihse@49564 60 $(TOOL_WRAPPERGENERATOR) gen_c_source $@ $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS))
erikj@15149 61
ihse@49564 62 DATA_GENERATOR_INCLUDES := \
ihse@49564 63 -I$(TOPDIR)/src/hotspot/share/include \
ihse@49564 64 -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
ihse@49564 65 -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
ihse@49564 66 -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
ihse@49564 67 -I$(TOPDIR)/src/java.base/share/native/libjava \
ihse@49564 68 -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
ihse@49564 69 -I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
ihse@49564 70 -I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \
ihse@49564 71 -I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
ihse@49564 72 #
erikj@15149 73
ihse@49564 74 # Compile the generated C code into an executable.
ihse@49564 75 $(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \
ihse@49564 76 PROGRAM := data_generator, \
ihse@49564 77 OUTPUT_DIR := $(X11WRAPPERS_OUTPUT)/bin, \
ihse@49564 78 EXTRA_FILES := $(X11WRAPPERS_OUTPUT)/src/data_generator.c, \
ihse@49564 79 CFLAGS := $(X_CFLAGS) $(DATA_GENERATOR_INCLUDES) $(CFLAGS_JDKEXE), \
ihse@49564 80 LDFLAGS := $(LDFLAGS_JDKEXE), \
ihse@49672 81 LIBS := $(X_LIBS), \
ihse@49564 82 OBJECT_DIR := $(X11WRAPPERS_OUTPUT)/objs, \
ihse@49564 83 ))
erikj@15149 84
ihse@49564 85 # Run the executable to create the data file.
ihse@49564 86 $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt: $(BUILD_DATA_GENERATOR_TARGET)
ihse@49564 87 $(call LogInfo, Generating X11 wrapper data files)
ihse@49564 88 $(call MakeDir, $(@D))
ihse@49564 89 $(call ExecuteWithLog, $(X11WRAPPERS_OUTPUT)/generation, \
ihse@49564 90 $(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $@)
ihse@49564 91 $(ECHO) IMPORTANT: If you update the X11 wrapper data files, they most certainly
ihse@49564 92 $(ECHO) need to be updated for both 32 and 64 bit platforms. You have now
ihse@49564 93 $(ECHO) updated them for $(BITS) bit platforms only.
erikj@15149 94
ihse@49564 95 TARGETS += $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
erikj@12892 96
ihse@49564 97 ################################################################################
omajid@17046 98
ihse@49564 99 all: $(TARGETS)
chegar@25859 100
ihse@49564 101 .PHONY: all default