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