source: trunk/openjdk/hotspot/make/Makefile

Last change on this file was 448, checked in by dmik, 9 years ago

Remove SYM file generation on OS/2.

This doesn't make any practical sense as there is embedded HLL debug
info which is much more verbose than SYM and doesn't require separate
files (it is generated when -g option is passed to gcc).

This commint also removes the dependency on mapsym.exe and wmapsym.cmd.

File size: 18.3 KB
RevLine 
[2]1#
[278]2# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
[2]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#
[278]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.
[2]22#
[40]23#
[2]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
[278]88SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark
[2]89
90# JDK directory list
91JDK_DIRS=bin include jre lib demo
92
93all: all_product all_fastdebug
[278]94ifndef BUILD_CLIENT_ONLY
[2]95all_product: product product1 productkernel docs export_product
96all_fastdebug: fastdebug fastdebug1 fastdebugkernel docs export_fastdebug
97all_debug: jvmg jvmg1 jvmgkernel docs export_debug
[278]98else
99all_product: product1 docs export_product
100all_fastdebug: fastdebug1 docs export_fastdebug
101all_debug: jvmg1 docs export_debug
102endif
[2]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
[278]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
[2]117# Do everything
118world: all create_jdk
119
120# Build or export docs
121docs:
[40]122ifeq ($(filter-out windows os2,$(OSNAME)),)
123 @$(ECHO) "No docs ($(VM_TARGET)) for windows/os2"
[2]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
[278]147$(SHARK_VM_TARGETS):
148 $(CD) $(GAMMADIR)/make; \
149 $(MAKE) VM_TARGET=$@ generic_buildshark $(ALT_OUT)
150
[2]151# Build compiler1 (client) rule, different for platforms
152generic_build1:
153 $(MKDIR) -p $(OUTPUTDIR)
[40]154ifeq ($(filter-out windows os2,$(OSNAME)),)
[2]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)
[40]179ifeq ($(filter-out windows os2,$(OSNAME)),)
[2]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)
[40]195ifeq ($(filter-out windows os2,$(OSNAME)),)
[2]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
[278]217generic_buildshark:
218 $(MKDIR) -p $(OUTPUTDIR)
219 $(CD) $(OUTPUTDIR); \
220 $(MAKE) -f $(ABS_OS_MAKEFILE) \
221 $(MAKE_ARGS) $(VM_TARGET)
222
[2]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
[278]254SHARK_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark
[2]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)
[278]259SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR)
[2]260
261# Misc files and generated files need to come from C1 or C2 area
262ifeq ($(ZERO_BUILD), true)
[278]263ifeq ($(SHARK_BUILD), true)
264 MISC_DIR=$(SHARK_DIR)
265 GEN_DIR=$(SHARK_BASE_DIR)/generated
266else
[2]267 MISC_DIR=$(ZERO_DIR)
268 GEN_DIR=$(ZERO_BASE_DIR)/generated
[278]269endif
[2]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
[40]280# Bin files (windows, os2)
281ifeq ($(filter-out windows os2,$(OSNAME)),)
[2]282
[40]283# Get jvm.lib
[2]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)
[42]290 ifneq ($(OSNAME),os2)
[2]291$(EXPORT_JRE_BIN_DIR)/%.pdb: $(MISC_DIR)/%.pdb
292 $(install-file)
[40]293 endif
[2]294$(EXPORT_JRE_BIN_DIR)/%.map: $(MISC_DIR)/%.map
295 $(install-file)
296
297# Client files always come from C1 area
298$(EXPORT_CLIENT_DIR)/%.dll: $(C1_DIR)/%.dll
299 $(install-file)
[42]300 ifneq ($(OSNAME),os2)
[2]301$(EXPORT_CLIENT_DIR)/%.pdb: $(C1_DIR)/%.pdb
302 $(install-file)
[40]303 endif
[2]304$(EXPORT_CLIENT_DIR)/%.map: $(C1_DIR)/%.map
305 $(install-file)
306
307# Server files always come from C2 area
308$(EXPORT_SERVER_DIR)/%.dll: $(C2_DIR)/%.dll
309 $(install-file)
[42]310 ifneq ($(OSNAME),os2)
[2]311$(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb
312 $(install-file)
[40]313 endif
[2]314$(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map
315 $(install-file)
316
317# Kernel files always come from kernel area
318$(EXPORT_KERNEL_DIR)/%.dll: $(KERNEL_DIR)/%.dll
319 $(install-file)
[42]320 ifneq ($(OSNAME),os2)
[2]321$(EXPORT_KERNEL_DIR)/%.pdb: $(KERNEL_DIR)/%.pdb
322 $(install-file)
[40]323 endif
[2]324$(EXPORT_KERNEL_DIR)/%.map: $(KERNEL_DIR)/%.map
325 $(install-file)
326endif
327
328# Shared Library
[40]329ifneq ($(filter-out windows os2,$(OSNAME)),)
[2]330 ifeq ($(ZERO_BUILD), true)
[278]331 ifeq ($(SHARK_BUILD), true)
332$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(SHARK_DIR)/%.so
333 $(install-file)
334$(EXPORT_SERVER_DIR)/%.so: $(SHARK_DIR)/%.so
335 $(install-file)
336 else
[2]337$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(ZERO_DIR)/%.so
338 $(install-file)
339$(EXPORT_SERVER_DIR)/%.so: $(ZERO_DIR)/%.so
340 $(install-file)
[278]341 endif
[2]342 else
[278]343$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C1_DIR)/%.so
344 $(install-file)
[2]345$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so
346 $(install-file)
347$(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so
348 $(install-file)
349$(EXPORT_CLIENT_DIR)/64/%.so: $(C1_DIR)/%.so
350 $(install-file)
351$(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so
352 $(install-file)
353$(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so
354 $(install-file)
355 endif
356endif
357
358# Jar file (sa-jdi.jar)
359$(EXPORT_LIB_DIR)/%.jar: $(GEN_DIR)/%.jar
360 $(install-file)
361
362# Include files (jvmti.h, jvmticmlr.h, jni.h, $(JDK_INCLUDE_SUBDIR)/jni_md.h, jmm.h)
363$(EXPORT_INCLUDE_DIR)/%: $(GEN_DIR)/jvmtifiles/%
364 $(install-file)
365
366$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/code/%
367 $(install-file)
368
369$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/%
370 $(install-file)
371
372$(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_SRC_DIR)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h
373 $(install-file)
374
375$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/services/%
376 $(install-file)
377
378# Doc files (jvmti.html)
379$(EXPORT_DOCS_DIR)/platform/jvmti/%: $(DOCS_DIR)/%
380 $(install-file)
381
382# Xusage file
383$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE)
384 $(prep-target)
385 $(RM) $@.temp
386 $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp
387 $(MV) $@.temp $@
388
389#
390# Clean rules
391#
392clobber clean: clean_build clean_export clean_jdk
393clean_build:
394 $(RM) -r $(C1_DIR)
395 $(RM) -r $(C2_DIR)
396 $(RM) -r $(KERNEL_DIR)
397 $(RM) -r $(ZERO_DIR)
[278]398 $(RM) -r $(SHARK_DIR)
[2]399clean_export:
400 $(RM) -r $(EXPORT_PATH)
401clean_jdk:
402 $(RM) -r $(JDK_IMAGE_DIR)
403
404#
405# Create JDK and place this build into it
406#
407create_jdk: copy_jdk update_jdk
408
409update_jdk: export_product_jdk export_fastdebug_jdk test_jdk
410
411copy_jdk: $(JDK_IMAGE_DIR)/jre/lib/rt.jar
412
413$(JDK_IMAGE_DIR)/jre/lib/rt.jar:
414 $(RM) -r $(JDK_IMAGE_DIR)
415 $(MKDIR) -p $(JDK_IMAGE_DIR)
416 ($(CD) $(JDK_IMPORT_PATH) && \
417 $(TAR) -cf - *) | \
418 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
419
420test_jdk:
421 ifneq ($(ZERO_BUILD), true)
422 ifeq ($(ARCH_DATA_MODEL), 32)
423 $(JDK_IMAGE_DIR)/bin/java -client -version
424 endif
425 endif
426 $(JDK_IMAGE_DIR)/bin/java -server -version
427
428copy_product_jdk:
429 $(RM) -r $(JDK_IMAGE_DIR)
430 $(MKDIR) -p $(JDK_IMAGE_DIR)
431 ($(CD) $(JDK_IMPORT_PATH) && \
432 $(TAR) -cf - $(JDK_DIRS)) | \
433 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
434
435copy_fastdebug_jdk:
436 $(RM) -r $(JDK_IMAGE_DIR)/fastdebug
437 $(MKDIR) -p $(JDK_IMAGE_DIR)/fastdebug
438 if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
439 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
440 $(TAR) -cf - $(JDK_DIRS)) | \
441 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
442 else \
443 ($(CD) $(JDK_IMPORT_PATH) && \
444 $(TAR) -cf - $(JDK_DIRS)) | \
445 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
446 fi
447
448copy_debug_jdk:
449 $(RM) -r $(JDK_IMAGE_DIR)/debug
450 $(MKDIR) -p $(JDK_IMAGE_DIR)/debug
451 if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \
452 ($(CD) $(JDK_IMPORT_PATH)/debug && \
453 $(TAR) -cf - $(JDK_DIRS)) | \
454 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
455 elif [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
456 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
457 $(TAR) -cf - $(JDK_DIRS)) | \
458 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
459 else \
460 ($(CD) $(JDK_IMPORT_PATH) && \
461 $(TAR) -cf - $(JDK_DIRS)) | \
462 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
463 fi
464
465#
466# Check target
467#
468check: variable_check
469
470#
471# Help target
472#
473help: intro_help target_help variable_help notes_help examples_help
474
475# Intro help message
476intro_help:
477 @$(ECHO) \
[40]478"Makefile for the Hotspot workspace."
[2]479 @$(ECHO) \
480"Default behavior is to build and create an export area for the j2se builds."
481
482# Target help
483target_help:
484 @$(ECHO) "help: This help message"
485 @$(ECHO) "all: Same as: all_product all_fastdebug"
486 @$(ECHO) "world: Same as: all create_jdk"
487 @$(ECHO) "all_product: Same as: product product1 export_product"
488 @$(ECHO) "all_fastdebug: Same as: fastdebug fastdebug1 export_fastdebug"
489 @$(ECHO) "all_debug: Same as: jvmg jvmg1 export_debug"
490 @$(ECHO) "all_optimized: Same as: optimized optimized1 export_optimized"
491 @$(ECHO) "clean: Clean all areas"
492 @$(ECHO) "export_product: Export product files to EXPORT_PATH"
493 @$(ECHO) "export_fastdebug: Export fastdebug files to EXPORT_PATH"
494 @$(ECHO) "export_debug: Export debug files to EXPORT_PATH"
495 @$(ECHO) "export_optimized: Export optimized files to EXPORT_PATH"
496 @$(ECHO) "create_jdk: Create JDK image, export all files into it"
497 @$(ECHO) "update_jdk: Update JDK image with fresh exported files"
498 @$(ECHO) " "
499 @$(ECHO) "Others targets are:"
500 @$(ECHO) " $(C1_VM_TARGETS)"
501 @$(ECHO) " $(C2_VM_TARGETS)"
502 @$(ECHO) " $(KERNEL_VM_TARGETS)"
503
504# Variable help (only common ones used by this workspace)
505variable_help: variable_help_intro variable_list variable_help_end
506variable_help_intro:
507 @$(ECHO) "--- Common Variables ---"
508variable_help_end:
509 @$(ECHO) " "
510 @$(ECHO) "--- Make Arguments ---"
511 @$(ECHO) "MAKE_ARGS=$(MAKE_ARGS)"
512
513# One line descriptions for the variables
514SLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
515OUTPUTDIR.desc = Output directory, default is build/<osname>
516BOOTDIR.desc = JDK used to compile agent java source and test with
517JDK_IMPORT_PATH.desc = Promoted JDK to copy for 'create_jdk'
518EXPORT_PATH.desc = Directory to place files to export for JDK build
519
520# Make variables to print out (description and value)
521VARIABLE_PRINTVAL_LIST += \
522 SLASH_JAVA \
523 OUTPUTDIR \
524 BOOTDIR \
525 JDK_IMPORT_PATH \
526 EXPORT_PATH
527
528# Make variables that should refer to directories that exist
529VARIABLE_CHECKDIR_LIST += \
530 SLASH_JAVA \
531 BOOTDIR \
532 JDK_IMPORT_PATH
533
534# For pattern rules below, so all are treated the same
535DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
536DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
537
538# Complete variable check
539variable_check: $(DO_CHECKDIR_LIST)
540variable_list: $(DO_PRINTVAL_LIST) variable_check
541
542# Pattern rule for printing out a variable
543%.printval:
544 @$(ECHO) " ALT_$* - $($*.desc)"
545 @$(ECHO) " $*=$($*)"
546
547# Pattern rule for checking to see if a variable with a directory exists
548%.checkdir:
549 @if [ ! -d $($*) ] ; then \
550 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
551 fi
552
553# Pattern rule for checking to see if a variable with a file exists
554%.checkfil:
555 @if [ ! -f $($*) ] ; then \
556 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
557 fi
558
559# Misc notes on help
560notes_help:
561 @$(ECHO) \
562"--- Notes --- "
563 @$(ECHO) \
564"- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted"
565 @$(ECHO) \
566" builds or previous release JDK builds will work."
567 @$(ECHO) \
568"- The fastest builds have been when the workspace and the BOOTDIR are on"
569 @$(ECHO) \
570" local disk."
571
572examples_help:
573 @$(ECHO) \
574"--- Examples --- "
575 @$(ECHO) \
576" $(MAKE) all"
577 @$(ECHO) \
578" $(MAKE) world"
579 @$(ECHO) \
[40]580" $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)"
[2]581 @$(ECHO) \
582" $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)"
583
584# JPRT rule to build this workspace
585include $(GAMMADIR)/make/jprt.gmk
586
587.PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \
588 $(KERNEL_VM_TARGETS) \
589 generic_build1 generic_build2 generic_buildkernel generic_export \
590 export_product export_fastdebug export_debug export_optimized \
591 export_jdk_product export_jdk_fastdebug export_jdk_debug \
592 create_jdk copy_jdk update_jdk test_jdk \
593 copy_product_jdk copy_fastdebug_jdk copy_debug_jdk
594
Note: See TracBrowser for help on using the repository browser.