source: trunk/openjdk/hotspot/make/Makefile@ 413

Last change on this file since 413 was 278, checked in by dmik, 14 years ago

trunk: Merged in openjdk6 b22 from branches/vendor/oracle.

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