Mercurial > hg > truffle
annotate make/bsd/makefiles/buildtree.make @ 4899:a79cb7c55012
7132690: InstanceKlass:_reference_type should be u1 type
Summary: Change InstanceKlass::_reference_type to u1 type.
Reviewed-by: dholmes, coleenp, acorn
Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
author | jiangli |
---|---|
date | Wed, 25 Jan 2012 17:40:51 -0500 |
parents | 8657ec177a14 |
children | e8a4934564b2 |
rev | line source |
---|---|
3960 | 1 # |
2 # Copyright (c) 2005, 2011, 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. | |
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 # | |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 # or visit www.oracle.com if you need additional information or have any | |
21 # questions. | |
22 # | |
23 # | |
24 | |
25 # Usage: | |
26 # | |
27 # $(MAKE) -f buildtree.make SRCARCH=srcarch 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) | |
40 # HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty | |
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 | |
4108
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
58 # needs to be set here since this Makefile doesn't include defs.make |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
59 OS_VENDOR:=$(shell uname -s) |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
60 |
3960 | 61 include $(GAMMADIR)/make/scm.make |
62 include $(GAMMADIR)/make/altsrc.make | |
63 | |
64 | |
65 # 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details. | |
66 QUIETLY$(MAKE_VERBOSE) = @ | |
67 | |
68 # For now, until the compiler is less wobbly: | |
69 TESTFLAGS = -Xbatch -showversion | |
70 | |
71 ifeq ($(ZERO_BUILD), true) | |
72 PLATFORM_FILE = $(shell dirname $(shell dirname $(shell pwd)))/platform_zero | |
73 else | |
74 ifdef USE_SUNCC | |
75 PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH).suncc | |
76 else | |
77 PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH) | |
78 endif | |
79 endif | |
80 | |
81 # Allow overriding of the arch part of the directory but default | |
82 # to BUILDARCH if nothing is specified | |
83 ifeq ($(VARIANTARCH),) | |
84 VARIANTARCH=$(BUILDARCH) | |
85 endif | |
86 | |
87 ifdef FORCE_TIERED | |
88 ifeq ($(VARIANT),tiered) | |
89 PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_compiler2 | |
90 else | |
91 PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_$(VARIANT) | |
92 endif | |
93 else | |
94 PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_$(VARIANT) | |
95 endif | |
96 | |
97 # | |
98 # We do two levels of exclusion in the shared directory. | |
99 # TOPLEVEL excludes are pruned, they are not recursively searched, | |
100 # but lower level directories can be named without fear of collision. | |
101 # ALWAYS excludes are excluded at any level in the directory tree. | |
102 # | |
103 | |
104 ALWAYS_EXCLUDE_DIRS = $(SCM_DIRS) | |
105 | |
106 ifeq ($(VARIANT),tiered) | |
107 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name agent | |
108 else | |
109 ifeq ($(VARIANT),compiler2) | |
110 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name c1 -o -name agent | |
111 else | |
112 # compiler1 and core use the same exclude list | |
113 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name opto -o -name libadt -o -name agent | |
114 endif | |
115 endif | |
116 | |
117 # Get things from the platform file. | |
118 COMPILER = $(shell sed -n 's/^compiler[ ]*=[ ]*//p' $(PLATFORM_FILE)) | |
119 | |
4006 | 120 # dtracefiles is used on BSD versions that implement Dtrace (like MacOS X) |
3960 | 121 SIMPLE_DIRS = \ |
122 $(PLATFORM_DIR)/generated/dependencies \ | |
123 $(PLATFORM_DIR)/generated/adfiles \ | |
4006 | 124 $(PLATFORM_DIR)/generated/jvmtifiles \ |
125 $(PLATFORM_DIR)/generated/dtracefiles | |
3960 | 126 |
127 TARGETS = debug fastdebug jvmg optimized product profiled | |
128 SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS)) | |
129 | |
130 # For dependencies and recursive makes. | |
131 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make | |
132 | |
4006 | 133 # dtrace.make is used on BSD versions that implement Dtrace (like MacOS X) |
134 BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make \ | |
135 jvmti.make sa.make dtrace.make \ | |
3960 | 136 env.sh env.csh jdkpath.sh .dbxrc test_gamma |
137 | |
138 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \ | |
139 SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT) | |
140 | |
141 # Define variables to be set in flags.make. | |
142 # Default values are set in make/defs.make. | |
143 ifeq ($(HOTSPOT_BUILD_VERSION),) | |
144 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION) | |
145 else | |
146 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION) | |
147 endif | |
148 # Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami) | |
149 ifndef HOTSPOT_BUILD_USER | |
150 HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME) | |
151 endif | |
152 ifndef HOTSPOT_BUILD_USER | |
153 HOTSPOT_BUILD_USER := $(shell whoami) | |
154 endif | |
155 # Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro | |
156 # or make/hotspot_distro. | |
157 ifndef HOTSPOT_VM_DISTRO | |
158 ifeq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true) | |
159 include $(GAMMADIR)/make/hotspot_distro | |
160 else | |
161 include $(GAMMADIR)/make/openjdk_distro | |
162 endif | |
163 endif | |
164 | |
4108
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
165 ifeq ($(OS_VENDOR), Darwin) |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
166 # MACOSX FIXME: we should be able to run test_gamma (see MACOSX_PORT-214) |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
167 ifeq ($(ALWAYS_PASS_TEST_GAMMA),) |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
168 # ALWAYS_PASS_TEST_GAMMA wasn't set so we default to true on MacOS X |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
169 # until MACOSX_PORT-214 is fixed |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
170 ALWAYS_PASS_TEST_GAMMA=true |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
171 endif |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
172 endif |
8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
dcubed
parents:
4033
diff
changeset
|
173 ifeq ($(ALWAYS_PASS_TEST_GAMMA), true) |
4006 | 174 TEST_GAMMA_STATUS= echo 'exit 0'; |
175 else | |
176 TEST_GAMMA_STATUS= | |
177 endif | |
178 | |
3960 | 179 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) |
180 | |
181 BUILDTREE = \ | |
182 $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS) | |
183 | |
184 BUILDTREE_COMMENT = echo "\# Generated by $(BUILDTREE_MAKE)" | |
185 | |
186 all: $(SUBMAKE_DIRS) | |
187 | |
188 # Run make in each subdirectory recursively. | |
189 $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE | |
190 $(QUIETLY) [ -d $@ ] || { mkdir -p $@; } | |
191 $(QUIETLY) cd $@ && $(BUILDTREE) TARGET=$(@F) | |
192 $(QUIETLY) touch $@ | |
193 | |
194 $(SIMPLE_DIRS): | |
195 $(QUIETLY) mkdir -p $@ | |
196 | |
197 # Convenience macro which takes a source relative path, applies $(1) to the | |
198 # absolute path, and then replaces $(GAMMADIR) in the result with a | |
199 # literal "$(GAMMADIR)/" suitable for inclusion in a Makefile. | |
200 gamma-path=$(subst $(GAMMADIR),\$$(GAMMADIR),$(call $(1),$(HS_COMMON_SRC)/$(2))) | |
201 | |
202 flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst | |
203 @echo Creating $@ ... | |
204 $(QUIETLY) ( \ | |
205 $(BUILDTREE_COMMENT); \ | |
206 echo; \ | |
207 echo "Platform_file = $(PLATFORM_FILE)" | sed 's|$(GAMMADIR)|$$(GAMMADIR)|'; \ | |
208 sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \ | |
209 echo; \ | |
210 echo "GAMMADIR = $(GAMMADIR)"; \ | |
211 echo "SYSDEFS = \$$(Platform_sysdefs)"; \ | |
212 echo "SRCARCH = $(SRCARCH)"; \ | |
213 echo "BUILDARCH = $(BUILDARCH)"; \ | |
214 echo "LIBARCH = $(LIBARCH)"; \ | |
215 echo "TARGET = $(TARGET)"; \ | |
216 echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \ | |
217 echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \ | |
218 echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \ | |
219 echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ | |
220 echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ | |
221 echo; \ | |
222 echo "# Used for platform dispatching"; \ | |
223 echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \ | |
224 echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \ | |
225 echo "TARGET_DEFINES += -DTARGET_ARCH_MODEL_\$$(Platform_arch_model)"; \ | |
226 echo "TARGET_DEFINES += -DTARGET_OS_ARCH_\$$(Platform_os_arch)"; \ | |
227 echo "TARGET_DEFINES += -DTARGET_OS_ARCH_MODEL_\$$(Platform_os_arch_model)"; \ | |
228 echo "TARGET_DEFINES += -DTARGET_COMPILER_\$$(Platform_compiler)"; \ | |
229 echo "CFLAGS += \$$(TARGET_DEFINES)"; \ | |
230 echo; \ | |
231 echo "Src_Dirs_V = \\"; \ | |
232 sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \ | |
233 echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \ | |
234 echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \ | |
235 echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \ | |
236 echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \ | |
237 echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \ | |
238 echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \ | |
239 echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \ | |
240 echo "$(call gamma-path,commonsrc,os/posix/vm)"; \ | |
241 echo; \ | |
242 echo "Src_Dirs_I = \\"; \ | |
243 echo "$(call gamma-path,altsrc,share/vm/prims) \\"; \ | |
244 echo "$(call gamma-path,commonsrc,share/vm/prims) \\"; \ | |
245 echo "$(call gamma-path,altsrc,share/vm) \\"; \ | |
246 echo "$(call gamma-path,commonsrc,share/vm) \\"; \ | |
4033
95009f678859
7106766: Move the precompiled header from the src/share/vm directory
brutisso
parents:
4006
diff
changeset
|
247 echo "$(call gamma-path,altsrc,share/vm/precompiled) \\"; \ |
95009f678859
7106766: Move the precompiled header from the src/share/vm directory
brutisso
parents:
4006
diff
changeset
|
248 echo "$(call gamma-path,commonsrc,share/vm/precompiled) \\"; \ |
3960 | 249 echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \ |
250 echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \ | |
251 echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \ | |
252 echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \ | |
253 echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \ | |
254 echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \ | |
255 echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \ | |
256 echo "$(call gamma-path,commonsrc,os/posix/vm)"; \ | |
257 [ -n "$(CFLAGS_BROWSE)" ] && \ | |
258 echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \ | |
259 [ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \ | |
260 echo && \ | |
261 echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \ | |
262 echo "SYSDEFS += \$$(HOTSPOT_EXTRA_SYSDEFS)"; \ | |
263 echo; \ | |
264 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \ | |
265 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \ | |
266 ) > $@ | |
267 | |
268 flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst | |
269 @echo Creating $@ ... | |
270 $(QUIETLY) ( \ | |
271 $(BUILDTREE_COMMENT); \ | |
272 echo; \ | |
273 [ "$(TARGET)" = profiled ] && \ | |
274 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/optimized.make"; \ | |
275 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(TARGET).make"; \ | |
276 ) > $@ | |
277 | |
278 ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm | |
279 @echo Creating directory list $@ | |
280 $(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \ | |
281 find $(HS_ALT_SRC)/share/vm/* -prune \ | |
282 -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ | |
283 \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@; \ | |
284 fi; | |
285 $(QUIETLY) find $(HS_COMMON_SRC)/share/vm/* -prune \ | |
286 -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ | |
287 \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@ | |
288 | |
289 Makefile: $(BUILDTREE_MAKE) | |
290 @echo Creating $@ ... | |
291 $(QUIETLY) ( \ | |
292 $(BUILDTREE_COMMENT); \ | |
293 echo; \ | |
294 echo include flags.make; \ | |
295 echo; \ | |
296 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/top.make"; \ | |
297 ) > $@ | |
298 | |
299 vm.make: $(BUILDTREE_MAKE) | |
300 @echo Creating $@ ... | |
301 $(QUIETLY) ( \ | |
302 $(BUILDTREE_COMMENT); \ | |
303 echo; \ | |
304 echo include flags.make; \ | |
305 echo include flags_vm.make; \ | |
306 echo; \ | |
307 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ | |
308 ) > $@ | |
309 | |
310 adlc.make: $(BUILDTREE_MAKE) | |
311 @echo Creating $@ ... | |
312 $(QUIETLY) ( \ | |
313 $(BUILDTREE_COMMENT); \ | |
314 echo; \ | |
315 echo include flags.make; \ | |
316 echo; \ | |
317 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ | |
318 ) > $@ | |
319 | |
320 jvmti.make: $(BUILDTREE_MAKE) | |
321 @echo Creating $@ ... | |
322 $(QUIETLY) ( \ | |
323 $(BUILDTREE_COMMENT); \ | |
324 echo; \ | |
325 echo include flags.make; \ | |
326 echo; \ | |
327 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ | |
328 ) > $@ | |
329 | |
330 sa.make: $(BUILDTREE_MAKE) | |
331 @echo Creating $@ ... | |
332 $(QUIETLY) ( \ | |
333 $(BUILDTREE_COMMENT); \ | |
334 echo; \ | |
335 echo include flags.make; \ | |
336 echo; \ | |
337 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ | |
338 ) > $@ | |
339 | |
4006 | 340 dtrace.make: $(BUILDTREE_MAKE) |
341 @echo Creating $@ ... | |
342 $(QUIETLY) ( \ | |
343 $(BUILDTREE_COMMENT); \ | |
344 echo; \ | |
345 echo include flags.make; \ | |
346 echo; \ | |
347 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ | |
348 ) > $@ | |
349 | |
3960 | 350 env.sh: $(BUILDTREE_MAKE) |
351 @echo Creating $@ ... | |
352 $(QUIETLY) ( \ | |
353 $(BUILDTREE_COMMENT); \ | |
354 [ -n "$$JAVA_HOME" ] && { echo ": \$${JAVA_HOME:=$${JAVA_HOME}}"; }; \ | |
355 { \ | |
356 echo "LD_LIBRARY_PATH=.:$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \ | |
357 echo "DYLD_LIBRARY_PATH=.:$${DYLD_LIBRARY_PATH:+$$DYLD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \ | |
358 echo "CLASSPATH=$${CLASSPATH:+$$CLASSPATH:}.:\$${JAVA_HOME}/jre/lib/rt.jar:\$${JAVA_HOME}/jre/lib/i18n.jar"; \ | |
359 } | sed s:$${JAVA_HOME:--------}:\$${JAVA_HOME}:g; \ | |
360 echo "HOTSPOT_BUILD_USER=\"$${LOGNAME:-$$USER} in `basename $(GAMMADIR)`\""; \ | |
361 echo "export JAVA_HOME LD_LIBRARY_PATH DYLD_LIBRARY_PATH CLASSPATH HOTSPOT_BUILD_USER"; \ | |
362 ) > $@ | |
363 | |
364 env.csh: env.sh | |
365 @echo Creating $@ ... | |
366 $(QUIETLY) ( \ | |
367 $(BUILDTREE_COMMENT); \ | |
368 [ -n "$$JAVA_HOME" ] && \ | |
369 { echo "if (! \$$?JAVA_HOME) setenv JAVA_HOME \"$$JAVA_HOME\""; }; \ | |
370 sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p' $?; \ | |
371 ) > $@ | |
372 | |
373 jdkpath.sh: $(BUILDTREE_MAKE) | |
374 @echo Creating $@ ... | |
375 $(QUIETLY) ( \ | |
376 $(BUILDTREE_COMMENT); \ | |
377 echo "JDK=${JAVA_HOME}"; \ | |
378 ) > $@ | |
379 | |
380 .dbxrc: $(BUILDTREE_MAKE) | |
381 @echo Creating $@ ... | |
382 $(QUIETLY) ( \ | |
383 echo "echo '# Loading $(PLATFORM_DIR)/$(TARGET)/.dbxrc'"; \ | |
384 echo "if [ -f \"\$${HOTSPOT_DBXWARE}\" ]"; \ | |
385 echo "then"; \ | |
386 echo " source \"\$${HOTSPOT_DBXWARE}\""; \ | |
387 echo "elif [ -f \"\$$HOME/.dbxrc\" ]"; \ | |
388 echo "then"; \ | |
389 echo " source \"\$$HOME/.dbxrc\""; \ | |
390 echo "fi"; \ | |
391 ) > $@ | |
392 | |
393 # Skip the test for product builds (which only work when installed in a JDK), to | |
394 # avoid exiting with an error and causing make to halt. | |
395 NO_TEST_MSG = \ | |
396 echo "$@: skipping the test--this build must be tested in a JDK." | |
397 | |
398 NO_JAVA_HOME_MSG = \ | |
399 echo "JAVA_HOME must be set to run this test." | |
400 | |
401 DATA_MODE = $(DATA_MODE/$(BUILDARCH)) | |
402 JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE)) | |
403 | |
404 DATA_MODE/i486 = 32 | |
405 DATA_MODE/sparc = 32 | |
406 DATA_MODE/sparcv9 = 64 | |
407 DATA_MODE/amd64 = 64 | |
408 DATA_MODE/ia64 = 64 | |
409 DATA_MODE/zero = $(ARCH_DATA_MODEL) | |
410 | |
411 JAVA_FLAG/32 = -d32 | |
412 JAVA_FLAG/64 = -d64 | |
413 | |
414 WRONG_DATA_MODE_MSG = \ | |
415 echo "JAVA_HOME must point to $(DATA_MODE)bit JDK." | |
416 | |
417 CROSS_COMPILING_MSG = \ | |
418 echo "Cross compiling for ARCH $(CROSS_COMPILE_ARCH), skipping gamma run." | |
419 | |
420 test_gamma: $(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java | |
421 @echo Creating $@ ... | |
422 $(QUIETLY) ( \ | |
423 echo '#!/bin/sh'; \ | |
424 $(BUILDTREE_COMMENT); \ | |
425 echo '. ./env.sh'; \ | |
426 echo "if [ \"$(CROSS_COMPILE_ARCH)\" != \"\" ]; then { $(CROSS_COMPILING_MSG); exit 0; }; fi"; \ | |
427 echo "if [ -z \$$JAVA_HOME ]; then { $(NO_JAVA_HOME_MSG); exit 0; }; fi"; \ | |
428 echo "if ! \$${JAVA_HOME}/bin/java $(JAVA_FLAG) -fullversion 2>&1 > /dev/null"; \ | |
429 echo "then"; \ | |
430 echo " $(WRONG_DATA_MODE_MSG); exit 0;"; \ | |
431 echo "fi"; \ | |
432 echo "rm -f Queens.class"; \ | |
433 echo "\$${JAVA_HOME}/bin/javac -d . $(GAMMADIR)/make/test/Queens.java"; \ | |
434 echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \ | |
435 echo './$${gamma:-gamma} $(TESTFLAGS) Queens < /dev/null'; \ | |
4006 | 436 $(TEST_GAMMA_STATUS) \ |
3960 | 437 ) > $@ |
438 $(QUIETLY) chmod +x $@ | |
439 | |
440 FORCE: | |
441 | |
442 .PHONY: all FORCE |