1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/make/Makefile Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,506 @@ 1.4 +# 1.5 +# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. 1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 +# 1.8 +# This code is free software; you can redistribute it and/or modify it 1.9 +# under the terms of the GNU General Public License version 2 only, as 1.10 +# published by the Free Software Foundation. 1.11 +# 1.12 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.15 +# version 2 for more details (a copy is included in the LICENSE file that 1.16 +# accompanied this code). 1.17 +# 1.18 +# You should have received a copy of the GNU General Public License version 1.19 +# 2 along with this work; if not, write to the Free Software Foundation, 1.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.21 +# 1.22 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.23 +# CA 95054 USA or visit www.sun.com if you need additional information or 1.24 +# have any questions. 1.25 +# 1.26 +# 1.27 + 1.28 +# Top level gnumake file for hotspot builds 1.29 +# 1.30 +# Default is to build the both product images and construct an export dir. 1.31 +# The default export directory name is `pwd`/export-$(PLATFORM). 1.32 +# 1.33 +# Use: 'gnumake help' for more information. 1.34 +# 1.35 +# This makefile uses the default settings for where to find compilers and 1.36 +# tools, and obeys the ALT_* variable settings used by the other JDK 1.37 +# workspaces. 1.38 +# 1.39 + 1.40 +# Expected/optional make variables defined on make command line: 1.41 +# LP64=1 or ARCH_DATA_MODEL=64 for 64bit build 1.42 +# 1.43 +# Expected/optional make variables or environment variables: 1.44 +# ALT_SLASH_JAVA Location of /java or J: 1.45 +# ALT_BOOTDIR Previous JDK home directory for javac compiler 1.46 +# ALT_OUTPUTDIR Output directory to use for hotspot build 1.47 +# ALT_EXPORT_PATH Directory to export hotspot build to 1.48 +# ALT_JDK_IMPORT_PATH Current JDK build (only for create_jdk rules) 1.49 +# ALT_BUILD_WIN_SA Building SA on Windows is disabled by default. 1.50 +# Set ALT_BUILD_WIN_SA=1 to enable building SA on 1.51 +# Windows. 1.52 +# Version strings and numbers: 1.53 +# JDK_VERSION Current JDK version (e.g. 1.6.0) 1.54 +# PREVIOUS_JDK_VERSION Previous (bootdir) JDK version (e.g. 1.5.0) 1.55 +# FULL_VERSION Full version string to use (e.g. "1.6.0-ea-b42") 1.56 +# 1.57 +# Version strings and numbers especially needed on Windows: 1.58 +# COOKED_JDK_UPDATE_VERSION Just the update release number (e.g. 02) 1.59 +# COOKED_BUILD_NUMBER Just the build number (e.g. 42) 1.60 +# JDK_MKTG_VERSION Marketing JDK version (e.g. 6.0) 1.61 +# JDK_MAJOR_VERSION Major number for version (e.g. 1) always 1? 1.62 +# JDK_MINOR_VERSION Minor number for version (e.g. 6) 1.63 +# JDK_MICRO_VERSION Micro number for version (e.g. 0) 1.64 +# 1.65 + 1.66 +# Default is build both product fastdebug and create export area 1.67 + 1.68 +# Allow to build HotSpot in local directory from sources specified by GAMMADIR. 1.69 +# After make/defs.make GAMMADIR is defined. 1.70 +ifdef GAMMADIR 1.71 + ifndef ALT_OUTPUTDIR 1.72 + ALT_OUTPUTDIR := $(shell pwd) 1.73 + endif 1.74 + include $(GAMMADIR)/make/defs.make 1.75 +else 1.76 + include defs.make 1.77 +endif 1.78 + 1.79 + 1.80 +ifneq ($(ALT_OUTPUTDIR),) 1.81 + ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR) 1.82 +else 1.83 + ALT_OUT= 1.84 +endif 1.85 + 1.86 +# Typical C1/C2 targets made available with this Makefile 1.87 +C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1 1.88 +C2_VM_TARGETS=product fastdebug optimized jvmg 1.89 +KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel 1.90 + 1.91 +all: all_product all_fastdebug 1.92 +all_product: product product1 productkernel docs export_product 1.93 +all_fastdebug: fastdebug fastdebug1 fastdebugkernel docs export_fastdebug 1.94 +all_debug: jvmg jvmg1 jvmgkernel docs export_debug 1.95 +all_optimized: optimized optimized1 optimizedkernel docs export_optimized 1.96 + 1.97 +# Do everything 1.98 +world: all create_jdk 1.99 + 1.100 +# Build or export docs 1.101 +docs: 1.102 +ifeq ($(OSNAME),windows) 1.103 + @$(ECHO) "No docs ($(VM_TARGET)) for windows" 1.104 +else 1.105 + $(CD) $(OUTPUTDIR); \ 1.106 + $(MAKE) -f $(ABS_OS_MAKEFILE) \ 1.107 + $(MAKE_ARGS) docs 1.108 +endif 1.109 + 1.110 +# Build variation of hotspot 1.111 +$(C1_VM_TARGETS): 1.112 + $(CD) $(GAMMADIR)/make; \ 1.113 + $(MAKE) VM_TARGET=$@ generic_build1 $(ALT_OUT) 1.114 + 1.115 +$(C2_VM_TARGETS): 1.116 + $(CD) $(GAMMADIR)/make; \ 1.117 + $(MAKE) VM_TARGET=$@ generic_build2 $(ALT_OUT) 1.118 + 1.119 +$(KERNEL_VM_TARGETS): 1.120 + $(CD) $(GAMMADIR)/make; \ 1.121 + $(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT) 1.122 + 1.123 +# Build compiler1 (client) rule, different for platforms 1.124 +generic_build1: 1.125 + $(MKDIR) -p $(OUTPUTDIR) 1.126 +ifeq ($(OSNAME),windows) 1.127 + ifeq ($(ARCH_DATA_MODEL), 32) 1.128 + $(CD) $(OUTPUTDIR); \ 1.129 + $(NMAKE) -f $(ABS_OS_MAKEFILE) \ 1.130 + Variant=compiler1 \ 1.131 + WorkSpace=$(ABS_GAMMADIR) \ 1.132 + BootStrapDir=$(ABS_BOOTDIR) \ 1.133 + BuildUser=$(USERNAME) \ 1.134 + $(MAKE_ARGS) $(VM_TARGET:%1=%) 1.135 + else 1.136 + @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" 1.137 + endif 1.138 +else 1.139 + ifeq ($(ARCH_DATA_MODEL), 32) 1.140 + $(CD) $(OUTPUTDIR); \ 1.141 + $(MAKE) -f $(ABS_OS_MAKEFILE) \ 1.142 + $(MAKE_ARGS) $(VM_TARGET) 1.143 + else 1.144 + @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" 1.145 + endif 1.146 +endif 1.147 + 1.148 +# Build compiler2 (server) rule, different for platforms 1.149 +generic_build2: 1.150 + $(MKDIR) -p $(OUTPUTDIR) 1.151 +ifeq ($(OSNAME),windows) 1.152 + $(CD) $(OUTPUTDIR); \ 1.153 + $(NMAKE) -f $(ABS_OS_MAKEFILE) \ 1.154 + Variant=compiler2 \ 1.155 + WorkSpace=$(ABS_GAMMADIR) \ 1.156 + BootStrapDir=$(ABS_BOOTDIR) \ 1.157 + BuildUser=$(USERNAME) \ 1.158 + $(MAKE_ARGS) $(VM_TARGET) 1.159 +else 1.160 + $(CD) $(OUTPUTDIR); \ 1.161 + $(MAKE) -f $(ABS_OS_MAKEFILE) \ 1.162 + $(MAKE_ARGS) $(VM_TARGET) 1.163 +endif 1.164 + 1.165 +generic_buildkernel: 1.166 + $(MKDIR) -p $(OUTPUTDIR) 1.167 +ifeq ($(OSNAME),windows) 1.168 + ifeq ($(ARCH_DATA_MODEL), 32) 1.169 + $(CD) $(OUTPUTDIR); \ 1.170 + $(NMAKE) -f $(ABS_OS_MAKEFILE) \ 1.171 + Variant=kernel \ 1.172 + WorkSpace=$(ABS_GAMMADIR) \ 1.173 + BootStrapDir=$(ABS_BOOTDIR) \ 1.174 + BuildUser=$(USERNAME) \ 1.175 + $(MAKE_ARGS) $(VM_TARGET:%kernel=%) 1.176 + else 1.177 + @$(ECHO) "No kernel ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" 1.178 + endif 1.179 +else 1.180 + @$(ECHO) "No kernel ($(VM_TARGET)) for OS_NAME=$(OSNAME)" 1.181 +endif 1.182 + 1.183 +# Export file rule 1.184 +generic_export: $(EXPORT_LIST) 1.185 +export_product: 1.186 + $(MAKE) VM_SUBDIR=product generic_export 1.187 +export_fastdebug: 1.188 + $(MAKE) VM_SUBDIR=fastdebug EXPORT_SUBDIR=/fastdebug generic_export 1.189 +export_debug: 1.190 + $(MAKE) VM_SUBDIR=${VM_DEBUG} EXPORT_SUBDIR=/debug generic_export 1.191 +export_optimized: 1.192 + $(MAKE) VM_SUBDIR=optimized EXPORT_SUBDIR=/optimized generic_export 1.193 +export_product_jdk: 1.194 + $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \ 1.195 + VM_SUBDIR=product generic_export 1.196 +export_optimized_jdk: 1.197 + $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \ 1.198 + VM_SUBDIR=optimized generic_export 1.199 +export_fastdebug_jdk: 1.200 + $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/fastdebug \ 1.201 + VM_SUBDIR=fastdebug generic_export 1.202 +export_debug_jdk: 1.203 + $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/debug \ 1.204 + VM_SUBDIR=${VM_DEBUG} generic_export 1.205 + 1.206 + 1.207 +# Export file copy rules 1.208 +XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt 1.209 +DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs 1.210 +C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 1.211 +C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 1.212 +KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel 1.213 +C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) 1.214 +C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) 1.215 +KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) 1.216 + 1.217 +# Misc files and generated files need to come from C1 or C2 area 1.218 +ifeq ($(ARCH_DATA_MODEL), 32) 1.219 + MISC_DIR=$(C1_DIR) 1.220 + GEN_DIR=$(C1_BASE_DIR)/generated 1.221 +else 1.222 + MISC_DIR=$(C2_DIR) 1.223 + GEN_DIR=$(C2_BASE_DIR)/generated 1.224 +endif 1.225 + 1.226 +# Bin files (windows) 1.227 +ifeq ($(OSNAME),windows) 1.228 + 1.229 +# Get jvm.lib 1.230 +$(EXPORT_LIB_DIR)/%.lib: $(MISC_DIR)/%.lib 1.231 + $(install-file) 1.232 + 1.233 +# Other libraries (like SA) 1.234 +$(EXPORT_JRE_BIN_DIR)/%.dll: $(MISC_DIR)/%.dll 1.235 + $(install-file) 1.236 +$(EXPORT_JRE_BIN_DIR)/%.pdb: $(MISC_DIR)/%.pdb 1.237 + $(install-file) 1.238 +$(EXPORT_JRE_BIN_DIR)/%.map: $(MISC_DIR)/%.map 1.239 + $(install-file) 1.240 + 1.241 +# Client files always come from C1 area 1.242 +$(EXPORT_CLIENT_DIR)/%.dll: $(C1_DIR)/%.dll 1.243 + $(install-file) 1.244 +$(EXPORT_CLIENT_DIR)/%.pdb: $(C1_DIR)/%.pdb 1.245 + $(install-file) 1.246 +$(EXPORT_CLIENT_DIR)/%.map: $(C1_DIR)/%.map 1.247 + $(install-file) 1.248 + 1.249 +# Server files always come from C2 area 1.250 +$(EXPORT_SERVER_DIR)/%.dll: $(C2_DIR)/%.dll 1.251 + $(install-file) 1.252 +$(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb 1.253 + $(install-file) 1.254 +$(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map 1.255 + $(install-file) 1.256 + 1.257 +# Kernel files always come from kernel area 1.258 +$(EXPORT_KERNEL_DIR)/%.dll: $(KERNEL_DIR)/%.dll 1.259 + $(install-file) 1.260 +$(EXPORT_KERNEL_DIR)/%.pdb: $(KERNEL_DIR)/%.pdb 1.261 + $(install-file) 1.262 +$(EXPORT_KERNEL_DIR)/%.map: $(KERNEL_DIR)/%.map 1.263 + $(install-file) 1.264 +endif 1.265 + 1.266 +# Shared Library 1.267 +ifneq ($(OSNAME),windows) 1.268 +$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so 1.269 + $(install-file) 1.270 +$(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so 1.271 + $(install-file) 1.272 +$(EXPORT_CLIENT_DIR)/64/%.so: $(C1_DIR)/%.so 1.273 + $(install-file) 1.274 +$(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so 1.275 + $(install-file) 1.276 +$(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so 1.277 + $(install-file) 1.278 +endif 1.279 + 1.280 +# Jar file (sa-jdi.jar) 1.281 +$(EXPORT_LIB_DIR)/%.jar: $(GEN_DIR)/%.jar 1.282 + $(install-file) 1.283 + 1.284 +# Include files (jvmti.h, jni.h, $(JDK_INCLUDE_SUBDIR)/jni_md.h, jmm.h) 1.285 +$(EXPORT_INCLUDE_DIR)/%: $(GEN_DIR)/jvmtifiles/% 1.286 + $(install-file) 1.287 + 1.288 +$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/% 1.289 + $(install-file) 1.290 + 1.291 +$(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_SRC_DIR)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h 1.292 + $(install-file) 1.293 + 1.294 +$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/services/% 1.295 + $(install-file) 1.296 + 1.297 +# Doc files (jvmti.html) 1.298 +$(EXPORT_DOCS_DIR)/platform/jvmti/%: $(DOCS_DIR)/% 1.299 + $(install-file) 1.300 + 1.301 +# Xusage file 1.302 +$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE) 1.303 + $(prep-target) 1.304 + $(RM) $@.temp 1.305 + $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp 1.306 + $(MV) $@.temp $@ 1.307 + 1.308 +# 1.309 +# Clean rules 1.310 +# 1.311 +clobber clean: clean_build clean_export clean_jdk 1.312 +clean_build: 1.313 + $(RM) -r $(C1_DIR) 1.314 + $(RM) -r $(C2_DIR) 1.315 + $(RM) -r $(KERNEL_DIR) 1.316 +clean_export: 1.317 + $(RM) -r $(EXPORT_PATH) 1.318 +clean_jdk: 1.319 + $(RM) -r $(JDK_IMAGE_DIR) 1.320 + 1.321 +# 1.322 +# Create JDK and place this build into it 1.323 +# 1.324 +create_jdk: copy_jdk update_jdk 1.325 + 1.326 +update_jdk: export_product_jdk export_fastdebug_jdk test_jdk 1.327 + 1.328 +copy_jdk: $(JDK_IMAGE_DIR)/jre/lib/rt.jar 1.329 + 1.330 +$(JDK_IMAGE_DIR)/jre/lib/rt.jar: 1.331 + $(RM) -r $(JDK_IMAGE_DIR) 1.332 + $(MKDIR) -p $(JDK_IMAGE_DIR) 1.333 + ($(CD) $(JDK_IMPORT_PATH) && \ 1.334 + $(TAR) -cf - *) | \ 1.335 + ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -) 1.336 + 1.337 +test_jdk: 1.338 + ifeq ($(ARCH_DATA_MODEL), 32) 1.339 + $(JDK_IMAGE_DIR)/bin/java -client -version 1.340 + endif 1.341 + $(JDK_IMAGE_DIR)/bin/java -server -version 1.342 + 1.343 +copy_product_jdk: 1.344 + $(RM) -r $(JDK_IMAGE_DIR) 1.345 + $(MKDIR) -p $(JDK_IMAGE_DIR) 1.346 + ($(CD) $(JDK_IMPORT_PATH) && \ 1.347 + $(TAR) -cf - bin include jre lib) | \ 1.348 + ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -) 1.349 + 1.350 +copy_fastdebug_jdk: 1.351 + $(RM) -r $(JDK_IMAGE_DIR)/fastdebug 1.352 + $(MKDIR) -p $(JDK_IMAGE_DIR)/fastdebug 1.353 + if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \ 1.354 + ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \ 1.355 + $(TAR) -cf - bin include jre lib) | \ 1.356 + ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \ 1.357 + else \ 1.358 + ($(CD) $(JDK_IMPORT_PATH) && \ 1.359 + $(TAR) -cf - bin include jre lib) | \ 1.360 + ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \ 1.361 + fi 1.362 + 1.363 +copy_debug_jdk: 1.364 + $(RM) -r $(JDK_IMAGE_DIR)/debug 1.365 + $(MKDIR) -p $(JDK_IMAGE_DIR)/debug 1.366 + if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \ 1.367 + ($(CD) $(JDK_IMPORT_PATH)/debug && \ 1.368 + $(TAR) -cf - bin include jre lib) | \ 1.369 + ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \ 1.370 + elif [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \ 1.371 + ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \ 1.372 + $(TAR) -cf - bin include jre lib) | \ 1.373 + ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \ 1.374 + else \ 1.375 + ($(CD) $(JDK_IMPORT_PATH) && \ 1.376 + $(TAR) -cf - bin include jre lib) | \ 1.377 + ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \ 1.378 + fi 1.379 + 1.380 +# 1.381 +# Check target 1.382 +# 1.383 +check: variable_check 1.384 + 1.385 +# 1.386 +# Help target 1.387 +# 1.388 +help: intro_help target_help variable_help notes_help examples_help 1.389 + 1.390 +# Intro help message 1.391 +intro_help: 1.392 + @$(ECHO) \ 1.393 +"Makefile for the Hotspot workspace." 1.394 + @$(ECHO) \ 1.395 +"Default behavior is to build and create an export area for the j2se builds." 1.396 + 1.397 +# Target help 1.398 +target_help: 1.399 + @$(ECHO) "help: This help message" 1.400 + @$(ECHO) "all: Same as: all_product all_fastdebug" 1.401 + @$(ECHO) "world: Same as: all create_jdk" 1.402 + @$(ECHO) "all_product: Same as: product product1 export_product" 1.403 + @$(ECHO) "all_fastdebug: Same as: fastdebug fastdebug1 export_fastdebug" 1.404 + @$(ECHO) "all_debug: Same as: jvmg jvmg1 export_debug" 1.405 + @$(ECHO) "all_optimized: Same as: optimized optimized1 export_optimized" 1.406 + @$(ECHO) "clean: Clean all areas" 1.407 + @$(ECHO) "export_product: Export product files to EXPORT_PATH" 1.408 + @$(ECHO) "export_fastdebug: Export fastdebug files to EXPORT_PATH" 1.409 + @$(ECHO) "export_debug: Export debug files to EXPORT_PATH" 1.410 + @$(ECHO) "export_optimized: Export optimized files to EXPORT_PATH" 1.411 + @$(ECHO) "create_jdk: Create JDK image, export all files into it" 1.412 + @$(ECHO) "update_jdk: Update JDK image with fresh exported files" 1.413 + @$(ECHO) " " 1.414 + @$(ECHO) "Others targets are:" 1.415 + @$(ECHO) " $(C1_VM_TARGETS)" 1.416 + @$(ECHO) " $(C2_VM_TARGETS)" 1.417 + @$(ECHO) " $(KERNEL_VM_TARGETS)" 1.418 + 1.419 +# Variable help (only common ones used by this workspace) 1.420 +variable_help: variable_help_intro variable_list variable_help_end 1.421 +variable_help_intro: 1.422 + @$(ECHO) "--- Common Variables ---" 1.423 +variable_help_end: 1.424 + @$(ECHO) " " 1.425 + @$(ECHO) "--- Make Arguments ---" 1.426 + @$(ECHO) "MAKE_ARGS=$(MAKE_ARGS)" 1.427 + 1.428 +# One line descriptions for the variables 1.429 +SLASH_JAVA.desc = Root of all build tools, e.g. /java or J: 1.430 +OUTPUTDIR.desc = Output directory, default is build/<osname> 1.431 +BOOTDIR.desc = JDK used to compile agent java source and test with 1.432 +JDK_IMPORT_PATH.desc = Promoted JDK to copy for 'create_jdk' 1.433 +EXPORT_PATH.desc = Directory to place files to export for JDK build 1.434 + 1.435 +# Make variables to print out (description and value) 1.436 +VARIABLE_PRINTVAL_LIST += \ 1.437 + SLASH_JAVA \ 1.438 + OUTPUTDIR \ 1.439 + BOOTDIR \ 1.440 + JDK_IMPORT_PATH \ 1.441 + EXPORT_PATH 1.442 + 1.443 +# Make variables that should refer to directories that exist 1.444 +VARIABLE_CHECKDIR_LIST += \ 1.445 + SLASH_JAVA \ 1.446 + BOOTDIR \ 1.447 + JDK_IMPORT_PATH 1.448 + 1.449 +# For pattern rules below, so all are treated the same 1.450 +DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval) 1.451 +DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir) 1.452 + 1.453 +# Complete variable check 1.454 +variable_check: $(DO_CHECKDIR_LIST) 1.455 +variable_list: $(DO_PRINTVAL_LIST) variable_check 1.456 + 1.457 +# Pattern rule for printing out a variable 1.458 +%.printval: 1.459 + @$(ECHO) " ALT_$* - $($*.desc)" 1.460 + @$(ECHO) " $*=$($*)" 1.461 + 1.462 +# Pattern rule for checking to see if a variable with a directory exists 1.463 +%.checkdir: 1.464 + @if [ ! -d $($*) ] ; then \ 1.465 + $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ 1.466 + fi 1.467 + 1.468 +# Pattern rule for checking to see if a variable with a file exists 1.469 +%.checkfil: 1.470 + @if [ ! -f $($*) ] ; then \ 1.471 + $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ 1.472 + fi 1.473 + 1.474 +# Misc notes on help 1.475 +notes_help: 1.476 + @$(ECHO) \ 1.477 +"--- Notes --- " 1.478 + @$(ECHO) \ 1.479 +"- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted" 1.480 + @$(ECHO) \ 1.481 +" builds or previous release JDK builds will work." 1.482 + @$(ECHO) \ 1.483 +"- The fastest builds have been when the workspace and the BOOTDIR are on" 1.484 + @$(ECHO) \ 1.485 +" local disk." 1.486 + 1.487 +examples_help: 1.488 + @$(ECHO) \ 1.489 +"--- Examples --- " 1.490 + @$(ECHO) \ 1.491 +" $(MAKE) all" 1.492 + @$(ECHO) \ 1.493 +" $(MAKE) world" 1.494 + @$(ECHO) \ 1.495 +" $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)" 1.496 + @$(ECHO) \ 1.497 +" $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)" 1.498 + 1.499 +# JPRT rule to build this workspace 1.500 +include $(GAMMADIR)/make/jprt.gmk 1.501 + 1.502 +.PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ 1.503 + $(KERNEL_VM_TARGETS) \ 1.504 + generic_build1 generic_build2 generic_buildkernel generic_export \ 1.505 + export_product export_fastdebug export_debug export_optimized \ 1.506 + export_jdk_product export_jdk_fastdebug export_jdk_debug \ 1.507 + create_jdk copy_jdk update_jdk test_jdk \ 1.508 + copy_product_jdk copy_fastdebug_jdk copy_debug_jdk 1.509 +