55881
|
1 |
#
|
|
2 |
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
#
|
|
5 |
# This code is free software; you can redistribute it and/or modify it
|
|
6 |
# under the terms of the GNU General Public License version 2 only, as
|
|
7 |
# published by the Free Software Foundation. Oracle designates this
|
|
8 |
# particular file as subject to the "Classpath" exception as provided
|
|
9 |
# by Oracle in the LICENSE file that accompanied this code.
|
|
10 |
#
|
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
# accompanied this code).
|
|
16 |
#
|
|
17 |
# You should have received a copy of the GNU General Public License version
|
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
#
|
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
# or visit www.oracle.com if you need additional information or have any
|
|
23 |
# questions.
|
|
24 |
#
|
|
25 |
|
|
26 |
# Fake minimalistic spec file for RunTestsPrebuilt.gmk.
|
|
27 |
|
|
28 |
define VerifyVariable
|
|
29 |
ifeq ($$($1), )
|
|
30 |
$$(info Error: Variable $1 is missing, needed for run-tests-prebuilt)
|
|
31 |
$$(error Cannot continue.)
|
|
32 |
else
|
|
33 |
ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
|
|
34 |
$$(info Prebuilt variable $1=$$($1))
|
|
35 |
endif
|
|
36 |
endif
|
|
37 |
endef
|
|
38 |
|
|
39 |
$(eval $(call VerifyVariable,TOPDIR))
|
|
40 |
$(eval $(call VerifyVariable,BOOT_JDK))
|
|
41 |
$(eval $(call VerifyVariable,OUTPUT_ROOT))
|
|
42 |
$(eval $(call VerifyVariable,JDK_IMAGE_DIR))
|
|
43 |
$(eval $(call VerifyVariable,TEST_IMAGE_DIR))
|
|
44 |
$(eval $(call VerifyVariable,JT_HOME))
|
|
45 |
$(eval $(call VerifyVariable,TONGA_JAR))
|
|
46 |
|
|
47 |
|
|
48 |
# These are old aliases that have not yet been fully removed
|
|
49 |
BUILD_OUTPUT := $(OUTPUT_ROOT)
|
|
50 |
SRC_ROOT := $(TOPDIR)
|
|
51 |
|
|
52 |
# FIXMEs
|
|
53 |
|
|
54 |
# verify that we have:
|
|
55 |
# MAKE
|
|
56 |
# BASH
|
|
57 |
|
|
58 |
#SPEC :=
|
|
59 |
FIXPATH :=
|
|
60 |
CYGPATH := cygpath
|
|
61 |
|
|
62 |
|
|
63 |
###FIXME
|
|
64 |
# colon or semicolon
|
|
65 |
PATH_SEP:=:
|
|
66 |
|
|
67 |
|
|
68 |
LOG_LEVEL=info
|
|
69 |
#LOG_LEVEL=$(LOG_LEVEL)
|
|
70 |
#MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS)
|
|
71 |
|
|
72 |
# The built jdk will run in this target system.
|
|
73 |
|
|
74 |
OPENJDK_TARGET_OS:=linux
|
|
75 |
OPENJDK_TARGET_OS_TYPE:=unix
|
|
76 |
OPENJDK_TARGET_OS_ENV:=linux
|
|
77 |
|
|
78 |
OPENJDK_TARGET_CPU:=x86_64
|
|
79 |
OPENJDK_TARGET_CPU_ARCH:=x86
|
|
80 |
OPENJDK_TARGET_CPU_BITS:=64
|
|
81 |
OPENJDK_TARGET_CPU_ENDIAN:=little
|
|
82 |
|
|
83 |
#DEBUG_LEVEL:=@DEBUG_LEVEL@
|
|
84 |
#HOTSPOT_DEBUG_LEVEL:=@HOTSPOT_DEBUG_LEVEL@
|
|
85 |
|
|
86 |
#BUILD_GTEST := @BUILD_GTEST@
|
|
87 |
|
|
88 |
### FIXME
|
|
89 |
BUILD_FAILURE_HANDLER := true
|
|
90 |
|
|
91 |
### FIXME
|
|
92 |
# Information about the build system
|
|
93 |
NUM_CORES:=16
|
|
94 |
MEMORY_SIZE:=28130
|
|
95 |
|
|
96 |
## FIXME
|
|
97 |
# Number of parallel jobs to use for compilation
|
|
98 |
JOBS?=16
|
|
99 |
TEST_JOBS?=0
|
|
100 |
|
|
101 |
#### custom
|
|
102 |
TONGA_JAR := @TONGA_JAR@
|
|
103 |
|
|
104 |
################################################################################
|
|
105 |
|
|
106 |
|
|
107 |
# SPACE and COMMA are defined in MakeBase.gmk, but they are also used in
|
|
108 |
# some definitions here, and are needed if MakeBase.gmk is not included before
|
|
109 |
# this file.
|
|
110 |
X:=
|
|
111 |
SPACE:=$(X) $(X)
|
|
112 |
COMMA:=,
|
|
113 |
|
|
114 |
# The default make arguments
|
|
115 |
MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
|
|
116 |
MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL)
|
|
117 |
|
|
118 |
# Override the shell with bash
|
|
119 |
BASH_ARGS := -o pipefail -e
|
|
120 |
SHELL:=$(BASH) $(BASH_ARGS)
|
|
121 |
|
|
122 |
# The "human readable" name of this configuration
|
|
123 |
CONF_NAME := run-test-prebuilt
|
|
124 |
|
|
125 |
# Assume target platform is same as build platform
|
|
126 |
OPENJDK_TARGET_OS := $(OPENJDK_BUILD_OS)
|
|
127 |
OPENJDK_TARGET_OS_TYPE := $(OPENJDK_BUILD_OS_TYPE)
|
|
128 |
OPENJDK_TARGET_OS_ENV := $(OPENJDK_BUILD_OS_ENV)
|
|
129 |
|
|
130 |
OPENJDK_TARGET_CPU := $(OPENJDK_BUILD_CPU)
|
|
131 |
OPENJDK_TARGET_CPU_ARCH := $(OPENJDK_BUILD_CPU_ARCH)
|
|
132 |
OPENJDK_TARGET_CPU_BITS := $(OPENJDK_BUILD_CPU_BITS)
|
|
133 |
OPENJDK_TARGET_CPU_ENDIAN := $(OPENJDK_BUILD_CPU_ENDIAN)
|
|
134 |
|
|
135 |
# FIXME: Can we remove this?
|
|
136 |
HOTSPOT_TOPDIR:=$(TOPDIR)/hotspot
|
|
137 |
|
|
138 |
SUPPORT_OUTPUTDIR := $(OUTPUT_ROOT)/support
|
|
139 |
BUILDTOOLS_OUTPUTDIR := $(OUTPUT_ROOT)/buildtools
|
|
140 |
|
|
141 |
HOTSPOT_OUTPUTDIR := $(OUTPUT_ROOT)/hotspot
|
|
142 |
JDK_OUTPUTDIR := $(OUTPUT_ROOT)/jdk
|
|
143 |
IMAGES_OUTPUTDIR := $(OUTPUT_ROOT)/images
|
|
144 |
BUNDLES_OUTPUTDIR := $(OUTPUT_ROOT)/bundles
|
|
145 |
TESTMAKE_OUTPUTDIR := $(OUTPUT_ROOT)/test-make
|
|
146 |
MAKESUPPORT_OUTPUTDIR := $(OUTPUT_ROOT)/make-support
|
|
147 |
BUILDJDK_OUTPUTDIR := $(OUTPUT_ROOT)/buildjdk
|
|
148 |
|
|
149 |
### FIXME?
|
|
150 |
#JAVA_FLAGS:= -Duser.language=en -Duser.country=US
|
|
151 |
#JAVA_FLAGS_BIG:= -Xms64M -Xmx1600M -XX:ThreadStackSize=1536
|
|
152 |
#JAVA_FLAGS_SMALL:= -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
|
|
153 |
#JAVA_FLAGS_JAVAC:= -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
|
|
154 |
#JAVA_TOOL_FLAGS_SMALL:= -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J-XX:TieredStopAtLevel=1
|
|
155 |
|
|
156 |
JAVA_CMD:=$(BOOT_JDK)/bin/java
|
|
157 |
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
|
|
158 |
JAVAH_CMD:=$(BOOT_JDK)/bin/javah
|
|
159 |
JAR_CMD:=$(BOOT_JDK)/bin/jar
|
|
160 |
JLINK_CMD := $(JDK_OUTPUTDIR)/bin/jlink
|
|
161 |
JMOD_CMD := $(JDK_OUTPUTDIR)/bin/jmod
|
|
162 |
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
|
|
163 |
|
|
164 |
# These variables are meant to be used. They are defined with = instead of := to make
|
|
165 |
# it possible to override only the *_CMD variables.
|
|
166 |
JAVA=$(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
|
167 |
JAVA_SMALL=$(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
|
168 |
JAVA_JAVAC=$(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
|
|
169 |
JAVAC=$(FIXPATH) $(JAVAC_CMD)
|
|
170 |
JAVAH=$(FIXPATH) $(JAVAH_CMD)
|
|
171 |
JAR=$(FIXPATH) $(JAR_CMD)
|
|
172 |
JLINK = $(FIXPATH) $(JLINK_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
|
173 |
JMOD = $(FIXPATH) $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
|
174 |
JARSIGNER=$(FIXPATH) $(JARSIGNER_CMD)
|
|
175 |
|
|
176 |
# Tools adhering to a minimal and common standard of posix compliance.
|
|
177 |
AWK := awk
|
|
178 |
BASENAME := basename
|
|
179 |
CAT := cat
|
|
180 |
CD := cd
|
|
181 |
CHMOD := chmod
|
|
182 |
CP := cp
|
|
183 |
CUT := cut
|
|
184 |
DATE := date
|
|
185 |
DIFF := diff
|
|
186 |
DIRNAME := dirname
|
|
187 |
FIND := find
|
|
188 |
FIND_DELETE := -delete
|
|
189 |
ECHO := echo
|
|
190 |
EGREP := grep -E
|
|
191 |
FGREP := grep -F
|
|
192 |
GREP := grep
|
|
193 |
GZIP := gzip
|
|
194 |
HEAD := head
|
|
195 |
LS := ls
|
|
196 |
LN := ln
|
|
197 |
MKDIR := mkdir
|
|
198 |
MV := mv
|
|
199 |
NAWK := nawk
|
|
200 |
NICE := nice
|
|
201 |
PATCH := patch
|
|
202 |
PRINTF := printf
|
|
203 |
RM := rm -f
|
|
204 |
RMDIR := rmdir
|
|
205 |
SED := sed
|
|
206 |
SH := sh
|
|
207 |
SORT := sort
|
|
208 |
TAR := tar
|
|
209 |
TAIL := tail
|
|
210 |
TEE := tee
|
|
211 |
TR := tr
|
|
212 |
TOUCH := touch
|
|
213 |
UNIQ := uniq
|
|
214 |
WC := wc
|
|
215 |
XARGS := xargs
|
|
216 |
ZIPEXE := zip
|
|
217 |
UNZIP := unzip
|
|
218 |
EXPR := expr
|
|
219 |
FILE := file
|
|
220 |
HG := hg
|
|
221 |
|
|
222 |
####################################################
|
|
223 |
#
|
|
224 |
# Misc
|
|
225 |
#
|
|
226 |
|
|
227 |
JRE_IMAGE_DIR := $(JDK_IMAGE_DIR)
|