make/Makefile

Wed, 19 Jun 2013 12:15:50 +0200

author
goetz
date
Wed, 19 Jun 2013 12:15:50 +0200
changeset 6439
164db61dbced
parent 5109
aabf54ccedb1
child 6442
b5c8a61d7fa0
permissions
-rw-r--r--

8016476: PPC64 (part 1): reenable CORE build
Summary: reenable CORE build on PPC64
Reviewed-by: dholmes, kvn, coleenp

duke@435 1 #
zgu@4492 2 # Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
duke@435 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 #
duke@435 5 # This code is free software; you can redistribute it and/or modify it
duke@435 6 # under the terms of the GNU General Public License version 2 only, as
duke@435 7 # published by the Free Software Foundation.
duke@435 8 #
duke@435 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 # accompanied this code).
duke@435 14 #
duke@435 15 # You should have received a copy of the GNU General Public License version
duke@435 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 #
trims@1907 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 # or visit www.oracle.com if you need additional information or have any
trims@1907 21 # questions.
drchase@4942 22 #
duke@435 23 #
duke@435 24
duke@435 25 # Top level gnumake file for hotspot builds
duke@435 26 #
duke@435 27 # Default is to build the both product images and construct an export dir.
duke@435 28 # The default export directory name is `pwd`/export-$(PLATFORM).
duke@435 29 #
duke@435 30 # Use: 'gnumake help' for more information.
duke@435 31 #
duke@435 32 # This makefile uses the default settings for where to find compilers and
duke@435 33 # tools, and obeys the ALT_* variable settings used by the other JDK
duke@435 34 # workspaces.
duke@435 35 #
duke@435 36
duke@435 37 # Expected/optional make variables defined on make command line:
duke@435 38 # LP64=1 or ARCH_DATA_MODEL=64 for 64bit build
duke@435 39 #
duke@435 40 # Expected/optional make variables or environment variables:
duke@435 41 # ALT_SLASH_JAVA Location of /java or J:
duke@435 42 # ALT_BOOTDIR Previous JDK home directory for javac compiler
duke@435 43 # ALT_OUTPUTDIR Output directory to use for hotspot build
duke@435 44 # ALT_EXPORT_PATH Directory to export hotspot build to
duke@435 45 # ALT_JDK_IMPORT_PATH Current JDK build (only for create_jdk rules)
dholmes@2544 46 # ALT_JDK_TARGET_IMPORT_PATH Current JDK build when cross-compiling
duke@435 47 # ALT_BUILD_WIN_SA Building SA on Windows is disabled by default.
duke@435 48 # Set ALT_BUILD_WIN_SA=1 to enable building SA on
duke@435 49 # Windows.
duke@435 50 # Version strings and numbers:
duke@435 51 # JDK_VERSION Current JDK version (e.g. 1.6.0)
duke@435 52 # PREVIOUS_JDK_VERSION Previous (bootdir) JDK version (e.g. 1.5.0)
duke@435 53 # FULL_VERSION Full version string to use (e.g. "1.6.0-ea-b42")
duke@435 54 #
duke@435 55 # Version strings and numbers especially needed on Windows:
duke@435 56 # COOKED_JDK_UPDATE_VERSION Just the update release number (e.g. 02)
duke@435 57 # COOKED_BUILD_NUMBER Just the build number (e.g. 42)
duke@435 58 # JDK_MKTG_VERSION Marketing JDK version (e.g. 6.0)
duke@435 59 # JDK_MAJOR_VERSION Major number for version (e.g. 1) always 1?
duke@435 60 # JDK_MINOR_VERSION Minor number for version (e.g. 6)
duke@435 61 # JDK_MICRO_VERSION Micro number for version (e.g. 0)
duke@435 62 #
duke@435 63
duke@435 64 # Default is build both product fastdebug and create export area
duke@435 65
duke@435 66 # Allow to build HotSpot in local directory from sources specified by GAMMADIR.
duke@435 67 # After make/defs.make GAMMADIR is defined.
duke@435 68 ifdef GAMMADIR
duke@435 69 ifndef ALT_OUTPUTDIR
duke@435 70 ALT_OUTPUTDIR := $(shell pwd)
duke@435 71 endif
duke@435 72 include $(GAMMADIR)/make/defs.make
duke@435 73 else
duke@435 74 include defs.make
duke@435 75 endif
duke@435 76
kamg@2515 77 include $(GAMMADIR)/make/altsrc.make
duke@435 78
jprovino@4165 79 -include $(HS_ALT_MAKE)/Makefile.make
jprovino@4165 80
duke@435 81 ifneq ($(ALT_OUTPUTDIR),)
duke@435 82 ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR)
duke@435 83 else
duke@435 84 ALT_OUT=
duke@435 85 endif
duke@435 86
duke@435 87 # Typical C1/C2 targets made available with this Makefile
drchase@4942 88 C1_VM_TARGETS=product1 fastdebug1 optimized1 debug1
drchase@4942 89 C2_VM_TARGETS=product fastdebug optimized debug
goetz@6439 90 CORE_VM_TARGETS=productcore fastdebugcore optimizedcore debugcore
drchase@4942 91 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero debugzero
drchase@4942 92 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark debugshark
drchase@4942 93 MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 debugminimal1
duke@435 94
jprovino@4165 95 COMMON_VM_PRODUCT_TARGETS=product product1 docs export_product
jprovino@4165 96 COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 docs export_fastdebug
drchase@4942 97 COMMON_VM_DEBUG_TARGETS=debug debug1 docs export_debug
phh@3492 98
coleenp@548 99 # JDK directory list
coleenp@548 100 JDK_DIRS=bin include jre lib demo
coleenp@548 101
duke@435 102 all: all_product all_fastdebug
phh@3492 103
jprovino@4165 104 ifeq ($(JVM_VARIANT_MINIMAL1),true)
jprovino@4165 105 all_product: productminimal1
jprovino@4165 106 all_fastdebug: fastdebugminimal1
drchase@4942 107 all_debug: debugminimal1
jprovino@4165 108 endif
jprovino@4165 109
phh@3492 110 ifdef BUILD_CLIENT_ONLY
bobv@2036 111 all_product: product1 docs export_product
bobv@2036 112 all_fastdebug: fastdebug1 docs export_fastdebug
drchase@4942 113 all_debug: debug1 docs export_debug
phh@3492 114 else
phh@3492 115 ifeq ($(MACOSX_UNIVERSAL),true)
phh@3492 116 all_product: universal_product
phh@3492 117 all_fastdebug: universal_fastdebug
phh@3492 118 all_debug: universal_debug
phh@3492 119 else
phh@3492 120 all_product: $(COMMON_VM_PRODUCT_TARGETS)
phh@3492 121 all_fastdebug: $(COMMON_VM_FASTDEBUG_TARGETS)
phh@3492 122 all_debug: $(COMMON_VM_DEBUG_TARGETS)
bobv@2036 123 endif
phh@3492 124 endif
phh@3492 125
jprovino@4165 126 all_optimized: optimized optimized1 docs export_optimized
duke@435 127
never@1445 128 allzero: all_productzero all_fastdebugzero
never@1445 129 all_productzero: productzero docs export_product
never@1445 130 all_fastdebugzero: fastdebugzero docs export_fastdebug
drchase@4942 131 all_debugzero: debugzero docs export_debug
never@1445 132 all_optimizedzero: optimizedzero docs export_optimized
never@1445 133
twisti@2047 134 allshark: all_productshark all_fastdebugshark
twisti@2047 135 all_productshark: productshark docs export_product
twisti@2047 136 all_fastdebugshark: fastdebugshark docs export_fastdebug
drchase@4942 137 all_debugshark: debugshark docs export_debug
twisti@2047 138 all_optimizedshark: optimizedshark docs export_optimized
twisti@2047 139
goetz@6439 140 allcore: all_productcore all_fastdebugcore
goetz@6439 141 all_productcore: productcore docs export_product
goetz@6439 142 all_fastdebugcore: fastdebugcore docs export_fastdebug
goetz@6439 143 all_debugcore: debugcore docs export_debug
goetz@6439 144 all_optimizedcore: optimizedcore docs export_optimized
goetz@6439 145
duke@435 146 # Do everything
duke@435 147 world: all create_jdk
duke@435 148
duke@435 149 # Build or export docs
duke@435 150 docs:
duke@435 151 ifeq ($(OSNAME),windows)
duke@435 152 @$(ECHO) "No docs ($(VM_TARGET)) for windows"
duke@435 153 else
dcubed@3725 154 # We specify 'BUILD_FLAVOR=product' so that the proper
dcubed@3725 155 # ENABLE_FULL_DEBUG_SYMBOLS value is used.
duke@435 156 $(CD) $(OUTPUTDIR); \
duke@435 157 $(MAKE) -f $(ABS_OS_MAKEFILE) \
dcubed@3725 158 $(MAKE_ARGS) BUILD_FLAVOR=product docs
duke@435 159 endif
duke@435 160
twisti@5109 161 # Output directories
twisti@5109 162 C1_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1
twisti@5109 163 C2_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
goetz@6439 164 CORE_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_core
twisti@5109 165 MINIMAL1_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1
twisti@5109 166 ZERO_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_zero
twisti@5109 167 SHARK_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_shark
twisti@5109 168
duke@435 169 # Build variation of hotspot
duke@435 170 $(C1_VM_TARGETS):
duke@435 171 $(CD) $(GAMMADIR)/make; \
twisti@5109 172 $(MAKE) BUILD_DIR=$(C1_DIR) BUILD_FLAVOR=$(@:%1=%) VM_TARGET=$@ generic_build1 $(ALT_OUT)
duke@435 173
duke@435 174 $(C2_VM_TARGETS):
duke@435 175 $(CD) $(GAMMADIR)/make; \
twisti@5109 176 $(MAKE) BUILD_DIR=$(C2_DIR) BUILD_FLAVOR=$@ VM_TARGET=$@ generic_build2 $(ALT_OUT)
duke@435 177
goetz@6439 178 $(CORE_VM_TARGETS):
goetz@6439 179 $(CD) $(GAMMADIR)/make; \
goetz@6439 180 $(MAKE) BUILD_DIR=$(CORE_DIR) BUILD_FLAVOR=$(@:$core=%) VM_TARGET=$@ generic_buildcore $(ALT_OUT)
goetz@6439 181
never@1445 182 $(ZERO_VM_TARGETS):
never@1445 183 $(CD) $(GAMMADIR)/make; \
twisti@5109 184 $(MAKE) BUILD_DIR=$(ZERO_DIR) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ generic_buildzero $(ALT_OUT)
never@1445 185
twisti@2047 186 $(SHARK_VM_TARGETS):
twisti@2047 187 $(CD) $(GAMMADIR)/make; \
twisti@5109 188 $(MAKE) BUILD_DIR=$(SHARK_DIR) BUILD_FLAVOR=$(@:%shark=%) VM_TARGET=$@ generic_buildshark $(ALT_OUT)
twisti@2047 189
jprovino@4165 190 $(MINIMAL1_VM_TARGETS):
jprovino@4165 191 $(CD) $(GAMMADIR)/make; \
twisti@5109 192 $(MAKE) BUILD_DIR=$(MINIMAL1_DIR) BUILD_FLAVOR=$(@:%minimal1=%) VM_TARGET=$@ generic_buildminimal1 $(ALT_OUT)
twisti@5109 193
twisti@5109 194 # Install hotspot script in build directory
twisti@5109 195 HOTSPOT_SCRIPT=$(BUILD_DIR)/$(BUILD_FLAVOR)/hotspot
twisti@5109 196 $(HOTSPOT_SCRIPT): $(GAMMADIR)/make/hotspot.script
twisti@5109 197 $(QUIETLY) $(MKDIR) -p $(BUILD_DIR)/$(BUILD_FLAVOR)
twisti@5109 198 $(QUIETLY) cat $< | sed -e 's|@@LIBARCH@@|$(LIBARCH)|g' | sed -e 's|@@JDK_IMPORT_PATH@@|$(JDK_IMPORT_PATH)|g' > $@
twisti@5109 199 $(QUIETLY) chmod +x $@
jprovino@4165 200
duke@435 201 # Build compiler1 (client) rule, different for platforms
twisti@5109 202 generic_build1: $(HOTSPOT_SCRIPT)
duke@435 203 $(MKDIR) -p $(OUTPUTDIR)
duke@435 204 ifeq ($(OSNAME),windows)
duke@435 205 ifeq ($(ARCH_DATA_MODEL), 32)
duke@435 206 $(CD) $(OUTPUTDIR); \
duke@435 207 $(NMAKE) -f $(ABS_OS_MAKEFILE) \
duke@435 208 Variant=compiler1 \
duke@435 209 WorkSpace=$(ABS_GAMMADIR) \
duke@435 210 BootStrapDir=$(ABS_BOOTDIR) \
duke@435 211 BuildUser=$(USERNAME) \
duke@435 212 $(MAKE_ARGS) $(VM_TARGET:%1=%)
duke@435 213 else
duke@435 214 @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
duke@435 215 endif
duke@435 216 else
duke@435 217 ifeq ($(ARCH_DATA_MODEL), 32)
duke@435 218 $(CD) $(OUTPUTDIR); \
duke@435 219 $(MAKE) -f $(ABS_OS_MAKEFILE) \
duke@435 220 $(MAKE_ARGS) $(VM_TARGET)
duke@435 221 else
duke@435 222 @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
duke@435 223 endif
duke@435 224 endif
duke@435 225
duke@435 226 # Build compiler2 (server) rule, different for platforms
twisti@5109 227 generic_build2: $(HOTSPOT_SCRIPT)
duke@435 228 $(MKDIR) -p $(OUTPUTDIR)
duke@435 229 ifeq ($(OSNAME),windows)
duke@435 230 $(CD) $(OUTPUTDIR); \
duke@435 231 $(NMAKE) -f $(ABS_OS_MAKEFILE) \
duke@435 232 Variant=compiler2 \
duke@435 233 WorkSpace=$(ABS_GAMMADIR) \
duke@435 234 BootStrapDir=$(ABS_BOOTDIR) \
duke@435 235 BuildUser=$(USERNAME) \
duke@435 236 $(MAKE_ARGS) $(VM_TARGET)
duke@435 237 else
duke@435 238 $(CD) $(OUTPUTDIR); \
duke@435 239 $(MAKE) -f $(ABS_OS_MAKEFILE) \
duke@435 240 $(MAKE_ARGS) $(VM_TARGET)
duke@435 241 endif
duke@435 242
goetz@6439 243 generic_buildcore: $(HOTSPOT_SCRIPT)
goetz@6439 244 ifeq ($(HS_ARCH),ppc)
goetz@6439 245 ifeq ($(ARCH_DATA_MODEL),64)
goetz@6439 246 $(MKDIR) -p $(OUTPUTDIR)
goetz@6439 247 $(CD) $(OUTPUTDIR); \
goetz@6439 248 $(MAKE) -f $(ABS_OS_MAKEFILE) \
goetz@6439 249 $(MAKE_ARGS) $(VM_TARGET)
goetz@6439 250 else
goetz@6439 251 @$(ECHO) "No ($(VM_TARGET)) for ppc ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
goetz@6439 252 endif
goetz@6439 253 else
goetz@6439 254 @$(ECHO) "No ($(VM_TARGET)) for $(HS_ARCH)"
goetz@6439 255 endif
goetz@6439 256
twisti@5109 257 generic_buildzero: $(HOTSPOT_SCRIPT)
never@1445 258 $(MKDIR) -p $(OUTPUTDIR)
never@1445 259 $(CD) $(OUTPUTDIR); \
never@1445 260 $(MAKE) -f $(ABS_OS_MAKEFILE) \
never@1445 261 $(MAKE_ARGS) $(VM_TARGET)
never@1445 262
twisti@5109 263 generic_buildshark: $(HOTSPOT_SCRIPT)
twisti@2047 264 $(MKDIR) -p $(OUTPUTDIR)
twisti@2047 265 $(CD) $(OUTPUTDIR); \
twisti@2047 266 $(MAKE) -f $(ABS_OS_MAKEFILE) \
drchase@4942 267 $(MAKE_ARGS) $(VM_TARGET)
twisti@2047 268
twisti@5109 269 generic_buildminimal1: $(HOTSPOT_SCRIPT)
jprovino@4165 270 ifeq ($(JVM_VARIANT_MINIMAL1),true)
jprovino@4165 271 $(MKDIR) -p $(OUTPUTDIR)
jprovino@4165 272 ifeq ($(ARCH_DATA_MODEL), 32)
jprovino@4165 273 ifeq ($(OSNAME),windows)
jprovino@4165 274 $(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ;
jprovino@4165 275 else
jprovino@4165 276 ifeq ($(OSNAME),solaris)
jprovino@4165 277 $(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ;
jprovino@4165 278 else
jprovino@4165 279 $(CD) $(OUTPUTDIR); \
jprovino@4165 280 $(MAKE) -f $(ABS_OS_MAKEFILE) $(MAKE_ARGS) $(VM_TARGET) ;
jprovino@4165 281 endif
jprovino@4165 282 endif
jprovino@4165 283 else
jprovino@4165 284 @$(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
jprovino@4165 285 endif
jprovino@4165 286 else
jprovino@4165 287 @$(ECHO) "Error: trying to build a minimal target but JVM_VARIANT_MINIMAL1 is not true."
jprovino@4165 288 endif
jprovino@4165 289
duke@435 290 # Export file rule
duke@435 291 generic_export: $(EXPORT_LIST)
twisti@5109 292
duke@435 293 export_product:
twisti@5109 294 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) generic_export
duke@435 295 export_fastdebug:
twisti@5109 296 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
duke@435 297 export_debug:
twisti@5109 298 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
duke@435 299 export_optimized:
twisti@5109 300 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
twisti@5109 301
phh@3492 302 export_product_jdk::
twisti@5109 303 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) generic_export
phh@3492 304 export_optimized_jdk::
twisti@5109 305 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) generic_export
phh@3492 306 export_fastdebug_jdk::
twisti@5109 307 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) generic_export
phh@3492 308 export_debug_jdk::
twisti@5109 309 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) generic_export
duke@435 310
duke@435 311 # Export file copy rules
duke@435 312 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt
twisti@5109 313 DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs
twisti@5109 314 C1_BUILD_DIR =$(C1_DIR)/$(BUILD_FLAVOR)
twisti@5109 315 C2_BUILD_DIR =$(C2_DIR)/$(BUILD_FLAVOR)
goetz@6439 316 CORE_BUILD_DIR =$(CORE_DIR)/$(BUILD_FLAVOR)
twisti@5109 317 MINIMAL1_BUILD_DIR=$(MINIMAL1_DIR)/$(BUILD_FLAVOR)
twisti@5109 318 ZERO_BUILD_DIR =$(ZERO_DIR)/$(BUILD_FLAVOR)
twisti@5109 319 SHARK_BUILD_DIR =$(SHARK_DIR)/$(BUILD_FLAVOR)
duke@435 320
twisti@4946 321 # Server (C2)
erikj@3649 322 ifeq ($(JVM_VARIANT_SERVER), true)
twisti@4946 323 # Common
twisti@5109 324 $(EXPORT_SERVER_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
duke@435 325 $(install-file)
twisti@5109 326 $(EXPORT_LIB_DIR)/%.jar: $(C2_BUILD_DIR)/../generated/%.jar
dcubed@3724 327 $(install-file)
twisti@5109 328 $(EXPORT_INCLUDE_DIR)/%: $(C2_BUILD_DIR)/../generated/jvmtifiles/%
duke@435 329 $(install-file)
twisti@4946 330 # Windows
twisti@5109 331 $(EXPORT_SERVER_DIR)/%.dll: $(C2_BUILD_DIR)/%.dll
duke@435 332 $(install-file)
twisti@5109 333 $(EXPORT_SERVER_DIR)/%.pdb: $(C2_BUILD_DIR)/%.pdb
duke@435 334 $(install-file)
twisti@5109 335 $(EXPORT_SERVER_DIR)/%.map: $(C2_BUILD_DIR)/%.map
dcubed@3724 336 $(install-file)
twisti@5109 337 $(EXPORT_LIB_DIR)/%.lib: $(C2_BUILD_DIR)/%.lib
duke@435 338 $(install-file)
twisti@5109 339 $(EXPORT_JRE_BIN_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
duke@435 340 $(install-file)
twisti@5109 341 $(EXPORT_JRE_BIN_DIR)/%.dll: $(C2_BUILD_DIR)/%.dll
duke@435 342 $(install-file)
twisti@5109 343 $(EXPORT_JRE_BIN_DIR)/%.pdb: $(C2_BUILD_DIR)/%.pdb
dcubed@3724 344 $(install-file)
twisti@5109 345 $(EXPORT_JRE_BIN_DIR)/%.map: $(C2_BUILD_DIR)/%.map
duke@435 346 $(install-file)
twisti@4946 347 # Unix
twisti@5109 348 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
duke@435 349 $(install-file)
twisti@5109 350 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 351 $(install-file)
twisti@5109 352 $(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 353 $(install-file)
twisti@5109 354 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
twisti@4946 355 $(install-file)
twisti@5109 356 $(EXPORT_SERVER_DIR)/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
twisti@4946 357 $(install-file)
twisti@5109 358 $(EXPORT_SERVER_DIR)/64/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
twisti@4946 359 $(install-file)
twisti@5109 360 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
twisti@4946 361 $(install-file)
twisti@5109 362 $(EXPORT_SERVER_DIR)/64/%.diz: $(C2_BUILD_DIR)/%.diz
duke@435 363 $(install-file)
duke@435 364 endif
duke@435 365
twisti@4946 366 # Client (C1)
twisti@4946 367 ifeq ($(JVM_VARIANT_CLIENT), true)
twisti@4946 368 # Common
twisti@5109 369 $(EXPORT_CLIENT_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
jprovino@4165 370 $(install-file)
twisti@5109 371 $(EXPORT_LIB_DIR)/%.jar: $(C1_BUILD_DIR)/../generated/%.jar
jprovino@4165 372 $(install-file)
twisti@5109 373 $(EXPORT_INCLUDE_DIR)/%: $(C1_BUILD_DIR)/../generated/jvmtifiles/%
jprovino@4165 374 $(install-file)
twisti@4946 375 # Windows
twisti@5109 376 $(EXPORT_CLIENT_DIR)/%.dll: $(C1_BUILD_DIR)/%.dll
jprovino@4165 377 $(install-file)
twisti@5109 378 $(EXPORT_CLIENT_DIR)/%.pdb: $(C1_BUILD_DIR)/%.pdb
twisti@4946 379 $(install-file)
twisti@5109 380 $(EXPORT_CLIENT_DIR)/%.map: $(C1_BUILD_DIR)/%.map
twisti@4946 381 $(install-file)
twisti@5109 382 $(EXPORT_LIB_DIR)/%.lib: $(C1_BUILD_DIR)/%.lib
twisti@4946 383 $(install-file)
twisti@5109 384 $(EXPORT_JRE_BIN_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
twisti@4946 385 $(install-file)
twisti@5109 386 $(EXPORT_JRE_BIN_DIR)/%.dll: $(C1_BUILD_DIR)/%.dll
twisti@4946 387 $(install-file)
twisti@5109 388 $(EXPORT_JRE_BIN_DIR)/%.pdb: $(C1_BUILD_DIR)/%.pdb
twisti@4946 389 $(install-file)
twisti@5109 390 $(EXPORT_JRE_BIN_DIR)/%.map: $(C1_BUILD_DIR)/%.map
twisti@4946 391 $(install-file)
twisti@4946 392 # Unix
twisti@5109 393 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 394 $(install-file)
twisti@5109 395 $(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 396 $(install-file)
twisti@5109 397 $(EXPORT_CLIENT_DIR)/64/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 398 $(install-file)
twisti@5109 399 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
twisti@4946 400 $(install-file)
twisti@5109 401 $(EXPORT_CLIENT_DIR)/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
twisti@4946 402 $(install-file)
twisti@5109 403 $(EXPORT_CLIENT_DIR)/64/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
twisti@4946 404 $(install-file)
twisti@5109 405 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
twisti@4946 406 $(install-file)
twisti@5109 407 $(EXPORT_CLIENT_DIR)/64/%.diz: $(C1_BUILD_DIR)/%.diz
twisti@4946 408 $(install-file)
duke@435 409 endif
duke@435 410
twisti@4946 411 # Minimal1
twisti@4946 412 ifeq ($(JVM_VARIANT_MINIMAL1), true)
twisti@4946 413 # Common
twisti@5109 414 $(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
duke@435 415 $(install-file)
twisti@5109 416 $(EXPORT_LIB_DIR)/%.jar: $(MINIMAL1_BUILD_DIR)/../generated/%.jar
twisti@4946 417 $(install-file)
twisti@5109 418 $(EXPORT_INCLUDE_DIR)/%: $(MINIMAL1_BUILD_DIR)/../generated/jvmtifiles/%
twisti@4946 419 $(install-file)
twisti@4946 420 # Windows
twisti@5109 421 $(EXPORT_MINIMAL_DIR)/%.dll: $(MINIMAL1_BUILD_DIR)/%.dll
twisti@4946 422 $(install-file)
twisti@5109 423 $(EXPORT_MINIMAL_DIR)/%.pdb: $(MINIMAL1_BUILD_DIR)/%.pdb
twisti@4946 424 $(install-file)
twisti@5109 425 $(EXPORT_MINIMAL_DIR)/%.map: $(MINIMAL1_BUILD_DIR)/%.map
twisti@4946 426 $(install-file)
twisti@5109 427 $(EXPORT_LIB_DIR)/%.lib: $(MINIMAL1_BUILD_DIR)/%.lib
twisti@4946 428 $(install-file)
twisti@5109 429 $(EXPORT_JRE_BIN_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
twisti@4946 430 $(install-file)
twisti@5109 431 $(EXPORT_JRE_BIN_DIR)/%.dll: $(MINIMAL1_BUILD_DIR)/%.dll
twisti@4946 432 $(install-file)
twisti@5109 433 $(EXPORT_JRE_BIN_DIR)/%.pdb: $(MINIMAL1_BUILD_DIR)/%.pdb
twisti@4946 434 $(install-file)
twisti@5109 435 $(EXPORT_JRE_BIN_DIR)/%.map: $(MINIMAL1_BUILD_DIR)/%.map
twisti@4946 436 $(install-file)
twisti@4946 437 # Unix
twisti@5109 438 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 439 $(install-file)
twisti@5109 440 $(EXPORT_MINIMAL_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 441 $(install-file)
twisti@5109 442 $(EXPORT_MINIMAL_DIR)/64/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 443 $(install-file)
twisti@5109 444 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
twisti@4946 445 $(install-file)
twisti@5109 446 $(EXPORT_MINIMAL_DIR)/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
twisti@4946 447 $(install-file)
twisti@5109 448 $(EXPORT_MINIMAL_DIR)/64/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
twisti@4946 449 $(install-file)
twisti@5109 450 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
twisti@4946 451 $(install-file)
twisti@5109 452 $(EXPORT_MINIMAL_DIR)/64/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
twisti@4946 453 $(install-file)
twisti@4946 454 endif
duke@435 455
twisti@4946 456 # Zero
twisti@4946 457 ifeq ($(JVM_VARIANT_ZERO), true)
twisti@4946 458 # Common
twisti@5109 459 $(EXPORT_LIB_DIR)/%.jar: $(ZERO_BUILD_DIR)/../generated/%.jar
duke@435 460 $(install-file)
twisti@5109 461 $(EXPORT_INCLUDE_DIR)/%: $(ZERO_BUILD_DIR)/../generated/jvmtifiles/%
twisti@4946 462 $(install-file)
twisti@4946 463 # Unix
twisti@5109 464 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 465 $(install-file)
twisti@5109 466 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(ZERO_BUILD_DIR)/%.debuginfo
twisti@4946 467 $(install-file)
twisti@5109 468 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(ZERO_BUILD_DIR)/%.diz
twisti@4946 469 $(install-file)
twisti@5109 470 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 471 $(install-file)
twisti@5109 472 $(EXPORT_SERVER_DIR)/%.debuginfo: $(ZERO_BUILD_DIR)/%.debuginfo
twisti@4946 473 $(install-file)
twisti@5109 474 $(EXPORT_SERVER_DIR)/%.diz: $(ZERO_BUILD_DIR)/%.diz
twisti@4946 475 $(install-file)
twisti@4946 476 endif
twisti@4946 477
goetz@6439 478 # Core
goetz@6439 479 ifeq ($(JVM_VARIANT_CORE), true)
goetz@6439 480 # Common
goetz@6439 481 $(EXPORT_LIB_DIR)/%.jar: $(CORE_DIR)/../generated/%.jar
goetz@6439 482 $(install-file)
goetz@6439 483 $(EXPORT_INCLUDE_DIR)/%: $(CORE_DIR)/../generated/jvmtifiles/%
goetz@6439 484 $(install-file)
goetz@6439 485 # Unix
goetz@6439 486 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(CORE_DIR)/%.$(LIBRARY_SUFFIX)
goetz@6439 487 $(install-file)
goetz@6439 488 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(CORE_DIR)/%.debuginfo
goetz@6439 489 $(install-file)
goetz@6439 490 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(CORE_DIR)/%.diz
goetz@6439 491 $(install-file)
goetz@6439 492 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(CORE_DIR)/%.$(LIBRARY_SUFFIX)
goetz@6439 493 $(install-file)
goetz@6439 494 $(EXPORT_SERVER_DIR)/%.debuginfo: $(CORE_DIR)/%.debuginfo
goetz@6439 495 $(install-file)
goetz@6439 496 $(EXPORT_SERVER_DIR)/%.diz: $(CORE_DIR)/%.diz
goetz@6439 497 $(install-file)
goetz@6439 498 endif
goetz@6439 499
twisti@4946 500 # Shark
twisti@4946 501 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
twisti@4946 502 # Common
twisti@5109 503 $(EXPORT_LIB_DIR)/%.jar: $(SHARK_BUILD_DIR)/../generated/%.jar
twisti@4946 504 $(install-file)
twisti@5109 505 $(EXPORT_INCLUDE_DIR)/%: $(SHARK_BUILD_DIR)/../generated/jvmtifiles/%
twisti@4946 506 $(install-file)
twisti@4946 507 # Unix
twisti@5109 508 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 509 $(install-file)
twisti@5109 510 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo): $(SHARK_BUILD_DIR)/%.debuginfo
twisti@4946 511 $(install-file)
twisti@5109 512 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(SHARK_BUILD_DIR)/%.diz
twisti@4946 513 $(install-file)
twisti@5109 514 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 515 $(install-file)
twisti@5109 516 $(EXPORT_SERVER_DIR)/%.debuginfo: $(SHARK_BUILD_DIR)/%.debuginfo
twisti@4946 517 $(install-file)
twisti@5109 518 $(EXPORT_SERVER_DIR)/%.diz: $(SHARK_BUILD_DIR)/%.diz
twisti@4946 519 $(install-file)
twisti@4946 520 endif
duke@435 521
dcubed@1619 522 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/code/%
dcubed@1619 523 $(install-file)
dcubed@1619 524
duke@435 525 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/%
duke@435 526 $(install-file)
duke@435 527
kamg@2515 528 HS_JNI_ARCH_SRC=$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h)
kamg@2515 529 $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_JNI_ARCH_SRC)
duke@435 530 $(install-file)
duke@435 531
duke@435 532 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/services/%
duke@435 533 $(install-file)
duke@435 534
phh@3427 535 JFR_EXISTS=$(shell if [ -d $(HS_ALT_SRC) ]; then echo 1; else echo 0; fi)
phh@3427 536 # export jfr.h
phh@3427 537 ifeq ($JFR_EXISTS,1)
phh@3427 538 $(EXPORT_INCLUDE_DIR)/%: $(HS_ALT_SRC)/share/vm/jfr/agent/%
phh@3427 539 $(install-file)
phh@3427 540 else
phh@3427 541 $(EXPORT_INCLUDE_DIR)/jfr.h:
phh@3427 542 endif
phh@3427 543
duke@435 544 # Doc files (jvmti.html)
duke@435 545 $(EXPORT_DOCS_DIR)/platform/jvmti/%: $(DOCS_DIR)/%
duke@435 546 $(install-file)
duke@435 547
duke@435 548 # Xusage file
zgu@4492 549 $(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_MINIMAL_DIR)/Xusage.txt: $(XUSAGE)
duke@435 550 $(prep-target)
duke@435 551 $(RM) $@.temp
duke@435 552 $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp
duke@435 553 $(MV) $@.temp $@
duke@435 554
duke@435 555 #
duke@435 556 # Clean rules
duke@435 557 #
duke@435 558 clobber clean: clean_build clean_export clean_jdk
duke@435 559 clean_build:
duke@435 560 $(RM) -r $(C1_DIR)
duke@435 561 $(RM) -r $(C2_DIR)
goetz@6439 562 $(RM) -r $(CORE_DIR)
never@1445 563 $(RM) -r $(ZERO_DIR)
twisti@2047 564 $(RM) -r $(SHARK_DIR)
jprovino@4165 565 $(RM) -r $(MINIMAL1_DIR)
duke@435 566 clean_export:
duke@435 567 $(RM) -r $(EXPORT_PATH)
duke@435 568 clean_jdk:
duke@435 569 $(RM) -r $(JDK_IMAGE_DIR)
duke@435 570
duke@435 571 #
duke@435 572 # Create JDK and place this build into it
duke@435 573 #
duke@435 574 create_jdk: copy_jdk update_jdk
duke@435 575
duke@435 576 update_jdk: export_product_jdk export_fastdebug_jdk test_jdk
duke@435 577
duke@435 578 copy_jdk: $(JDK_IMAGE_DIR)/jre/lib/rt.jar
duke@435 579
duke@435 580 $(JDK_IMAGE_DIR)/jre/lib/rt.jar:
duke@435 581 $(RM) -r $(JDK_IMAGE_DIR)
duke@435 582 $(MKDIR) -p $(JDK_IMAGE_DIR)
duke@435 583 ($(CD) $(JDK_IMPORT_PATH) && \
duke@435 584 $(TAR) -cf - *) | \
duke@435 585 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
duke@435 586
twisti@4780 587
twisti@4780 588 # Testing the built JVM
twisti@4780 589 RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -Dsun.java.launcher=gamma
twisti@4780 590 generic_test:
twisti@4780 591 @$(ECHO) "Running with: $(ALTJVM_DIR)"
twisti@4780 592 @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -Xinternalversion
twisti@4780 593 @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -showversion -help
twisti@4780 594
twisti@4780 595 # C2 test targets
drchase@4942 596 test_product test_optimized test_fastdebug test_debug:
twisti@4780 597 @$(MAKE) generic_test ALTJVM_DIR="$(C2_DIR)/$(@:test_%=%)"
twisti@4780 598
twisti@4780 599 # C1 test targets
drchase@4942 600 test_product1 test_optimized1 test_fastdebug1 test_debug1:
twisti@4780 601 ifeq ($(ARCH_DATA_MODEL), 32)
twisti@4780 602 @$(MAKE) generic_test ALTJVM_DIR="$(C1_DIR)/$(@:test_%1=%)"
twisti@4780 603 else
twisti@4780 604 @$(ECHO) "No compiler1 ($(@:test_%=%)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
twisti@4780 605 endif
twisti@4780 606
twisti@4780 607 # Zero test targets
drchase@4942 608 test_productzero test_optimizedzero test_fastdebugzero test_debugzero:
twisti@4780 609 @$(MAKE) generic_test ALTJVM_DIR="$(ZERO_DIR)/$(@:test_%zero=%)"
twisti@4780 610
twisti@4780 611 # Shark test targets
drchase@4942 612 test_productshark test_optimizedshark test_fastdebugshark test_debugshark:
twisti@4780 613 @$(MAKE) generic_test ALTJVM_DIR="$(SHARK_DIR)/$(@:test_%shark=%)"
twisti@4780 614
twisti@4780 615 # Minimal1 test targets
drchase@4942 616 test_productminimal1 test_optimizedminimal1 test_fastdebugminimal1 test_debugminimal1:
twisti@4780 617 @$(MAKE) generic_test ALTJVM_DIR="$(MINIMAL1_DIR)/$(@:test_%minimal1=%)"
twisti@4780 618
twisti@4780 619
duke@435 620 test_jdk:
erikj@3649 621 ifeq ($(JVM_VARIANT_CLIENT), true)
erikj@3649 622 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -client -Xinternalversion
erikj@3649 623 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -client -version
erikj@3649 624 endif
erikj@3649 625 ifeq ($(findstring true, $(JVM_VARIANT_SERVER)\
erikj@3649 626 $(JVM_VARIANT_ZERO)$(JVM_VARIANT_ZEROSHARK)), true)
erikj@3649 627 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -Xinternalversion
erikj@3649 628 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -version
erikj@3649 629 endif
duke@435 630
phh@3492 631 copy_product_jdk::
duke@435 632 $(RM) -r $(JDK_IMAGE_DIR)
duke@435 633 $(MKDIR) -p $(JDK_IMAGE_DIR)
duke@435 634 ($(CD) $(JDK_IMPORT_PATH) && \
coleenp@548 635 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 636 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
duke@435 637
phh@3492 638 copy_fastdebug_jdk::
duke@435 639 $(RM) -r $(JDK_IMAGE_DIR)/fastdebug
duke@435 640 $(MKDIR) -p $(JDK_IMAGE_DIR)/fastdebug
duke@435 641 if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
duke@435 642 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
coleenp@548 643 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 644 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
duke@435 645 else \
duke@435 646 ($(CD) $(JDK_IMPORT_PATH) && \
coleenp@548 647 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 648 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
duke@435 649 fi
duke@435 650
phh@3492 651 copy_debug_jdk::
duke@435 652 $(RM) -r $(JDK_IMAGE_DIR)/debug
duke@435 653 $(MKDIR) -p $(JDK_IMAGE_DIR)/debug
duke@435 654 if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \
duke@435 655 ($(CD) $(JDK_IMPORT_PATH)/debug && \
coleenp@548 656 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 657 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
duke@435 658 elif [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
duke@435 659 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
coleenp@548 660 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 661 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
duke@435 662 else \
duke@435 663 ($(CD) $(JDK_IMPORT_PATH) && \
coleenp@548 664 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 665 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
duke@435 666 fi
duke@435 667
duke@435 668 #
duke@435 669 # Check target
duke@435 670 #
duke@435 671 check: variable_check
duke@435 672
duke@435 673 #
duke@435 674 # Help target
duke@435 675 #
duke@435 676 help: intro_help target_help variable_help notes_help examples_help
duke@435 677
duke@435 678 # Intro help message
duke@435 679 intro_help:
duke@435 680 @$(ECHO) \
drchase@4942 681 "Makefile for the Hotspot workspace."
duke@435 682 @$(ECHO) \
duke@435 683 "Default behavior is to build and create an export area for the j2se builds."
duke@435 684
duke@435 685 # Target help
duke@435 686 target_help:
duke@435 687 @$(ECHO) "help: This help message"
duke@435 688 @$(ECHO) "all: Same as: all_product all_fastdebug"
duke@435 689 @$(ECHO) "world: Same as: all create_jdk"
duke@435 690 @$(ECHO) "all_product: Same as: product product1 export_product"
duke@435 691 @$(ECHO) "all_fastdebug: Same as: fastdebug fastdebug1 export_fastdebug"
drchase@4942 692 @$(ECHO) "all_debug: Same as: debug debug1 export_debug"
duke@435 693 @$(ECHO) "all_optimized: Same as: optimized optimized1 export_optimized"
duke@435 694 @$(ECHO) "clean: Clean all areas"
duke@435 695 @$(ECHO) "export_product: Export product files to EXPORT_PATH"
duke@435 696 @$(ECHO) "export_fastdebug: Export fastdebug files to EXPORT_PATH"
duke@435 697 @$(ECHO) "export_debug: Export debug files to EXPORT_PATH"
duke@435 698 @$(ECHO) "export_optimized: Export optimized files to EXPORT_PATH"
duke@435 699 @$(ECHO) "create_jdk: Create JDK image, export all files into it"
duke@435 700 @$(ECHO) "update_jdk: Update JDK image with fresh exported files"
duke@435 701 @$(ECHO) " "
jprovino@4165 702 @$(ECHO) "Other targets are:"
duke@435 703 @$(ECHO) " $(C1_VM_TARGETS)"
duke@435 704 @$(ECHO) " $(C2_VM_TARGETS)"
jprovino@4165 705 @$(ECHO) " $(MINIMAL1_VM_TARGETS)"
duke@435 706
duke@435 707 # Variable help (only common ones used by this workspace)
duke@435 708 variable_help: variable_help_intro variable_list variable_help_end
duke@435 709 variable_help_intro:
duke@435 710 @$(ECHO) "--- Common Variables ---"
duke@435 711 variable_help_end:
duke@435 712 @$(ECHO) " "
duke@435 713 @$(ECHO) "--- Make Arguments ---"
duke@435 714 @$(ECHO) "MAKE_ARGS=$(MAKE_ARGS)"
duke@435 715
duke@435 716 # One line descriptions for the variables
duke@435 717 SLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
duke@435 718 OUTPUTDIR.desc = Output directory, default is build/<osname>
duke@435 719 BOOTDIR.desc = JDK used to compile agent java source and test with
duke@435 720 JDK_IMPORT_PATH.desc = Promoted JDK to copy for 'create_jdk'
twisti@3567 721 JDK_IMAGE_DIR.desc = Directory to place JDK to copy
duke@435 722 EXPORT_PATH.desc = Directory to place files to export for JDK build
duke@435 723
duke@435 724 # Make variables to print out (description and value)
duke@435 725 VARIABLE_PRINTVAL_LIST += \
duke@435 726 SLASH_JAVA \
duke@435 727 OUTPUTDIR \
duke@435 728 BOOTDIR \
duke@435 729 JDK_IMPORT_PATH \
twisti@3567 730 JDK_IMAGE_DIR \
duke@435 731 EXPORT_PATH
duke@435 732
duke@435 733 # Make variables that should refer to directories that exist
duke@435 734 VARIABLE_CHECKDIR_LIST += \
duke@435 735 SLASH_JAVA \
duke@435 736 BOOTDIR \
duke@435 737 JDK_IMPORT_PATH
duke@435 738
duke@435 739 # For pattern rules below, so all are treated the same
duke@435 740 DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
duke@435 741 DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
duke@435 742
duke@435 743 # Complete variable check
duke@435 744 variable_check: $(DO_CHECKDIR_LIST)
duke@435 745 variable_list: $(DO_PRINTVAL_LIST) variable_check
duke@435 746
duke@435 747 # Pattern rule for printing out a variable
duke@435 748 %.printval:
duke@435 749 @$(ECHO) " ALT_$* - $($*.desc)"
duke@435 750 @$(ECHO) " $*=$($*)"
duke@435 751
duke@435 752 # Pattern rule for checking to see if a variable with a directory exists
duke@435 753 %.checkdir:
duke@435 754 @if [ ! -d $($*) ] ; then \
duke@435 755 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
duke@435 756 fi
duke@435 757
duke@435 758 # Pattern rule for checking to see if a variable with a file exists
duke@435 759 %.checkfil:
duke@435 760 @if [ ! -f $($*) ] ; then \
duke@435 761 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
duke@435 762 fi
duke@435 763
duke@435 764 # Misc notes on help
duke@435 765 notes_help:
duke@435 766 @$(ECHO) \
duke@435 767 "--- Notes --- "
duke@435 768 @$(ECHO) \
duke@435 769 "- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted"
duke@435 770 @$(ECHO) \
duke@435 771 " builds or previous release JDK builds will work."
duke@435 772 @$(ECHO) \
duke@435 773 "- The fastest builds have been when the workspace and the BOOTDIR are on"
duke@435 774 @$(ECHO) \
duke@435 775 " local disk."
duke@435 776
duke@435 777 examples_help:
duke@435 778 @$(ECHO) \
duke@435 779 "--- Examples --- "
duke@435 780 @$(ECHO) \
duke@435 781 " $(MAKE) all"
duke@435 782 @$(ECHO) \
duke@435 783 " $(MAKE) world"
duke@435 784 @$(ECHO) \
drchase@4942 785 " $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)"
duke@435 786 @$(ECHO) \
duke@435 787 " $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)"
duke@435 788
phh@3492 789 # Universal build support
phh@3492 790 ifeq ($(OS_VENDOR), Darwin)
phh@3492 791 ifeq ($(MACOSX_UNIVERSAL),true)
phh@3492 792 include $(GAMMADIR)/make/$(OSNAME)/makefiles/universal.gmk
phh@3492 793 endif
phh@3492 794 endif
phh@3492 795
drchase@4942 796 # Compatibility for transition to new naming
drchase@4942 797 warn_jvmg_deprecated:
drchase@4942 798 echo "Warning: The jvmg target has been replaced with debug"
drchase@4942 799 echo "Warning: Please update your usage"
drchase@4942 800
drchase@4942 801 jvmg: warn_jvmg_deprecated debug
drchase@4942 802
drchase@4942 803 jvmg1: warn_jvmg_deprecated debug1
drchase@4942 804
drchase@4942 805 jvmgminimal1: warn_jvmg_deprecated debugminimal1
drchase@4942 806
drchase@4942 807 jvmgcore: warn_jvmg_deprecated debugcore
drchase@4942 808
drchase@4942 809 jvmgzero: warn_jvmg_deprecated debugzero
drchase@4942 810
drchase@4942 811 jvmgshark: warn_jvmg_deprecated debugshark
drchase@4942 812
duke@435 813 # JPRT rule to build this workspace
duke@435 814 include $(GAMMADIR)/make/jprt.gmk
duke@435 815
duke@435 816 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \
zgu@4492 817 $(MINIMAL1_VM_TARGETS) \
zgu@4492 818 generic_build1 generic_build2 generic_buildminimal1 generic_export \
duke@435 819 export_product export_fastdebug export_debug export_optimized \
duke@435 820 export_jdk_product export_jdk_fastdebug export_jdk_debug \
duke@435 821 create_jdk copy_jdk update_jdk test_jdk \
jprovino@4165 822 copy_product_jdk copy_fastdebug_jdk copy_debug_jdk \
jprovino@4165 823 $(HS_ALT_MAKE)/Makefile.make

mercurial