Wed, 02 Feb 2011 11:35:26 -0500
7016023: Enable building ARM and PPC from src/closed repository
Reviewed-by: dholmes, bdelsart
1 #
2 # Copyright (c) 2005, 2010, 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 #
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 #
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 #
63 # Default is build both product fastdebug and create export area
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
76 include $(GAMMADIR)/make/closed.make
78 ifneq ($(ALT_OUTPUTDIR),)
79 ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR)
80 else
81 ALT_OUT=
82 endif
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
88 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero
89 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark
91 # JDK directory list
92 JDK_DIRS=bin include jre lib demo
94 all: all_product all_fastdebug
95 ifndef BUILD_CLIENT_ONLY
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
99 else
100 all_product: product1 docs export_product
101 all_fastdebug: fastdebug1 docs export_fastdebug
102 all_debug: jvmg1 docs export_debug
103 endif
104 all_optimized: optimized optimized1 optimizedkernel docs export_optimized
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
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
118 # Do everything
119 world: all create_jdk
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
131 # Build variation of hotspot
132 $(C1_VM_TARGETS):
133 $(CD) $(GAMMADIR)/make; \
134 $(MAKE) VM_TARGET=$@ generic_build1 $(ALT_OUT)
136 $(C2_VM_TARGETS):
137 $(CD) $(GAMMADIR)/make; \
138 $(MAKE) VM_TARGET=$@ generic_build2 $(ALT_OUT)
140 $(KERNEL_VM_TARGETS):
141 $(CD) $(GAMMADIR)/make; \
142 $(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT)
144 $(ZERO_VM_TARGETS):
145 $(CD) $(GAMMADIR)/make; \
146 $(MAKE) VM_TARGET=$@ generic_buildzero $(ALT_OUT)
148 $(SHARK_VM_TARGETS):
149 $(CD) $(GAMMADIR)/make; \
150 $(MAKE) VM_TARGET=$@ generic_buildshark $(ALT_OUT)
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 ifeq ($(ARCH_DATA_MODEL), 32)
169 $(CD) $(OUTPUTDIR); \
170 $(MAKE) -f $(ABS_OS_MAKEFILE) \
171 $(MAKE_ARGS) $(VM_TARGET)
172 else
173 @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
174 endif
175 endif
177 # Build compiler2 (server) rule, different for platforms
178 generic_build2:
179 $(MKDIR) -p $(OUTPUTDIR)
180 ifeq ($(OSNAME),windows)
181 $(CD) $(OUTPUTDIR); \
182 $(NMAKE) -f $(ABS_OS_MAKEFILE) \
183 Variant=compiler2 \
184 WorkSpace=$(ABS_GAMMADIR) \
185 BootStrapDir=$(ABS_BOOTDIR) \
186 BuildUser=$(USERNAME) \
187 $(MAKE_ARGS) $(VM_TARGET)
188 else
189 $(CD) $(OUTPUTDIR); \
190 $(MAKE) -f $(ABS_OS_MAKEFILE) \
191 $(MAKE_ARGS) $(VM_TARGET)
192 endif
194 generic_buildkernel:
195 $(MKDIR) -p $(OUTPUTDIR)
196 ifeq ($(OSNAME),windows)
197 ifeq ($(ARCH_DATA_MODEL), 32)
198 $(CD) $(OUTPUTDIR); \
199 $(NMAKE) -f $(ABS_OS_MAKEFILE) \
200 Variant=kernel \
201 WorkSpace=$(ABS_GAMMADIR) \
202 BootStrapDir=$(ABS_BOOTDIR) \
203 BuildUser=$(USERNAME) \
204 $(MAKE_ARGS) $(VM_TARGET:%kernel=%)
205 else
206 @$(ECHO) "No kernel ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
207 endif
208 else
209 @$(ECHO) "No kernel ($(VM_TARGET)) for OS_NAME=$(OSNAME)"
210 endif
212 generic_buildzero:
213 $(MKDIR) -p $(OUTPUTDIR)
214 $(CD) $(OUTPUTDIR); \
215 $(MAKE) -f $(ABS_OS_MAKEFILE) \
216 $(MAKE_ARGS) $(VM_TARGET)
218 generic_buildshark:
219 $(MKDIR) -p $(OUTPUTDIR)
220 $(CD) $(OUTPUTDIR); \
221 $(MAKE) -f $(ABS_OS_MAKEFILE) \
222 $(MAKE_ARGS) $(VM_TARGET)
224 # Export file rule
225 generic_export: $(EXPORT_LIST)
226 export_product:
227 $(MAKE) VM_SUBDIR=product generic_export
228 export_fastdebug:
229 $(MAKE) VM_SUBDIR=fastdebug EXPORT_SUBDIR=/fastdebug generic_export
230 export_debug:
231 $(MAKE) VM_SUBDIR=${VM_DEBUG} EXPORT_SUBDIR=/debug generic_export
232 export_optimized:
233 $(MAKE) VM_SUBDIR=optimized EXPORT_SUBDIR=/optimized generic_export
234 export_product_jdk:
235 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \
236 VM_SUBDIR=product generic_export
237 export_optimized_jdk:
238 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \
239 VM_SUBDIR=optimized generic_export
240 export_fastdebug_jdk:
241 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/fastdebug \
242 VM_SUBDIR=fastdebug generic_export
243 export_debug_jdk:
244 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/debug \
245 VM_SUBDIR=${VM_DEBUG} generic_export
248 # Export file copy rules
249 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt
250 DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs
251 C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1
252 C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
253 KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel
254 ZERO_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_zero
255 SHARK_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark
256 C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR)
257 C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR)
258 KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR)
259 ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR)
260 SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR)
262 # Misc files and generated files need to come from C1 or C2 area
263 ifeq ($(ZERO_BUILD), true)
264 ifeq ($(SHARK_BUILD), true)
265 MISC_DIR=$(SHARK_DIR)
266 GEN_DIR=$(SHARK_BASE_DIR)/generated
267 else
268 MISC_DIR=$(ZERO_DIR)
269 GEN_DIR=$(ZERO_BASE_DIR)/generated
270 endif
271 else
272 ifeq ($(ARCH_DATA_MODEL), 32)
273 MISC_DIR=$(C1_DIR)
274 GEN_DIR=$(C1_BASE_DIR)/generated
275 else
276 MISC_DIR=$(C2_DIR)
277 GEN_DIR=$(C2_BASE_DIR)/generated
278 endif
279 endif
281 # Bin files (windows)
282 ifeq ($(OSNAME),windows)
284 # Get jvm.lib
285 $(EXPORT_LIB_DIR)/%.lib: $(MISC_DIR)/%.lib
286 $(install-file)
288 # Other libraries (like SA)
289 $(EXPORT_JRE_BIN_DIR)/%.dll: $(MISC_DIR)/%.dll
290 $(install-file)
291 $(EXPORT_JRE_BIN_DIR)/%.pdb: $(MISC_DIR)/%.pdb
292 $(install-file)
293 $(EXPORT_JRE_BIN_DIR)/%.map: $(MISC_DIR)/%.map
294 $(install-file)
296 # Client files always come from C1 area
297 $(EXPORT_CLIENT_DIR)/%.dll: $(C1_DIR)/%.dll
298 $(install-file)
299 $(EXPORT_CLIENT_DIR)/%.pdb: $(C1_DIR)/%.pdb
300 $(install-file)
301 $(EXPORT_CLIENT_DIR)/%.map: $(C1_DIR)/%.map
302 $(install-file)
304 # Server files always come from C2 area
305 $(EXPORT_SERVER_DIR)/%.dll: $(C2_DIR)/%.dll
306 $(install-file)
307 $(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb
308 $(install-file)
309 $(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map
310 $(install-file)
312 # Kernel files always come from kernel area
313 $(EXPORT_KERNEL_DIR)/%.dll: $(KERNEL_DIR)/%.dll
314 $(install-file)
315 $(EXPORT_KERNEL_DIR)/%.pdb: $(KERNEL_DIR)/%.pdb
316 $(install-file)
317 $(EXPORT_KERNEL_DIR)/%.map: $(KERNEL_DIR)/%.map
318 $(install-file)
319 endif
321 # Shared Library
322 ifneq ($(OSNAME),windows)
323 ifeq ($(ZERO_BUILD), true)
324 ifeq ($(SHARK_BUILD), true)
325 $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(SHARK_DIR)/%.so
326 $(install-file)
327 $(EXPORT_SERVER_DIR)/%.so: $(SHARK_DIR)/%.so
328 $(install-file)
329 else
330 $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(ZERO_DIR)/%.so
331 $(install-file)
332 $(EXPORT_SERVER_DIR)/%.so: $(ZERO_DIR)/%.so
333 $(install-file)
334 endif
335 else
336 $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C1_DIR)/%.so
337 $(install-file)
338 $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so
339 $(install-file)
340 $(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so
341 $(install-file)
342 $(EXPORT_CLIENT_DIR)/64/%.so: $(C1_DIR)/%.so
343 $(install-file)
344 $(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so
345 $(install-file)
346 $(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so
347 $(install-file)
348 endif
349 endif
351 # Jar file (sa-jdi.jar)
352 $(EXPORT_LIB_DIR)/%.jar: $(GEN_DIR)/%.jar
353 $(install-file)
355 # Include files (jvmti.h, jvmticmlr.h, jni.h, $(JDK_INCLUDE_SUBDIR)/jni_md.h, jmm.h)
356 $(EXPORT_INCLUDE_DIR)/%: $(GEN_DIR)/jvmtifiles/%
357 $(install-file)
359 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/code/%
360 $(install-file)
362 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/%
363 $(install-file)
365 $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_JNI_ARCH_SRC)
366 $(install-file)
368 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/services/%
369 $(install-file)
371 # Doc files (jvmti.html)
372 $(EXPORT_DOCS_DIR)/platform/jvmti/%: $(DOCS_DIR)/%
373 $(install-file)
375 # Xusage file
376 $(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE)
377 $(prep-target)
378 $(RM) $@.temp
379 $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp
380 $(MV) $@.temp $@
382 #
383 # Clean rules
384 #
385 clobber clean: clean_build clean_export clean_jdk
386 clean_build:
387 $(RM) -r $(C1_DIR)
388 $(RM) -r $(C2_DIR)
389 $(RM) -r $(KERNEL_DIR)
390 $(RM) -r $(ZERO_DIR)
391 $(RM) -r $(SHARK_DIR)
392 clean_export:
393 $(RM) -r $(EXPORT_PATH)
394 clean_jdk:
395 $(RM) -r $(JDK_IMAGE_DIR)
397 #
398 # Create JDK and place this build into it
399 #
400 create_jdk: copy_jdk update_jdk
402 update_jdk: export_product_jdk export_fastdebug_jdk test_jdk
404 copy_jdk: $(JDK_IMAGE_DIR)/jre/lib/rt.jar
406 $(JDK_IMAGE_DIR)/jre/lib/rt.jar:
407 $(RM) -r $(JDK_IMAGE_DIR)
408 $(MKDIR) -p $(JDK_IMAGE_DIR)
409 ($(CD) $(JDK_IMPORT_PATH) && \
410 $(TAR) -cf - *) | \
411 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
413 test_jdk:
414 ifneq ($(ZERO_BUILD), true)
415 ifeq ($(ARCH_DATA_MODEL), 32)
416 $(JDK_IMAGE_DIR)/bin/java -client -version
417 endif
418 endif
419 $(JDK_IMAGE_DIR)/bin/java -server -version
421 copy_product_jdk:
422 $(RM) -r $(JDK_IMAGE_DIR)
423 $(MKDIR) -p $(JDK_IMAGE_DIR)
424 ($(CD) $(JDK_IMPORT_PATH) && \
425 $(TAR) -cf - $(JDK_DIRS)) | \
426 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
428 copy_fastdebug_jdk:
429 $(RM) -r $(JDK_IMAGE_DIR)/fastdebug
430 $(MKDIR) -p $(JDK_IMAGE_DIR)/fastdebug
431 if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
432 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
433 $(TAR) -cf - $(JDK_DIRS)) | \
434 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
435 else \
436 ($(CD) $(JDK_IMPORT_PATH) && \
437 $(TAR) -cf - $(JDK_DIRS)) | \
438 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
439 fi
441 copy_debug_jdk:
442 $(RM) -r $(JDK_IMAGE_DIR)/debug
443 $(MKDIR) -p $(JDK_IMAGE_DIR)/debug
444 if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \
445 ($(CD) $(JDK_IMPORT_PATH)/debug && \
446 $(TAR) -cf - $(JDK_DIRS)) | \
447 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
448 elif [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
449 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
450 $(TAR) -cf - $(JDK_DIRS)) | \
451 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
452 else \
453 ($(CD) $(JDK_IMPORT_PATH) && \
454 $(TAR) -cf - $(JDK_DIRS)) | \
455 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
456 fi
458 #
459 # Check target
460 #
461 check: variable_check
463 #
464 # Help target
465 #
466 help: intro_help target_help variable_help notes_help examples_help
468 # Intro help message
469 intro_help:
470 @$(ECHO) \
471 "Makefile for the Hotspot workspace."
472 @$(ECHO) \
473 "Default behavior is to build and create an export area for the j2se builds."
475 # Target help
476 target_help:
477 @$(ECHO) "help: This help message"
478 @$(ECHO) "all: Same as: all_product all_fastdebug"
479 @$(ECHO) "world: Same as: all create_jdk"
480 @$(ECHO) "all_product: Same as: product product1 export_product"
481 @$(ECHO) "all_fastdebug: Same as: fastdebug fastdebug1 export_fastdebug"
482 @$(ECHO) "all_debug: Same as: jvmg jvmg1 export_debug"
483 @$(ECHO) "all_optimized: Same as: optimized optimized1 export_optimized"
484 @$(ECHO) "clean: Clean all areas"
485 @$(ECHO) "export_product: Export product files to EXPORT_PATH"
486 @$(ECHO) "export_fastdebug: Export fastdebug files to EXPORT_PATH"
487 @$(ECHO) "export_debug: Export debug files to EXPORT_PATH"
488 @$(ECHO) "export_optimized: Export optimized files to EXPORT_PATH"
489 @$(ECHO) "create_jdk: Create JDK image, export all files into it"
490 @$(ECHO) "update_jdk: Update JDK image with fresh exported files"
491 @$(ECHO) " "
492 @$(ECHO) "Others targets are:"
493 @$(ECHO) " $(C1_VM_TARGETS)"
494 @$(ECHO) " $(C2_VM_TARGETS)"
495 @$(ECHO) " $(KERNEL_VM_TARGETS)"
497 # Variable help (only common ones used by this workspace)
498 variable_help: variable_help_intro variable_list variable_help_end
499 variable_help_intro:
500 @$(ECHO) "--- Common Variables ---"
501 variable_help_end:
502 @$(ECHO) " "
503 @$(ECHO) "--- Make Arguments ---"
504 @$(ECHO) "MAKE_ARGS=$(MAKE_ARGS)"
506 # One line descriptions for the variables
507 SLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
508 OUTPUTDIR.desc = Output directory, default is build/<osname>
509 BOOTDIR.desc = JDK used to compile agent java source and test with
510 JDK_IMPORT_PATH.desc = Promoted JDK to copy for 'create_jdk'
511 EXPORT_PATH.desc = Directory to place files to export for JDK build
513 # Make variables to print out (description and value)
514 VARIABLE_PRINTVAL_LIST += \
515 SLASH_JAVA \
516 OUTPUTDIR \
517 BOOTDIR \
518 JDK_IMPORT_PATH \
519 EXPORT_PATH
521 # Make variables that should refer to directories that exist
522 VARIABLE_CHECKDIR_LIST += \
523 SLASH_JAVA \
524 BOOTDIR \
525 JDK_IMPORT_PATH
527 # For pattern rules below, so all are treated the same
528 DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
529 DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
531 # Complete variable check
532 variable_check: $(DO_CHECKDIR_LIST)
533 variable_list: $(DO_PRINTVAL_LIST) variable_check
535 # Pattern rule for printing out a variable
536 %.printval:
537 @$(ECHO) " ALT_$* - $($*.desc)"
538 @$(ECHO) " $*=$($*)"
540 # Pattern rule for checking to see if a variable with a directory exists
541 %.checkdir:
542 @if [ ! -d $($*) ] ; then \
543 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
544 fi
546 # Pattern rule for checking to see if a variable with a file exists
547 %.checkfil:
548 @if [ ! -f $($*) ] ; then \
549 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
550 fi
552 # Misc notes on help
553 notes_help:
554 @$(ECHO) \
555 "--- Notes --- "
556 @$(ECHO) \
557 "- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted"
558 @$(ECHO) \
559 " builds or previous release JDK builds will work."
560 @$(ECHO) \
561 "- The fastest builds have been when the workspace and the BOOTDIR are on"
562 @$(ECHO) \
563 " local disk."
565 examples_help:
566 @$(ECHO) \
567 "--- Examples --- "
568 @$(ECHO) \
569 " $(MAKE) all"
570 @$(ECHO) \
571 " $(MAKE) world"
572 @$(ECHO) \
573 " $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)"
574 @$(ECHO) \
575 " $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)"
577 # JPRT rule to build this workspace
578 include $(GAMMADIR)/make/jprt.gmk
580 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \
581 $(KERNEL_VM_TARGETS) \
582 generic_build1 generic_build2 generic_buildkernel generic_export \
583 export_product export_fastdebug export_debug export_optimized \
584 export_jdk_product export_jdk_fastdebug export_jdk_debug \
585 create_jdk copy_jdk update_jdk test_jdk \
586 copy_product_jdk copy_fastdebug_jdk copy_debug_jdk