Mercurial > hg > graal-compiler
annotate make/Makefile @ 2653:7c8ad40c1f88
No need for stateAfter on volatile field loads.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 11 May 2011 15:11:33 +0200 |
parents | 2ab52cda08e5 |
children | 44da449fc29c |
rev | line source |
---|---|
0 | 1 # |
2237
b76d12f4ab2d
7018429: JPRT: Update Makefile to use ALT_JDK_TARGET_IMPORT_PATH for copying JDK
dholmes
parents:
2199
diff
changeset
|
2 # Copyright (c) 2005, 2011, 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:
1185
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1185
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:
1185
diff
changeset
|
21 # questions. |
0 | 22 # |
23 # | |
24 | |
25 # Top level gnumake file for hotspot builds | |
26 # | |
27 # Default is to build the both product images and construct an export dir. | |
28 # The default export directory name is `pwd`/export-$(PLATFORM). | |
29 # | |
30 # Use: 'gnumake help' for more information. | |
31 # | |
32 # This makefile uses the default settings for where to find compilers and | |
33 # tools, and obeys the ALT_* variable settings used by the other JDK | |
34 # workspaces. | |
35 # | |
36 | |
37 # Expected/optional make variables defined on make command line: | |
38 # LP64=1 or ARCH_DATA_MODEL=64 for 64bit build | |
39 # | |
40 # Expected/optional make variables or environment variables: | |
41 # ALT_SLASH_JAVA Location of /java or J: | |
42 # ALT_BOOTDIR Previous JDK home directory for javac compiler | |
43 # ALT_OUTPUTDIR Output directory to use for hotspot build | |
44 # ALT_EXPORT_PATH Directory to export hotspot build to | |
45 # ALT_JDK_IMPORT_PATH Current JDK build (only for create_jdk rules) | |
2237
b76d12f4ab2d
7018429: JPRT: Update Makefile to use ALT_JDK_TARGET_IMPORT_PATH for copying JDK
dholmes
parents:
2199
diff
changeset
|
46 # ALT_JDK_TARGET_IMPORT_PATH Current JDK build when cross-compiling |
0 | 47 # ALT_BUILD_WIN_SA Building SA on Windows is disabled by default. |
48 # Set ALT_BUILD_WIN_SA=1 to enable building SA on | |
49 # Windows. | |
50 # Version strings and numbers: | |
51 # JDK_VERSION Current JDK version (e.g. 1.6.0) | |
52 # PREVIOUS_JDK_VERSION Previous (bootdir) JDK version (e.g. 1.5.0) | |
53 # FULL_VERSION Full version string to use (e.g. "1.6.0-ea-b42") | |
54 # | |
55 # Version strings and numbers especially needed on Windows: | |
56 # COOKED_JDK_UPDATE_VERSION Just the update release number (e.g. 02) | |
57 # COOKED_BUILD_NUMBER Just the build number (e.g. 42) | |
58 # JDK_MKTG_VERSION Marketing JDK version (e.g. 6.0) | |
59 # JDK_MAJOR_VERSION Major number for version (e.g. 1) always 1? | |
60 # JDK_MINOR_VERSION Minor number for version (e.g. 6) | |
61 # JDK_MICRO_VERSION Micro number for version (e.g. 0) | |
62 # | |
63 | |
64 # Default is build both product fastdebug and create export area | |
65 | |
66 # Allow to build HotSpot in local directory from sources specified by GAMMADIR. | |
67 # After make/defs.make GAMMADIR is defined. | |
68 ifdef GAMMADIR | |
69 ifndef ALT_OUTPUTDIR | |
70 ALT_OUTPUTDIR := $(shell pwd) | |
71 endif | |
72 include $(GAMMADIR)/make/defs.make | |
73 else | |
74 include defs.make | |
75 endif | |
76 | |
2199
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2192
diff
changeset
|
77 include $(GAMMADIR)/make/altsrc.make |
0 | 78 |
79 ifneq ($(ALT_OUTPUTDIR),) | |
80 ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR) | |
81 else | |
82 ALT_OUT= | |
83 endif | |
84 | |
85 # Typical C1/C2 targets made available with this Makefile | |
86 C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1 | |
87 C2_VM_TARGETS=product fastdebug optimized jvmg | |
88 KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel | |
1010 | 89 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero |
1692 | 90 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark |
0 | 91 |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
92 # JDK directory list |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
93 JDK_DIRS=bin include jre lib demo |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
94 |
0 | 95 all: all_product all_fastdebug |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
96 ifndef BUILD_CLIENT_ONLY |
0 | 97 all_product: product product1 productkernel docs export_product |
98 all_fastdebug: fastdebug fastdebug1 fastdebugkernel docs export_fastdebug | |
99 all_debug: jvmg jvmg1 jvmgkernel docs export_debug | |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
100 else |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
101 all_product: product1 docs export_product |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
102 all_fastdebug: fastdebug1 docs export_fastdebug |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
103 all_debug: jvmg1 docs export_debug |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
104 endif |
0 | 105 all_optimized: optimized optimized1 optimizedkernel docs export_optimized |
106 | |
1010 | 107 allzero: all_productzero all_fastdebugzero |
108 all_productzero: productzero docs export_product | |
109 all_fastdebugzero: fastdebugzero docs export_fastdebug | |
110 all_debugzero: jvmgzero docs export_debug | |
111 all_optimizedzero: optimizedzero docs export_optimized | |
112 | |
1692 | 113 allshark: all_productshark all_fastdebugshark |
114 all_productshark: productshark docs export_product | |
115 all_fastdebugshark: fastdebugshark docs export_fastdebug | |
116 all_debugshark: jvmgshark docs export_debug | |
117 all_optimizedshark: optimizedshark docs export_optimized | |
118 | |
0 | 119 # Do everything |
120 world: all create_jdk | |
121 | |
122 # Build or export docs | |
123 docs: | |
124 ifeq ($(OSNAME),windows) | |
125 @$(ECHO) "No docs ($(VM_TARGET)) for windows" | |
126 else | |
127 $(CD) $(OUTPUTDIR); \ | |
128 $(MAKE) -f $(ABS_OS_MAKEFILE) \ | |
129 $(MAKE_ARGS) docs | |
130 endif | |
131 | |
132 # Build variation of hotspot | |
133 $(C1_VM_TARGETS): | |
134 $(CD) $(GAMMADIR)/make; \ | |
135 $(MAKE) VM_TARGET=$@ generic_build1 $(ALT_OUT) | |
136 | |
137 $(C2_VM_TARGETS): | |
138 $(CD) $(GAMMADIR)/make; \ | |
139 $(MAKE) VM_TARGET=$@ generic_build2 $(ALT_OUT) | |
140 | |
141 $(KERNEL_VM_TARGETS): | |
142 $(CD) $(GAMMADIR)/make; \ | |
143 $(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT) | |
144 | |
1010 | 145 $(ZERO_VM_TARGETS): |
146 $(CD) $(GAMMADIR)/make; \ | |
147 $(MAKE) VM_TARGET=$@ generic_buildzero $(ALT_OUT) | |
148 | |
1692 | 149 $(SHARK_VM_TARGETS): |
150 $(CD) $(GAMMADIR)/make; \ | |
151 $(MAKE) VM_TARGET=$@ generic_buildshark $(ALT_OUT) | |
152 | |
0 | 153 # Build compiler1 (client) rule, different for platforms |
154 generic_build1: | |
155 $(MKDIR) -p $(OUTPUTDIR) | |
156 ifeq ($(OSNAME),windows) | |
157 ifeq ($(ARCH_DATA_MODEL), 32) | |
158 $(CD) $(OUTPUTDIR); \ | |
159 $(NMAKE) -f $(ABS_OS_MAKEFILE) \ | |
160 Variant=compiler1 \ | |
161 WorkSpace=$(ABS_GAMMADIR) \ | |
162 BootStrapDir=$(ABS_BOOTDIR) \ | |
163 BuildUser=$(USERNAME) \ | |
164 $(MAKE_ARGS) $(VM_TARGET:%1=%) | |
165 else | |
166 @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" | |
167 endif | |
168 else | |
169 $(CD) $(OUTPUTDIR); \ | |
170 $(MAKE) -f $(ABS_OS_MAKEFILE) \ | |
171 $(MAKE_ARGS) $(VM_TARGET) | |
172 endif | |
173 | |
174 # Build compiler2 (server) rule, different for platforms | |
175 generic_build2: | |
176 $(MKDIR) -p $(OUTPUTDIR) | |
177 ifeq ($(OSNAME),windows) | |
178 $(CD) $(OUTPUTDIR); \ | |
179 $(NMAKE) -f $(ABS_OS_MAKEFILE) \ | |
180 Variant=compiler2 \ | |
181 WorkSpace=$(ABS_GAMMADIR) \ | |
182 BootStrapDir=$(ABS_BOOTDIR) \ | |
183 BuildUser=$(USERNAME) \ | |
184 $(MAKE_ARGS) $(VM_TARGET) | |
185 else | |
186 $(CD) $(OUTPUTDIR); \ | |
187 $(MAKE) -f $(ABS_OS_MAKEFILE) \ | |
188 $(MAKE_ARGS) $(VM_TARGET) | |
189 endif | |
190 | |
191 generic_buildkernel: | |
192 $(MKDIR) -p $(OUTPUTDIR) | |
193 ifeq ($(OSNAME),windows) | |
194 ifeq ($(ARCH_DATA_MODEL), 32) | |
195 $(CD) $(OUTPUTDIR); \ | |
196 $(NMAKE) -f $(ABS_OS_MAKEFILE) \ | |
197 Variant=kernel \ | |
198 WorkSpace=$(ABS_GAMMADIR) \ | |
199 BootStrapDir=$(ABS_BOOTDIR) \ | |
200 BuildUser=$(USERNAME) \ | |
201 $(MAKE_ARGS) $(VM_TARGET:%kernel=%) | |
202 else | |
203 @$(ECHO) "No kernel ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" | |
204 endif | |
205 else | |
206 @$(ECHO) "No kernel ($(VM_TARGET)) for OS_NAME=$(OSNAME)" | |
207 endif | |
208 | |
1010 | 209 generic_buildzero: |
210 $(MKDIR) -p $(OUTPUTDIR) | |
211 $(CD) $(OUTPUTDIR); \ | |
212 $(MAKE) -f $(ABS_OS_MAKEFILE) \ | |
213 $(MAKE_ARGS) $(VM_TARGET) | |
214 | |
1692 | 215 generic_buildshark: |
216 $(MKDIR) -p $(OUTPUTDIR) | |
217 $(CD) $(OUTPUTDIR); \ | |
218 $(MAKE) -f $(ABS_OS_MAKEFILE) \ | |
219 $(MAKE_ARGS) $(VM_TARGET) | |
220 | |
0 | 221 # Export file rule |
222 generic_export: $(EXPORT_LIST) | |
223 export_product: | |
224 $(MAKE) VM_SUBDIR=product generic_export | |
225 export_fastdebug: | |
226 $(MAKE) VM_SUBDIR=fastdebug EXPORT_SUBDIR=/fastdebug generic_export | |
227 export_debug: | |
228 $(MAKE) VM_SUBDIR=${VM_DEBUG} EXPORT_SUBDIR=/debug generic_export | |
229 export_optimized: | |
230 $(MAKE) VM_SUBDIR=optimized EXPORT_SUBDIR=/optimized generic_export | |
231 export_product_jdk: | |
232 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \ | |
233 VM_SUBDIR=product generic_export | |
234 export_optimized_jdk: | |
235 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \ | |
236 VM_SUBDIR=optimized generic_export | |
237 export_fastdebug_jdk: | |
238 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/fastdebug \ | |
239 VM_SUBDIR=fastdebug generic_export | |
240 export_debug_jdk: | |
241 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/debug \ | |
242 VM_SUBDIR=${VM_DEBUG} generic_export | |
243 | |
244 | |
245 # Export file copy rules | |
246 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt | |
247 DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs | |
248 C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 | |
249 C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 | |
250 KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel | |
1010 | 251 ZERO_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_zero |
1692 | 252 SHARK_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark |
0 | 253 C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) |
254 C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) | |
255 KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) | |
1010 | 256 ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR) |
1692 | 257 SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR) |
0 | 258 |
259 # Misc files and generated files need to come from C1 or C2 area | |
1010 | 260 ifeq ($(ZERO_BUILD), true) |
1692 | 261 ifeq ($(SHARK_BUILD), true) |
262 MISC_DIR=$(SHARK_DIR) | |
263 GEN_DIR=$(SHARK_BASE_DIR)/generated | |
264 else | |
1010 | 265 MISC_DIR=$(ZERO_DIR) |
266 GEN_DIR=$(ZERO_BASE_DIR)/generated | |
1692 | 267 endif |
1010 | 268 else |
0 | 269 ifeq ($(ARCH_DATA_MODEL), 32) |
270 MISC_DIR=$(C1_DIR) | |
271 GEN_DIR=$(C1_BASE_DIR)/generated | |
272 else | |
273 MISC_DIR=$(C2_DIR) | |
274 GEN_DIR=$(C2_BASE_DIR)/generated | |
275 endif | |
1010 | 276 endif |
0 | 277 |
278 # Bin files (windows) | |
279 ifeq ($(OSNAME),windows) | |
280 | |
281 # Get jvm.lib | |
282 $(EXPORT_LIB_DIR)/%.lib: $(MISC_DIR)/%.lib | |
283 $(install-file) | |
284 | |
285 # Other libraries (like SA) | |
286 $(EXPORT_JRE_BIN_DIR)/%.dll: $(MISC_DIR)/%.dll | |
287 $(install-file) | |
288 $(EXPORT_JRE_BIN_DIR)/%.pdb: $(MISC_DIR)/%.pdb | |
289 $(install-file) | |
290 $(EXPORT_JRE_BIN_DIR)/%.map: $(MISC_DIR)/%.map | |
291 $(install-file) | |
292 | |
293 # Client files always come from C1 area | |
294 $(EXPORT_CLIENT_DIR)/%.dll: $(C1_DIR)/%.dll | |
295 $(install-file) | |
296 $(EXPORT_CLIENT_DIR)/%.pdb: $(C1_DIR)/%.pdb | |
297 $(install-file) | |
298 $(EXPORT_CLIENT_DIR)/%.map: $(C1_DIR)/%.map | |
299 $(install-file) | |
300 | |
301 # Server files always come from C2 area | |
302 $(EXPORT_SERVER_DIR)/%.dll: $(C2_DIR)/%.dll | |
303 $(install-file) | |
304 $(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb | |
305 $(install-file) | |
306 $(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map | |
307 $(install-file) | |
308 | |
309 # Kernel files always come from kernel area | |
310 $(EXPORT_KERNEL_DIR)/%.dll: $(KERNEL_DIR)/%.dll | |
311 $(install-file) | |
312 $(EXPORT_KERNEL_DIR)/%.pdb: $(KERNEL_DIR)/%.pdb | |
313 $(install-file) | |
314 $(EXPORT_KERNEL_DIR)/%.map: $(KERNEL_DIR)/%.map | |
315 $(install-file) | |
316 endif | |
317 | |
318 # Shared Library | |
319 ifneq ($(OSNAME),windows) | |
1010 | 320 ifeq ($(ZERO_BUILD), true) |
1692 | 321 ifeq ($(SHARK_BUILD), true) |
322 $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(SHARK_DIR)/%.so | |
323 $(install-file) | |
324 $(EXPORT_SERVER_DIR)/%.so: $(SHARK_DIR)/%.so | |
325 $(install-file) | |
326 else | |
1010 | 327 $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(ZERO_DIR)/%.so |
328 $(install-file) | |
329 $(EXPORT_SERVER_DIR)/%.so: $(ZERO_DIR)/%.so | |
330 $(install-file) | |
1692 | 331 endif |
1010 | 332 else |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
333 $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C1_DIR)/%.so |
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
334 $(install-file) |
0 | 335 $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so |
336 $(install-file) | |
337 $(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so | |
338 $(install-file) | |
339 $(EXPORT_CLIENT_DIR)/64/%.so: $(C1_DIR)/%.so | |
340 $(install-file) | |
341 $(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so | |
342 $(install-file) | |
343 $(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so | |
344 $(install-file) | |
1010 | 345 endif |
0 | 346 endif |
347 | |
348 # Jar file (sa-jdi.jar) | |
349 $(EXPORT_LIB_DIR)/%.jar: $(GEN_DIR)/%.jar | |
350 $(install-file) | |
351 | |
1184
7fbf850d87b7
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
196
diff
changeset
|
352 # Include files (jvmti.h, jvmticmlr.h, jni.h, $(JDK_INCLUDE_SUBDIR)/jni_md.h, jmm.h) |
0 | 353 $(EXPORT_INCLUDE_DIR)/%: $(GEN_DIR)/jvmtifiles/% |
354 $(install-file) | |
355 | |
1184
7fbf850d87b7
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
196
diff
changeset
|
356 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/code/% |
7fbf850d87b7
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
196
diff
changeset
|
357 $(install-file) |
7fbf850d87b7
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
196
diff
changeset
|
358 |
0 | 359 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/% |
360 $(install-file) | |
361 | |
2199
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2192
diff
changeset
|
362 HS_JNI_ARCH_SRC=$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h) |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2192
diff
changeset
|
363 $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_JNI_ARCH_SRC) |
0 | 364 $(install-file) |
365 | |
366 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/services/% | |
367 $(install-file) | |
368 | |
369 # Doc files (jvmti.html) | |
370 $(EXPORT_DOCS_DIR)/platform/jvmti/%: $(DOCS_DIR)/% | |
371 $(install-file) | |
372 | |
373 # Xusage file | |
374 $(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE) | |
375 $(prep-target) | |
376 $(RM) $@.temp | |
377 $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp | |
378 $(MV) $@.temp $@ | |
379 | |
380 # | |
381 # Clean rules | |
382 # | |
383 clobber clean: clean_build clean_export clean_jdk | |
384 clean_build: | |
385 $(RM) -r $(C1_DIR) | |
386 $(RM) -r $(C2_DIR) | |
387 $(RM) -r $(KERNEL_DIR) | |
1010 | 388 $(RM) -r $(ZERO_DIR) |
1692 | 389 $(RM) -r $(SHARK_DIR) |
0 | 390 clean_export: |
391 $(RM) -r $(EXPORT_PATH) | |
392 clean_jdk: | |
393 $(RM) -r $(JDK_IMAGE_DIR) | |
394 | |
395 # | |
396 # Create JDK and place this build into it | |
397 # | |
398 create_jdk: copy_jdk update_jdk | |
399 | |
400 update_jdk: export_product_jdk export_fastdebug_jdk test_jdk | |
401 | |
402 copy_jdk: $(JDK_IMAGE_DIR)/jre/lib/rt.jar | |
403 | |
404 $(JDK_IMAGE_DIR)/jre/lib/rt.jar: | |
405 $(RM) -r $(JDK_IMAGE_DIR) | |
406 $(MKDIR) -p $(JDK_IMAGE_DIR) | |
407 ($(CD) $(JDK_IMPORT_PATH) && \ | |
408 $(TAR) -cf - *) | \ | |
409 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -) | |
410 | |
411 test_jdk: | |
1010 | 412 ifneq ($(ZERO_BUILD), true) |
413 ifeq ($(ARCH_DATA_MODEL), 32) | |
0 | 414 $(JDK_IMAGE_DIR)/bin/java -client -version |
1010 | 415 endif |
0 | 416 endif |
417 $(JDK_IMAGE_DIR)/bin/java -server -version | |
418 | |
419 copy_product_jdk: | |
420 $(RM) -r $(JDK_IMAGE_DIR) | |
421 $(MKDIR) -p $(JDK_IMAGE_DIR) | |
422 ($(CD) $(JDK_IMPORT_PATH) && \ | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
423 $(TAR) -cf - $(JDK_DIRS)) | \ |
0 | 424 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -) |
425 | |
426 copy_fastdebug_jdk: | |
427 $(RM) -r $(JDK_IMAGE_DIR)/fastdebug | |
428 $(MKDIR) -p $(JDK_IMAGE_DIR)/fastdebug | |
429 if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \ | |
430 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \ | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
431 $(TAR) -cf - $(JDK_DIRS)) | \ |
0 | 432 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \ |
433 else \ | |
434 ($(CD) $(JDK_IMPORT_PATH) && \ | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
435 $(TAR) -cf - $(JDK_DIRS)) | \ |
0 | 436 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \ |
437 fi | |
438 | |
439 copy_debug_jdk: | |
440 $(RM) -r $(JDK_IMAGE_DIR)/debug | |
441 $(MKDIR) -p $(JDK_IMAGE_DIR)/debug | |
442 if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \ | |
443 ($(CD) $(JDK_IMPORT_PATH)/debug && \ | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
444 $(TAR) -cf - $(JDK_DIRS)) | \ |
0 | 445 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \ |
446 elif [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \ | |
447 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \ | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
448 $(TAR) -cf - $(JDK_DIRS)) | \ |
0 | 449 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \ |
450 else \ | |
451 ($(CD) $(JDK_IMPORT_PATH) && \ | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
452 $(TAR) -cf - $(JDK_DIRS)) | \ |
0 | 453 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \ |
454 fi | |
455 | |
456 # | |
457 # Check target | |
458 # | |
459 check: variable_check | |
460 | |
461 # | |
462 # Help target | |
463 # | |
464 help: intro_help target_help variable_help notes_help examples_help | |
465 | |
466 # Intro help message | |
467 intro_help: | |
468 @$(ECHO) \ | |
469 "Makefile for the Hotspot workspace." | |
470 @$(ECHO) \ | |
471 "Default behavior is to build and create an export area for the j2se builds." | |
472 | |
473 # Target help | |
474 target_help: | |
475 @$(ECHO) "help: This help message" | |
476 @$(ECHO) "all: Same as: all_product all_fastdebug" | |
477 @$(ECHO) "world: Same as: all create_jdk" | |
478 @$(ECHO) "all_product: Same as: product product1 export_product" | |
479 @$(ECHO) "all_fastdebug: Same as: fastdebug fastdebug1 export_fastdebug" | |
480 @$(ECHO) "all_debug: Same as: jvmg jvmg1 export_debug" | |
481 @$(ECHO) "all_optimized: Same as: optimized optimized1 export_optimized" | |
482 @$(ECHO) "clean: Clean all areas" | |
483 @$(ECHO) "export_product: Export product files to EXPORT_PATH" | |
484 @$(ECHO) "export_fastdebug: Export fastdebug files to EXPORT_PATH" | |
485 @$(ECHO) "export_debug: Export debug files to EXPORT_PATH" | |
486 @$(ECHO) "export_optimized: Export optimized files to EXPORT_PATH" | |
487 @$(ECHO) "create_jdk: Create JDK image, export all files into it" | |
488 @$(ECHO) "update_jdk: Update JDK image with fresh exported files" | |
489 @$(ECHO) " " | |
490 @$(ECHO) "Others targets are:" | |
491 @$(ECHO) " $(C1_VM_TARGETS)" | |
492 @$(ECHO) " $(C2_VM_TARGETS)" | |
493 @$(ECHO) " $(KERNEL_VM_TARGETS)" | |
494 | |
495 # Variable help (only common ones used by this workspace) | |
496 variable_help: variable_help_intro variable_list variable_help_end | |
497 variable_help_intro: | |
498 @$(ECHO) "--- Common Variables ---" | |
499 variable_help_end: | |
500 @$(ECHO) " " | |
501 @$(ECHO) "--- Make Arguments ---" | |
502 @$(ECHO) "MAKE_ARGS=$(MAKE_ARGS)" | |
503 | |
504 # One line descriptions for the variables | |
505 SLASH_JAVA.desc = Root of all build tools, e.g. /java or J: | |
506 OUTPUTDIR.desc = Output directory, default is build/<osname> | |
507 BOOTDIR.desc = JDK used to compile agent java source and test with | |
508 JDK_IMPORT_PATH.desc = Promoted JDK to copy for 'create_jdk' | |
509 EXPORT_PATH.desc = Directory to place files to export for JDK build | |
510 | |
511 # Make variables to print out (description and value) | |
512 VARIABLE_PRINTVAL_LIST += \ | |
513 SLASH_JAVA \ | |
514 OUTPUTDIR \ | |
515 BOOTDIR \ | |
516 JDK_IMPORT_PATH \ | |
517 EXPORT_PATH | |
518 | |
519 # Make variables that should refer to directories that exist | |
520 VARIABLE_CHECKDIR_LIST += \ | |
521 SLASH_JAVA \ | |
522 BOOTDIR \ | |
523 JDK_IMPORT_PATH | |
524 | |
525 # For pattern rules below, so all are treated the same | |
526 DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval) | |
527 DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir) | |
528 | |
529 # Complete variable check | |
530 variable_check: $(DO_CHECKDIR_LIST) | |
531 variable_list: $(DO_PRINTVAL_LIST) variable_check | |
532 | |
533 # Pattern rule for printing out a variable | |
534 %.printval: | |
535 @$(ECHO) " ALT_$* - $($*.desc)" | |
536 @$(ECHO) " $*=$($*)" | |
537 | |
538 # Pattern rule for checking to see if a variable with a directory exists | |
539 %.checkdir: | |
540 @if [ ! -d $($*) ] ; then \ | |
541 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ | |
542 fi | |
543 | |
544 # Pattern rule for checking to see if a variable with a file exists | |
545 %.checkfil: | |
546 @if [ ! -f $($*) ] ; then \ | |
547 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ | |
548 fi | |
549 | |
550 # Misc notes on help | |
551 notes_help: | |
552 @$(ECHO) \ | |
553 "--- Notes --- " | |
554 @$(ECHO) \ | |
555 "- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted" | |
556 @$(ECHO) \ | |
557 " builds or previous release JDK builds will work." | |
558 @$(ECHO) \ | |
559 "- The fastest builds have been when the workspace and the BOOTDIR are on" | |
560 @$(ECHO) \ | |
561 " local disk." | |
562 | |
563 examples_help: | |
564 @$(ECHO) \ | |
565 "--- Examples --- " | |
566 @$(ECHO) \ | |
567 " $(MAKE) all" | |
568 @$(ECHO) \ | |
569 " $(MAKE) world" | |
570 @$(ECHO) \ | |
571 " $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)" | |
572 @$(ECHO) \ | |
573 " $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)" | |
574 | |
575 # JPRT rule to build this workspace | |
576 include $(GAMMADIR)/make/jprt.gmk | |
577 | |
578 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ | |
579 $(KERNEL_VM_TARGETS) \ | |
580 generic_build1 generic_build2 generic_buildkernel generic_export \ | |
581 export_product export_fastdebug export_debug export_optimized \ | |
582 export_jdk_product export_jdk_fastdebug export_jdk_debug \ | |
583 create_jdk copy_jdk update_jdk test_jdk \ | |
584 copy_product_jdk copy_fastdebug_jdk copy_debug_jdk | |
585 |