Mercurial > hg > truffle
annotate make/linux/makefiles/buildtree.make @ 2151:cb913d743d09
Merge
author | johnc |
---|---|
date | Wed, 19 Jan 2011 13:04:37 -0800 |
parents | aa6e219afbf1 |
children | 5d801e6b9a80 b92c45f2bc75 |
rev | line source |
---|---|
0 | 1 # |
1972 | 2 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 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. | |
8 # | |
9 # This code is distributed in the hope that it will be useful, but WITHOUT | |
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 # version 2 for more details (a copy is included in the LICENSE file that | |
13 # accompanied this code). | |
14 # | |
15 # You should have received a copy of the GNU General Public License version | |
16 # 2 along with this work; if not, write to the Free Software Foundation, | |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1010
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1010
diff
changeset
|
20 # or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1010
diff
changeset
|
21 # questions. |
0 | 22 # |
23 # | |
24 | |
25 # Usage: | |
26 # | |
27 # $(MAKE) -f buildtree.make ARCH=arch BUILDARCH=buildarch LIBARCH=libarch | |
28 # GAMMADIR=dir OS_FAMILY=os VARIANT=variant | |
29 # | |
30 # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the | |
31 # environment or on the command-line: | |
32 # | |
33 # ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory | |
34 # BUILDARCH - build directory | |
35 # LIBARCH - the corresponding directory in JDK/JRE | |
36 # GAMMADIR - top of workspace | |
37 # OS_FAMILY - operating system | |
38 # VARIANT - core, compiler1, compiler2, or tiered | |
39 # HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07) | |
1977
c7db7adb83b4
6987107: Add variable to add to but not modify non-fcs version string
ohair
parents:
1681
diff
changeset
|
40 # HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty |
0 | 41 # JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0) |
42 # | |
43 # Builds the directory trees with makefiles plus some convenience files in | |
44 # each directory: | |
45 # | |
46 # Makefile - for "make foo" | |
47 # flags.make - with macro settings | |
48 # vm.make - to support making "$(MAKE) -v vm.make" in makefiles | |
49 # adlc.make - | |
50 # jvmti.make - generate JVMTI bindings from the spec (JSR-163) | |
51 # sa.make - generate SA jar file and natives | |
52 # env.[ck]sh - environment settings | |
53 # test_gamma - script to run the Queens program | |
54 # | |
55 # The makefiles are split this way so that "make foo" will run faster by not | |
56 # having to read the dependency files for the vm. | |
57 | |
58 include $(GAMMADIR)/make/scm.make | |
59 | |
60 # 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details. | |
61 QUIETLY$(MAKE_VERBOSE) = @ | |
62 | |
63 # For now, until the compiler is less wobbly: | |
64 TESTFLAGS = -Xbatch -showversion | |
65 | |
1010 | 66 ifeq ($(ZERO_BUILD), true) |
67 PLATFORM_FILE = $(shell dirname $(shell dirname $(shell pwd)))/platform_zero | |
50
485d403e94e1
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
0
diff
changeset
|
68 else |
1010 | 69 ifdef USE_SUNCC |
70 PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH).suncc | |
71 else | |
72 PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH) | |
73 endif | |
74 endif | |
75 | |
76 # Allow overriding of the arch part of the directory but default | |
77 # to BUILDARCH if nothing is specified | |
78 ifeq ($(VARIANTARCH),) | |
79 VARIANTARCH=$(BUILDARCH) | |
50
485d403e94e1
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
0
diff
changeset
|
80 endif |
0 | 81 |
82 ifdef FORCE_TIERED | |
83 ifeq ($(VARIANT),tiered) | |
1010 | 84 PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_compiler2 |
0 | 85 else |
1010 | 86 PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_$(VARIANT) |
0 | 87 endif |
88 else | |
1010 | 89 PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_$(VARIANT) |
0 | 90 endif |
91 | |
92 # | |
93 # We do two levels of exclusion in the shared directory. | |
94 # TOPLEVEL excludes are pruned, they are not recursively searched, | |
95 # but lower level directories can be named without fear of collision. | |
96 # ALWAYS excludes are excluded at any level in the directory tree. | |
97 # | |
98 | |
99 ALWAYS_EXCLUDE_DIRS = $(SCM_DIRS) | |
100 | |
101 ifeq ($(VARIANT),tiered) | |
102 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name agent | |
103 else | |
104 ifeq ($(VARIANT),compiler2) | |
105 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name c1 -o -name agent | |
106 else | |
107 # compiler1 and core use the same exclude list | |
108 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name opto -o -name libadt -o -name agent | |
109 endif | |
110 endif | |
111 | |
112 # Get things from the platform file. | |
113 COMPILER = $(shell sed -n 's/^compiler[ ]*=[ ]*//p' $(PLATFORM_FILE)) | |
114 | |
115 SIMPLE_DIRS = \ | |
1972 | 116 $(PLATFORM_DIR)/generated/dependencies \ |
0 | 117 $(PLATFORM_DIR)/generated/adfiles \ |
118 $(PLATFORM_DIR)/generated/jvmtifiles | |
119 | |
120 TARGETS = debug fastdebug jvmg optimized product profiled | |
121 SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS)) | |
122 | |
123 # For dependencies and recursive makes. | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
124 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make |
0 | 125 |
126 BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make \ | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1978
diff
changeset
|
127 env.sh env.csh jdkpath.sh .dbxrc test_gamma |
0 | 128 |
129 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \ | |
130 ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT) | |
131 | |
132 # Define variables to be set in flags.make. | |
133 # Default values are set in make/defs.make. | |
134 ifeq ($(HOTSPOT_BUILD_VERSION),) | |
135 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION) | |
136 else | |
137 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION) | |
138 endif | |
139 # Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami) | |
140 ifndef HOTSPOT_BUILD_USER | |
141 HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME) | |
142 endif | |
143 ifndef HOTSPOT_BUILD_USER | |
144 HOTSPOT_BUILD_USER := $(shell whoami) | |
145 endif | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
146 # Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro |
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
147 # or make/hotspot_distro. |
0 | 148 ifndef HOTSPOT_VM_DISTRO |
149 CLOSED_DIR_EXISTS := $(shell \ | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
150 if [ -d $(GAMMADIR)/src/closed ] ; then \ |
0 | 151 echo true; \ |
152 else \ | |
153 echo false; \ | |
154 fi) | |
155 ifeq ($(CLOSED_DIR_EXISTS), true) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
156 include $(GAMMADIR)/make/hotspot_distro |
0 | 157 else |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
158 include $(GAMMADIR)/make/openjdk_distro |
0 | 159 endif |
160 endif | |
161 | |
162 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) | |
163 | |
164 BUILDTREE = \ | |
165 $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS) | |
166 | |
167 BUILDTREE_COMMENT = echo "\# Generated by $(BUILDTREE_MAKE)" | |
168 | |
169 all: $(SUBMAKE_DIRS) | |
170 | |
171 # Run make in each subdirectory recursively. | |
172 $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE | |
173 $(QUIETLY) [ -d $@ ] || { mkdir -p $@; } | |
174 $(QUIETLY) cd $@ && $(BUILDTREE) TARGET=$(@F) | |
175 $(QUIETLY) touch $@ | |
176 | |
177 $(SIMPLE_DIRS): | |
178 $(QUIETLY) mkdir -p $@ | |
179 | |
180 flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst | |
181 @echo Creating $@ ... | |
182 $(QUIETLY) ( \ | |
183 $(BUILDTREE_COMMENT); \ | |
184 echo; \ | |
185 echo "Platform_file = $(PLATFORM_FILE)" | sed 's|$(GAMMADIR)|$$(GAMMADIR)|'; \ | |
186 sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \ | |
187 echo; \ | |
188 echo "GAMMADIR = $(GAMMADIR)"; \ | |
189 echo "SYSDEFS = \$$(Platform_sysdefs)"; \ | |
190 echo "SRCARCH = $(ARCH)"; \ | |
191 echo "BUILDARCH = $(BUILDARCH)"; \ | |
192 echo "LIBARCH = $(LIBARCH)"; \ | |
193 echo "TARGET = $(TARGET)"; \ | |
194 echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \ | |
195 echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \ | |
196 echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \ | |
197 echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ | |
198 echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ | |
199 echo; \ | |
1972 | 200 echo "# Used for platform dispatching"; \ |
201 echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \ | |
202 echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \ | |
203 echo "TARGET_DEFINES += -DTARGET_ARCH_MODEL_\$$(Platform_arch_model)"; \ | |
204 echo "TARGET_DEFINES += -DTARGET_OS_ARCH_\$$(Platform_os_arch)"; \ | |
205 echo "TARGET_DEFINES += -DTARGET_OS_ARCH_MODEL_\$$(Platform_os_arch_model)"; \ | |
206 echo "TARGET_DEFINES += -DTARGET_COMPILER_\$$(Platform_compiler)"; \ | |
207 echo "CFLAGS += \$$(TARGET_DEFINES)"; \ | |
208 echo; \ | |
209 echo "Src_Dirs_V = \\"; \ | |
0 | 210 sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \ |
211 echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \ | |
212 echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \ | |
213 echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \ | |
1972 | 214 echo; \ |
215 echo "Src_Dirs_I = \\"; \ | |
216 echo "\$$(GAMMADIR)/src/share/vm \\"; \ | |
217 echo "\$$(GAMMADIR)/src/share/vm/prims \\"; \ | |
218 echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \ | |
219 echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \ | |
220 echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \ | |
0 | 221 [ -n "$(CFLAGS_BROWSE)" ] && \ |
222 echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \ | |
223 [ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \ | |
224 echo && \ | |
225 echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \ | |
226 echo "SYSDEFS += \$$(HOTSPOT_EXTRA_SYSDEFS)"; \ | |
227 echo; \ | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
228 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \ |
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
229 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \ |
0 | 230 ) > $@ |
231 | |
232 flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst | |
233 @echo Creating $@ ... | |
234 $(QUIETLY) ( \ | |
235 $(BUILDTREE_COMMENT); \ | |
236 echo; \ | |
237 [ "$(TARGET)" = profiled ] && \ | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
238 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/optimized.make"; \ |
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
239 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(TARGET).make"; \ |
0 | 240 ) > $@ |
241 | |
242 ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm | |
243 @echo Creating directory list $@ | |
244 $(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \ | |
245 -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ | |
246 \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@ | |
247 | |
248 Makefile: $(BUILDTREE_MAKE) | |
249 @echo Creating $@ ... | |
250 $(QUIETLY) ( \ | |
251 $(BUILDTREE_COMMENT); \ | |
252 echo; \ | |
253 echo include flags.make; \ | |
254 echo; \ | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
255 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/top.make"; \ |
0 | 256 ) > $@ |
257 | |
258 vm.make: $(BUILDTREE_MAKE) | |
259 @echo Creating $@ ... | |
260 $(QUIETLY) ( \ | |
261 $(BUILDTREE_COMMENT); \ | |
262 echo; \ | |
263 echo include flags.make; \ | |
264 echo include flags_vm.make; \ | |
265 echo; \ | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
266 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ |
0 | 267 ) > $@ |
268 | |
269 adlc.make: $(BUILDTREE_MAKE) | |
270 @echo Creating $@ ... | |
271 $(QUIETLY) ( \ | |
272 $(BUILDTREE_COMMENT); \ | |
273 echo; \ | |
274 echo include flags.make; \ | |
275 echo; \ | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
276 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ |
0 | 277 ) > $@ |
278 | |
279 jvmti.make: $(BUILDTREE_MAKE) | |
280 @echo Creating $@ ... | |
281 $(QUIETLY) ( \ | |
282 $(BUILDTREE_COMMENT); \ | |
283 echo; \ | |
284 echo include flags.make; \ | |
285 echo; \ | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
286 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ |
0 | 287 ) > $@ |
288 | |
289 sa.make: $(BUILDTREE_MAKE) | |
290 @echo Creating $@ ... | |
291 $(QUIETLY) ( \ | |
292 $(BUILDTREE_COMMENT); \ | |
293 echo; \ | |
294 echo include flags.make; \ | |
295 echo; \ | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
50
diff
changeset
|
296 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ |
0 | 297 ) > $@ |
298 | |
299 env.sh: $(BUILDTREE_MAKE) | |
300 @echo Creating $@ ... | |
301 $(QUIETLY) ( \ | |
302 $(BUILDTREE_COMMENT); \ | |
303 [ -n "$$JAVA_HOME" ] && { echo ": \$${JAVA_HOME:=$${JAVA_HOME}}"; }; \ | |
304 { \ | |
305 echo "LD_LIBRARY_PATH=.:$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \ | |
306 echo "CLASSPATH=$${CLASSPATH:+$$CLASSPATH:}.:\$${JAVA_HOME}/jre/lib/rt.jar:\$${JAVA_HOME}/jre/lib/i18n.jar"; \ | |
307 } | sed s:$${JAVA_HOME:--------}:\$${JAVA_HOME}:g; \ | |
308 echo "HOTSPOT_BUILD_USER=\"$${LOGNAME:-$$USER} in `basename $(GAMMADIR)`\""; \ | |
309 echo "export JAVA_HOME LD_LIBRARY_PATH CLASSPATH HOTSPOT_BUILD_USER"; \ | |
310 ) > $@ | |
311 | |
312 env.csh: env.sh | |
313 @echo Creating $@ ... | |
314 $(QUIETLY) ( \ | |
315 $(BUILDTREE_COMMENT); \ | |
316 [ -n "$$JAVA_HOME" ] && \ | |
317 { echo "if (! \$$?JAVA_HOME) setenv JAVA_HOME \"$$JAVA_HOME\""; }; \ | |
318 sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p' $?; \ | |
319 ) > $@ | |
320 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1978
diff
changeset
|
321 jdkpath.sh: $(BUILDTREE_MAKE) |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1978
diff
changeset
|
322 @echo Creating $@ ... |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1978
diff
changeset
|
323 $(QUIETLY) ( \ |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1978
diff
changeset
|
324 $(BUILDTREE_COMMENT); \ |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1978
diff
changeset
|
325 echo "JDK=${JAVA_HOME}"; \ |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1978
diff
changeset
|
326 ) > $@ |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1978
diff
changeset
|
327 |
0 | 328 .dbxrc: $(BUILDTREE_MAKE) |
329 @echo Creating $@ ... | |
330 $(QUIETLY) ( \ | |
331 echo "echo '# Loading $(PLATFORM_DIR)/$(TARGET)/.dbxrc'"; \ | |
332 echo "if [ -f \"\$${HOTSPOT_DBXWARE}\" ]"; \ | |
333 echo "then"; \ | |
334 echo " source \"\$${HOTSPOT_DBXWARE}\""; \ | |
335 echo "elif [ -f \"\$$HOME/.dbxrc\" ]"; \ | |
336 echo "then"; \ | |
337 echo " source \"\$$HOME/.dbxrc\""; \ | |
338 echo "fi"; \ | |
339 ) > $@ | |
340 | |
341 # Skip the test for product builds (which only work when installed in a JDK), to | |
342 # avoid exiting with an error and causing make to halt. | |
343 NO_TEST_MSG = \ | |
344 echo "$@: skipping the test--this build must be tested in a JDK." | |
345 | |
346 NO_JAVA_HOME_MSG = \ | |
347 echo "JAVA_HOME must be set to run this test." | |
348 | |
349 DATA_MODE = $(DATA_MODE/$(BUILDARCH)) | |
350 JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE)) | |
351 | |
352 DATA_MODE/i486 = 32 | |
353 DATA_MODE/sparc = 32 | |
354 DATA_MODE/sparcv9 = 64 | |
355 DATA_MODE/amd64 = 64 | |
356 DATA_MODE/ia64 = 64 | |
1010 | 357 DATA_MODE/zero = $(ARCH_DATA_MODEL) |
0 | 358 |
359 JAVA_FLAG/32 = -d32 | |
360 JAVA_FLAG/64 = -d64 | |
361 | |
362 WRONG_DATA_MODE_MSG = \ | |
363 echo "JAVA_HOME must point to $(DATA_MODE)bit JDK." | |
364 | |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
365 CROSS_COMPILING_MSG = \ |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
366 echo "Cross compiling for ARCH $(CROSS_COMPILE_ARCH), skipping gamma run." |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
367 |
232
551f4309f476
6695777: Queens.class should be built from source, not put in source repo
ohair
parents:
91
diff
changeset
|
368 test_gamma: $(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java |
0 | 369 @echo Creating $@ ... |
370 $(QUIETLY) ( \ | |
371 echo '#!/bin/sh'; \ | |
372 $(BUILDTREE_COMMENT); \ | |
373 echo '. ./env.sh'; \ | |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
374 echo "if [ \"$(CROSS_COMPILE_ARCH)\" != \"\" ]; then { $(CROSS_COMPILING_MSG); exit 0; }; fi"; \ |
0 | 375 echo "if [ -z \$$JAVA_HOME ]; then { $(NO_JAVA_HOME_MSG); exit 0; }; fi"; \ |
233
17c572e2697c
6723762: Fix shell command that gets java version (uses 2>1)
ohair
parents:
91
diff
changeset
|
376 echo "if ! \$${JAVA_HOME}/bin/java $(JAVA_FLAG) -fullversion 2>&1 > /dev/null"; \ |
0 | 377 echo "then"; \ |
378 echo " $(WRONG_DATA_MODE_MSG); exit 0;"; \ | |
379 echo "fi"; \ | |
232
551f4309f476
6695777: Queens.class should be built from source, not put in source repo
ohair
parents:
91
diff
changeset
|
380 echo "rm -f Queens.class"; \ |
551f4309f476
6695777: Queens.class should be built from source, not put in source repo
ohair
parents:
91
diff
changeset
|
381 echo "\$${JAVA_HOME}/bin/javac -d . $(GAMMADIR)/make/test/Queens.java"; \ |
0 | 382 echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \ |
383 echo './$${gamma:-gamma} $(TESTFLAGS) Queens < /dev/null'; \ | |
384 ) > $@ | |
385 $(QUIETLY) chmod +x $@ | |
386 | |
387 FORCE: | |
388 | |
389 .PHONY: all FORCE |