annotate hotspot/make/Makefile @ 23507:b4339e4c239b

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