make/Makefile

Wed, 21 Jan 2015 12:38:11 +0100

author
goetz
date
Wed, 21 Jan 2015 12:38:11 +0100
changeset 7574
a51071796915
parent 7138
63bae08b051e
child 7535
7ae4e26cb1e0
child 9858
b985cbb00e68
permissions
-rw-r--r--

8068013: [TESTBUG] Aix support in hotspot jtreg tests
Reviewed-by: ctornqvi, fzhinkin, farvidsson

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
kvn@7138 98 COMMON_VM_OPTIMIZED_TARGETS=optimized optimized1 docs export_optimized
phh@3492 99
coleenp@548 100 # JDK directory list
coleenp@548 101 JDK_DIRS=bin include jre lib demo
coleenp@548 102
duke@435 103 all: all_product all_fastdebug
phh@3492 104
jprovino@4165 105 ifeq ($(JVM_VARIANT_MINIMAL1),true)
jprovino@4165 106 all_product: productminimal1
jprovino@4165 107 all_fastdebug: fastdebugminimal1
drchase@4942 108 all_debug: debugminimal1
jprovino@4165 109 endif
jprovino@4165 110
phh@3492 111 ifdef BUILD_CLIENT_ONLY
bobv@2036 112 all_product: product1 docs export_product
bobv@2036 113 all_fastdebug: fastdebug1 docs export_fastdebug
drchase@4942 114 all_debug: debug1 docs export_debug
kvn@7138 115 all_optimized: optimized1 docs export_optimized
phh@3492 116 else
phh@3492 117 ifeq ($(MACOSX_UNIVERSAL),true)
phh@3492 118 all_product: universal_product
phh@3492 119 all_fastdebug: universal_fastdebug
phh@3492 120 all_debug: universal_debug
kvn@7138 121 all_optimized: universal_optimized
phh@3492 122 else
phh@3492 123 all_product: $(COMMON_VM_PRODUCT_TARGETS)
phh@3492 124 all_fastdebug: $(COMMON_VM_FASTDEBUG_TARGETS)
phh@3492 125 all_debug: $(COMMON_VM_DEBUG_TARGETS)
kvn@7138 126 all_optimized: $(COMMON_VM_OPTIMIZED_TARGETS)
bobv@2036 127 endif
phh@3492 128 endif
phh@3492 129
never@1445 130 allzero: all_productzero all_fastdebugzero
never@1445 131 all_productzero: productzero docs export_product
never@1445 132 all_fastdebugzero: fastdebugzero docs export_fastdebug
drchase@4942 133 all_debugzero: debugzero docs export_debug
never@1445 134 all_optimizedzero: optimizedzero docs export_optimized
never@1445 135
twisti@2047 136 allshark: all_productshark all_fastdebugshark
twisti@2047 137 all_productshark: productshark docs export_product
twisti@2047 138 all_fastdebugshark: fastdebugshark docs export_fastdebug
drchase@4942 139 all_debugshark: debugshark docs export_debug
twisti@2047 140 all_optimizedshark: optimizedshark docs export_optimized
twisti@2047 141
goetz@6439 142 allcore: all_productcore all_fastdebugcore
goetz@6439 143 all_productcore: productcore docs export_product
goetz@6439 144 all_fastdebugcore: fastdebugcore docs export_fastdebug
goetz@6439 145 all_debugcore: debugcore docs export_debug
goetz@6439 146 all_optimizedcore: optimizedcore docs export_optimized
goetz@6439 147
duke@435 148 # Do everything
duke@435 149 world: all create_jdk
duke@435 150
duke@435 151 # Build or export docs
duke@435 152 docs:
duke@435 153 ifeq ($(OSNAME),windows)
duke@435 154 @$(ECHO) "No docs ($(VM_TARGET)) for windows"
duke@435 155 else
dcubed@3725 156 # We specify 'BUILD_FLAVOR=product' so that the proper
dcubed@3725 157 # ENABLE_FULL_DEBUG_SYMBOLS value is used.
duke@435 158 $(CD) $(OUTPUTDIR); \
duke@435 159 $(MAKE) -f $(ABS_OS_MAKEFILE) \
dcubed@3725 160 $(MAKE_ARGS) BUILD_FLAVOR=product docs
duke@435 161 endif
duke@435 162
twisti@5109 163 # Output directories
twisti@5109 164 C1_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1
twisti@5109 165 C2_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
goetz@6439 166 CORE_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_core
twisti@5109 167 MINIMAL1_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1
twisti@5109 168 ZERO_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_zero
twisti@5109 169 SHARK_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_shark
twisti@5109 170
duke@435 171 # Build variation of hotspot
duke@435 172 $(C1_VM_TARGETS):
duke@435 173 $(CD) $(GAMMADIR)/make; \
twisti@5109 174 $(MAKE) BUILD_DIR=$(C1_DIR) BUILD_FLAVOR=$(@:%1=%) VM_TARGET=$@ generic_build1 $(ALT_OUT)
duke@435 175
duke@435 176 $(C2_VM_TARGETS):
duke@435 177 $(CD) $(GAMMADIR)/make; \
twisti@5109 178 $(MAKE) BUILD_DIR=$(C2_DIR) BUILD_FLAVOR=$@ VM_TARGET=$@ generic_build2 $(ALT_OUT)
duke@435 179
goetz@6439 180 $(CORE_VM_TARGETS):
goetz@6439 181 $(CD) $(GAMMADIR)/make; \
simonis@6452 182 $(MAKE) BUILD_DIR=$(CORE_DIR) BUILD_FLAVOR=$(@:%core=%) VM_TARGET=$@ generic_buildcore $(ALT_OUT)
goetz@6439 183
never@1445 184 $(ZERO_VM_TARGETS):
never@1445 185 $(CD) $(GAMMADIR)/make; \
twisti@5109 186 $(MAKE) BUILD_DIR=$(ZERO_DIR) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ generic_buildzero $(ALT_OUT)
never@1445 187
twisti@2047 188 $(SHARK_VM_TARGETS):
twisti@2047 189 $(CD) $(GAMMADIR)/make; \
twisti@5109 190 $(MAKE) BUILD_DIR=$(SHARK_DIR) BUILD_FLAVOR=$(@:%shark=%) VM_TARGET=$@ generic_buildshark $(ALT_OUT)
twisti@2047 191
jprovino@4165 192 $(MINIMAL1_VM_TARGETS):
jprovino@4165 193 $(CD) $(GAMMADIR)/make; \
twisti@5109 194 $(MAKE) BUILD_DIR=$(MINIMAL1_DIR) BUILD_FLAVOR=$(@:%minimal1=%) VM_TARGET=$@ generic_buildminimal1 $(ALT_OUT)
twisti@5109 195
twisti@5109 196 # Install hotspot script in build directory
twisti@5109 197 HOTSPOT_SCRIPT=$(BUILD_DIR)/$(BUILD_FLAVOR)/hotspot
twisti@5109 198 $(HOTSPOT_SCRIPT): $(GAMMADIR)/make/hotspot.script
twisti@5109 199 $(QUIETLY) $(MKDIR) -p $(BUILD_DIR)/$(BUILD_FLAVOR)
twisti@5109 200 $(QUIETLY) cat $< | sed -e 's|@@LIBARCH@@|$(LIBARCH)|g' | sed -e 's|@@JDK_IMPORT_PATH@@|$(JDK_IMPORT_PATH)|g' > $@
twisti@5109 201 $(QUIETLY) chmod +x $@
jprovino@4165 202
duke@435 203 # Build compiler1 (client) rule, different for platforms
twisti@5109 204 generic_build1: $(HOTSPOT_SCRIPT)
duke@435 205 $(MKDIR) -p $(OUTPUTDIR)
duke@435 206 ifeq ($(OSNAME),windows)
duke@435 207 ifeq ($(ARCH_DATA_MODEL), 32)
duke@435 208 $(CD) $(OUTPUTDIR); \
duke@435 209 $(NMAKE) -f $(ABS_OS_MAKEFILE) \
duke@435 210 Variant=compiler1 \
duke@435 211 WorkSpace=$(ABS_GAMMADIR) \
duke@435 212 BootStrapDir=$(ABS_BOOTDIR) \
duke@435 213 BuildUser=$(USERNAME) \
duke@435 214 $(MAKE_ARGS) $(VM_TARGET:%1=%)
duke@435 215 else
duke@435 216 @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
duke@435 217 endif
duke@435 218 else
duke@435 219 ifeq ($(ARCH_DATA_MODEL), 32)
duke@435 220 $(CD) $(OUTPUTDIR); \
duke@435 221 $(MAKE) -f $(ABS_OS_MAKEFILE) \
duke@435 222 $(MAKE_ARGS) $(VM_TARGET)
duke@435 223 else
duke@435 224 @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
duke@435 225 endif
duke@435 226 endif
duke@435 227
duke@435 228 # Build compiler2 (server) rule, different for platforms
twisti@5109 229 generic_build2: $(HOTSPOT_SCRIPT)
duke@435 230 $(MKDIR) -p $(OUTPUTDIR)
duke@435 231 ifeq ($(OSNAME),windows)
duke@435 232 $(CD) $(OUTPUTDIR); \
duke@435 233 $(NMAKE) -f $(ABS_OS_MAKEFILE) \
duke@435 234 Variant=compiler2 \
duke@435 235 WorkSpace=$(ABS_GAMMADIR) \
duke@435 236 BootStrapDir=$(ABS_BOOTDIR) \
duke@435 237 BuildUser=$(USERNAME) \
duke@435 238 $(MAKE_ARGS) $(VM_TARGET)
duke@435 239 else
duke@435 240 $(CD) $(OUTPUTDIR); \
duke@435 241 $(MAKE) -f $(ABS_OS_MAKEFILE) \
duke@435 242 $(MAKE_ARGS) $(VM_TARGET)
duke@435 243 endif
duke@435 244
goetz@6439 245 generic_buildcore: $(HOTSPOT_SCRIPT)
goetz@6439 246 ifeq ($(HS_ARCH),ppc)
goetz@6439 247 ifeq ($(ARCH_DATA_MODEL),64)
goetz@6439 248 $(MKDIR) -p $(OUTPUTDIR)
goetz@6439 249 $(CD) $(OUTPUTDIR); \
goetz@6439 250 $(MAKE) -f $(ABS_OS_MAKEFILE) \
goetz@6439 251 $(MAKE_ARGS) $(VM_TARGET)
goetz@6439 252 else
goetz@6439 253 @$(ECHO) "No ($(VM_TARGET)) for ppc ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
goetz@6439 254 endif
goetz@6439 255 else
goetz@6439 256 @$(ECHO) "No ($(VM_TARGET)) for $(HS_ARCH)"
goetz@6439 257 endif
goetz@6439 258
twisti@5109 259 generic_buildzero: $(HOTSPOT_SCRIPT)
never@1445 260 $(MKDIR) -p $(OUTPUTDIR)
never@1445 261 $(CD) $(OUTPUTDIR); \
never@1445 262 $(MAKE) -f $(ABS_OS_MAKEFILE) \
never@1445 263 $(MAKE_ARGS) $(VM_TARGET)
never@1445 264
twisti@5109 265 generic_buildshark: $(HOTSPOT_SCRIPT)
twisti@2047 266 $(MKDIR) -p $(OUTPUTDIR)
twisti@2047 267 $(CD) $(OUTPUTDIR); \
twisti@2047 268 $(MAKE) -f $(ABS_OS_MAKEFILE) \
drchase@4942 269 $(MAKE_ARGS) $(VM_TARGET)
twisti@2047 270
twisti@5109 271 generic_buildminimal1: $(HOTSPOT_SCRIPT)
jprovino@4165 272 ifeq ($(JVM_VARIANT_MINIMAL1),true)
jprovino@4165 273 $(MKDIR) -p $(OUTPUTDIR)
jprovino@4165 274 ifeq ($(ARCH_DATA_MODEL), 32)
jprovino@4165 275 ifeq ($(OSNAME),windows)
jprovino@4165 276 $(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ;
jprovino@4165 277 else
jprovino@4165 278 ifeq ($(OSNAME),solaris)
jprovino@4165 279 $(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ;
jprovino@4165 280 else
jprovino@4165 281 $(CD) $(OUTPUTDIR); \
jprovino@4165 282 $(MAKE) -f $(ABS_OS_MAKEFILE) $(MAKE_ARGS) $(VM_TARGET) ;
jprovino@4165 283 endif
jprovino@4165 284 endif
jprovino@4165 285 else
jprovino@4165 286 @$(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
jprovino@4165 287 endif
jprovino@4165 288 else
jprovino@4165 289 @$(ECHO) "Error: trying to build a minimal target but JVM_VARIANT_MINIMAL1 is not true."
jprovino@4165 290 endif
jprovino@4165 291
duke@435 292 # Export file rule
duke@435 293 generic_export: $(EXPORT_LIST)
twisti@5109 294
duke@435 295 export_product:
twisti@5109 296 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) generic_export
duke@435 297 export_fastdebug:
twisti@5109 298 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
duke@435 299 export_debug:
twisti@5109 300 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
duke@435 301 export_optimized:
twisti@5109 302 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
twisti@5109 303
phh@3492 304 export_product_jdk::
twisti@5109 305 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) generic_export
phh@3492 306 export_optimized_jdk::
iignatyev@7120 307 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) generic_export
phh@3492 308 export_fastdebug_jdk::
twisti@5109 309 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) generic_export
phh@3492 310 export_debug_jdk::
twisti@5109 311 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) generic_export
duke@435 312
duke@435 313 # Export file copy rules
duke@435 314 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt
twisti@5109 315 DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs
twisti@5109 316 C1_BUILD_DIR =$(C1_DIR)/$(BUILD_FLAVOR)
twisti@5109 317 C2_BUILD_DIR =$(C2_DIR)/$(BUILD_FLAVOR)
goetz@6439 318 CORE_BUILD_DIR =$(CORE_DIR)/$(BUILD_FLAVOR)
twisti@5109 319 MINIMAL1_BUILD_DIR=$(MINIMAL1_DIR)/$(BUILD_FLAVOR)
twisti@5109 320 ZERO_BUILD_DIR =$(ZERO_DIR)/$(BUILD_FLAVOR)
twisti@5109 321 SHARK_BUILD_DIR =$(SHARK_DIR)/$(BUILD_FLAVOR)
duke@435 322
twisti@4946 323 # Server (C2)
erikj@3649 324 ifeq ($(JVM_VARIANT_SERVER), true)
twisti@4946 325 # Common
twisti@5109 326 $(EXPORT_SERVER_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
duke@435 327 $(install-file)
twisti@5109 328 $(EXPORT_LIB_DIR)/%.jar: $(C2_BUILD_DIR)/../generated/%.jar
dcubed@3724 329 $(install-file)
twisti@5109 330 $(EXPORT_INCLUDE_DIR)/%: $(C2_BUILD_DIR)/../generated/jvmtifiles/%
duke@435 331 $(install-file)
twisti@4946 332 # Windows
twisti@5109 333 $(EXPORT_SERVER_DIR)/%.dll: $(C2_BUILD_DIR)/%.dll
duke@435 334 $(install-file)
twisti@5109 335 $(EXPORT_SERVER_DIR)/%.pdb: $(C2_BUILD_DIR)/%.pdb
duke@435 336 $(install-file)
twisti@5109 337 $(EXPORT_SERVER_DIR)/%.map: $(C2_BUILD_DIR)/%.map
dcubed@3724 338 $(install-file)
twisti@5109 339 $(EXPORT_LIB_DIR)/%.lib: $(C2_BUILD_DIR)/%.lib
duke@435 340 $(install-file)
twisti@5109 341 $(EXPORT_JRE_BIN_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
duke@435 342 $(install-file)
twisti@5109 343 $(EXPORT_JRE_BIN_DIR)/%.dll: $(C2_BUILD_DIR)/%.dll
duke@435 344 $(install-file)
twisti@5109 345 $(EXPORT_JRE_BIN_DIR)/%.pdb: $(C2_BUILD_DIR)/%.pdb
dcubed@3724 346 $(install-file)
twisti@5109 347 $(EXPORT_JRE_BIN_DIR)/%.map: $(C2_BUILD_DIR)/%.map
duke@435 348 $(install-file)
twisti@4946 349 # Unix
twisti@5109 350 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
duke@435 351 $(install-file)
twisti@5109 352 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 353 $(install-file)
twisti@5109 354 $(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 355 $(install-file)
twisti@5109 356 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
twisti@4946 357 $(install-file)
twisti@5109 358 $(EXPORT_SERVER_DIR)/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
twisti@4946 359 $(install-file)
twisti@5109 360 $(EXPORT_SERVER_DIR)/64/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
twisti@4946 361 $(install-file)
twisti@5109 362 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
twisti@4946 363 $(install-file)
twisti@5109 364 $(EXPORT_SERVER_DIR)/64/%.diz: $(C2_BUILD_DIR)/%.diz
duke@435 365 $(install-file)
dcubed@5898 366 # MacOS X
dcubed@5898 367 $(EXPORT_JRE_LIB_ARCH_DIR)/%.dSYM: $(C2_BUILD_DIR)/%.dSYM
dcubed@5898 368 $(install-dir)
dcubed@5898 369 $(EXPORT_SERVER_DIR)/%.dSYM: $(C2_BUILD_DIR)/%.dSYM
dcubed@5898 370 $(install-dir)
duke@435 371 endif
duke@435 372
twisti@4946 373 # Client (C1)
twisti@4946 374 ifeq ($(JVM_VARIANT_CLIENT), true)
twisti@4946 375 # Common
twisti@5109 376 $(EXPORT_CLIENT_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
jprovino@4165 377 $(install-file)
twisti@5109 378 $(EXPORT_LIB_DIR)/%.jar: $(C1_BUILD_DIR)/../generated/%.jar
jprovino@4165 379 $(install-file)
twisti@5109 380 $(EXPORT_INCLUDE_DIR)/%: $(C1_BUILD_DIR)/../generated/jvmtifiles/%
jprovino@4165 381 $(install-file)
twisti@4946 382 # Windows
twisti@5109 383 $(EXPORT_CLIENT_DIR)/%.dll: $(C1_BUILD_DIR)/%.dll
jprovino@4165 384 $(install-file)
twisti@5109 385 $(EXPORT_CLIENT_DIR)/%.pdb: $(C1_BUILD_DIR)/%.pdb
twisti@4946 386 $(install-file)
twisti@5109 387 $(EXPORT_CLIENT_DIR)/%.map: $(C1_BUILD_DIR)/%.map
twisti@4946 388 $(install-file)
twisti@5109 389 $(EXPORT_LIB_DIR)/%.lib: $(C1_BUILD_DIR)/%.lib
twisti@4946 390 $(install-file)
twisti@5109 391 $(EXPORT_JRE_BIN_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
twisti@4946 392 $(install-file)
twisti@5109 393 $(EXPORT_JRE_BIN_DIR)/%.dll: $(C1_BUILD_DIR)/%.dll
twisti@4946 394 $(install-file)
twisti@5109 395 $(EXPORT_JRE_BIN_DIR)/%.pdb: $(C1_BUILD_DIR)/%.pdb
twisti@4946 396 $(install-file)
twisti@5109 397 $(EXPORT_JRE_BIN_DIR)/%.map: $(C1_BUILD_DIR)/%.map
twisti@4946 398 $(install-file)
twisti@4946 399 # Unix
twisti@5109 400 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 401 $(install-file)
twisti@5109 402 $(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 403 $(install-file)
twisti@5109 404 $(EXPORT_CLIENT_DIR)/64/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 405 $(install-file)
twisti@5109 406 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
twisti@4946 407 $(install-file)
twisti@5109 408 $(EXPORT_CLIENT_DIR)/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
twisti@4946 409 $(install-file)
twisti@5109 410 $(EXPORT_CLIENT_DIR)/64/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
twisti@4946 411 $(install-file)
twisti@5109 412 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
twisti@4946 413 $(install-file)
twisti@5109 414 $(EXPORT_CLIENT_DIR)/64/%.diz: $(C1_BUILD_DIR)/%.diz
twisti@4946 415 $(install-file)
dcubed@5898 416 # MacOS X
dcubed@5898 417 $(EXPORT_JRE_LIB_ARCH_DIR)/%.dSYM: $(C1_BUILD_DIR)/%.dSYM
dcubed@5898 418 $(install-dir)
dcubed@5898 419 $(EXPORT_CLIENT_DIR)/%.dSYM: $(C1_BUILD_DIR)/%.dSYM
dcubed@5898 420 $(install-dir)
duke@435 421 endif
duke@435 422
twisti@4946 423 # Minimal1
twisti@4946 424 ifeq ($(JVM_VARIANT_MINIMAL1), true)
twisti@4946 425 # Common
twisti@5109 426 $(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
duke@435 427 $(install-file)
twisti@5109 428 $(EXPORT_LIB_DIR)/%.jar: $(MINIMAL1_BUILD_DIR)/../generated/%.jar
twisti@4946 429 $(install-file)
twisti@5109 430 $(EXPORT_INCLUDE_DIR)/%: $(MINIMAL1_BUILD_DIR)/../generated/jvmtifiles/%
twisti@4946 431 $(install-file)
twisti@4946 432 # Windows
twisti@5109 433 $(EXPORT_MINIMAL_DIR)/%.dll: $(MINIMAL1_BUILD_DIR)/%.dll
twisti@4946 434 $(install-file)
twisti@5109 435 $(EXPORT_MINIMAL_DIR)/%.pdb: $(MINIMAL1_BUILD_DIR)/%.pdb
twisti@4946 436 $(install-file)
twisti@5109 437 $(EXPORT_MINIMAL_DIR)/%.map: $(MINIMAL1_BUILD_DIR)/%.map
twisti@4946 438 $(install-file)
twisti@5109 439 $(EXPORT_LIB_DIR)/%.lib: $(MINIMAL1_BUILD_DIR)/%.lib
twisti@4946 440 $(install-file)
twisti@5109 441 $(EXPORT_JRE_BIN_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
twisti@4946 442 $(install-file)
twisti@5109 443 $(EXPORT_JRE_BIN_DIR)/%.dll: $(MINIMAL1_BUILD_DIR)/%.dll
twisti@4946 444 $(install-file)
twisti@5109 445 $(EXPORT_JRE_BIN_DIR)/%.pdb: $(MINIMAL1_BUILD_DIR)/%.pdb
twisti@4946 446 $(install-file)
twisti@5109 447 $(EXPORT_JRE_BIN_DIR)/%.map: $(MINIMAL1_BUILD_DIR)/%.map
twisti@4946 448 $(install-file)
twisti@4946 449 # Unix
twisti@5109 450 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 451 $(install-file)
twisti@5109 452 $(EXPORT_MINIMAL_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 453 $(install-file)
twisti@5109 454 $(EXPORT_MINIMAL_DIR)/64/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 455 $(install-file)
twisti@5109 456 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
twisti@4946 457 $(install-file)
twisti@5109 458 $(EXPORT_MINIMAL_DIR)/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
twisti@4946 459 $(install-file)
twisti@5109 460 $(EXPORT_MINIMAL_DIR)/64/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
twisti@4946 461 $(install-file)
twisti@5109 462 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
twisti@4946 463 $(install-file)
twisti@5109 464 $(EXPORT_MINIMAL_DIR)/64/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
twisti@4946 465 $(install-file)
dcubed@5898 466 # MacOS X does not support Minimal1 config
twisti@4946 467 endif
duke@435 468
twisti@4946 469 # Zero
twisti@4946 470 ifeq ($(JVM_VARIANT_ZERO), true)
twisti@4946 471 # Common
twisti@5109 472 $(EXPORT_LIB_DIR)/%.jar: $(ZERO_BUILD_DIR)/../generated/%.jar
duke@435 473 $(install-file)
twisti@5109 474 $(EXPORT_INCLUDE_DIR)/%: $(ZERO_BUILD_DIR)/../generated/jvmtifiles/%
twisti@4946 475 $(install-file)
twisti@4946 476 # Unix
twisti@5109 477 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 478 $(install-file)
twisti@5109 479 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(ZERO_BUILD_DIR)/%.debuginfo
twisti@4946 480 $(install-file)
twisti@5109 481 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(ZERO_BUILD_DIR)/%.diz
twisti@4946 482 $(install-file)
twisti@5109 483 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 484 $(install-file)
twisti@5109 485 $(EXPORT_SERVER_DIR)/%.debuginfo: $(ZERO_BUILD_DIR)/%.debuginfo
twisti@4946 486 $(install-file)
twisti@5109 487 $(EXPORT_SERVER_DIR)/%.diz: $(ZERO_BUILD_DIR)/%.diz
twisti@4946 488 $(install-file)
dcubed@5898 489 # MacOS X
dcubed@5898 490 $(EXPORT_JRE_LIB_ARCH_DIR)/%.dSYM: $(ZERO_BUILD_DIR)/%.dSYM
dcubed@5898 491 $(install-dir)
dcubed@5898 492 $(EXPORT_SERVER_DIR)/%.dSYM: $(ZERO_BUILD_DIR)/%.dSYM
dcubed@5898 493 $(install-dir)
twisti@4946 494 endif
twisti@4946 495
goetz@6439 496 # Core
goetz@6439 497 ifeq ($(JVM_VARIANT_CORE), true)
goetz@6439 498 # Common
simonis@6452 499 $(EXPORT_LIB_DIR)/%.jar: $(CORE_BUILD_DIR)/../generated/%.jar
goetz@6439 500 $(install-file)
simonis@6452 501 $(EXPORT_INCLUDE_DIR)/%: $(CORE_BUILD_DIR)/../generated/jvmtifiles/%
goetz@6439 502 $(install-file)
goetz@6439 503 # Unix
simonis@6452 504 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(CORE_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
goetz@6439 505 $(install-file)
simonis@6452 506 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(CORE_BUILD_DIR)/%.debuginfo
goetz@6439 507 $(install-file)
simonis@6452 508 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(CORE_BUILD_DIR)/%.diz
goetz@6439 509 $(install-file)
simonis@6452 510 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(CORE_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
goetz@6439 511 $(install-file)
simonis@6452 512 $(EXPORT_SERVER_DIR)/%.debuginfo: $(CORE_BUILD_DIR)/%.debuginfo
goetz@6439 513 $(install-file)
simonis@6452 514 $(EXPORT_SERVER_DIR)/%.diz: $(CORE_BUILD_DIR)/%.diz
goetz@6439 515 $(install-file)
goetz@6439 516 endif
goetz@6439 517
twisti@4946 518 # Shark
twisti@4946 519 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
twisti@4946 520 # Common
twisti@5109 521 $(EXPORT_LIB_DIR)/%.jar: $(SHARK_BUILD_DIR)/../generated/%.jar
twisti@4946 522 $(install-file)
twisti@5109 523 $(EXPORT_INCLUDE_DIR)/%: $(SHARK_BUILD_DIR)/../generated/jvmtifiles/%
twisti@4946 524 $(install-file)
twisti@4946 525 # Unix
twisti@5109 526 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 527 $(install-file)
twisti@5109 528 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo): $(SHARK_BUILD_DIR)/%.debuginfo
twisti@4946 529 $(install-file)
twisti@5109 530 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(SHARK_BUILD_DIR)/%.diz
twisti@4946 531 $(install-file)
twisti@5109 532 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
twisti@4946 533 $(install-file)
twisti@5109 534 $(EXPORT_SERVER_DIR)/%.debuginfo: $(SHARK_BUILD_DIR)/%.debuginfo
twisti@4946 535 $(install-file)
twisti@5109 536 $(EXPORT_SERVER_DIR)/%.diz: $(SHARK_BUILD_DIR)/%.diz
twisti@4946 537 $(install-file)
dcubed@5898 538 # MacOS X
dcubed@5898 539 $(EXPORT_JRE_LIB_ARCH_DIR)/%.dSYM: $(SHARK_BUILD_DIR)/%.dSYM
dcubed@5898 540 $(install-dir)
dcubed@5898 541 $(EXPORT_SERVER_DIR)/%.dSYM: $(SHARK_BUILD_DIR)/%.dSYM
dcubed@5898 542 $(install-dir)
twisti@4946 543 endif
duke@435 544
dcubed@1619 545 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/code/%
dcubed@1619 546 $(install-file)
dcubed@1619 547
duke@435 548 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/%
duke@435 549 $(install-file)
duke@435 550
kamg@2515 551 HS_JNI_ARCH_SRC=$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h)
kamg@2515 552 $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_JNI_ARCH_SRC)
duke@435 553 $(install-file)
duke@435 554
duke@435 555 $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/services/%
duke@435 556 $(install-file)
duke@435 557
phh@3427 558 JFR_EXISTS=$(shell if [ -d $(HS_ALT_SRC) ]; then echo 1; else echo 0; fi)
phh@3427 559 # export jfr.h
phh@3427 560 ifeq ($JFR_EXISTS,1)
sla@5237 561 $(EXPORT_INCLUDE_DIR)/%: $(HS_ALT_SRC)/share/vm/jfr/%
phh@3427 562 $(install-file)
phh@3427 563 else
phh@3427 564 $(EXPORT_INCLUDE_DIR)/jfr.h:
phh@3427 565 endif
phh@3427 566
duke@435 567 # Doc files (jvmti.html)
duke@435 568 $(EXPORT_DOCS_DIR)/platform/jvmti/%: $(DOCS_DIR)/%
duke@435 569 $(install-file)
duke@435 570
duke@435 571 # Xusage file
zgu@4492 572 $(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_MINIMAL_DIR)/Xusage.txt: $(XUSAGE)
duke@435 573 $(prep-target)
duke@435 574 $(RM) $@.temp
duke@435 575 $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp
duke@435 576 $(MV) $@.temp $@
duke@435 577
duke@435 578 #
duke@435 579 # Clean rules
duke@435 580 #
duke@435 581 clobber clean: clean_build clean_export clean_jdk
duke@435 582 clean_build:
duke@435 583 $(RM) -r $(C1_DIR)
duke@435 584 $(RM) -r $(C2_DIR)
goetz@6439 585 $(RM) -r $(CORE_DIR)
never@1445 586 $(RM) -r $(ZERO_DIR)
twisti@2047 587 $(RM) -r $(SHARK_DIR)
jprovino@4165 588 $(RM) -r $(MINIMAL1_DIR)
duke@435 589 clean_export:
duke@435 590 $(RM) -r $(EXPORT_PATH)
duke@435 591 clean_jdk:
duke@435 592 $(RM) -r $(JDK_IMAGE_DIR)
duke@435 593
duke@435 594 #
duke@435 595 # Create JDK and place this build into it
duke@435 596 #
duke@435 597 create_jdk: copy_jdk update_jdk
duke@435 598
duke@435 599 update_jdk: export_product_jdk export_fastdebug_jdk test_jdk
duke@435 600
duke@435 601 copy_jdk: $(JDK_IMAGE_DIR)/jre/lib/rt.jar
duke@435 602
duke@435 603 $(JDK_IMAGE_DIR)/jre/lib/rt.jar:
duke@435 604 $(RM) -r $(JDK_IMAGE_DIR)
duke@435 605 $(MKDIR) -p $(JDK_IMAGE_DIR)
duke@435 606 ($(CD) $(JDK_IMPORT_PATH) && \
duke@435 607 $(TAR) -cf - *) | \
duke@435 608 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
duke@435 609
twisti@4780 610
twisti@4780 611 # Testing the built JVM
twisti@4780 612 RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -Dsun.java.launcher=gamma
twisti@4780 613 generic_test:
twisti@4780 614 @$(ECHO) "Running with: $(ALTJVM_DIR)"
twisti@4780 615 @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -Xinternalversion
twisti@4780 616 @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -showversion -help
twisti@4780 617
twisti@4780 618 # C2 test targets
drchase@4942 619 test_product test_optimized test_fastdebug test_debug:
twisti@4780 620 @$(MAKE) generic_test ALTJVM_DIR="$(C2_DIR)/$(@:test_%=%)"
twisti@4780 621
twisti@4780 622 # C1 test targets
drchase@4942 623 test_product1 test_optimized1 test_fastdebug1 test_debug1:
twisti@4780 624 ifeq ($(ARCH_DATA_MODEL), 32)
twisti@4780 625 @$(MAKE) generic_test ALTJVM_DIR="$(C1_DIR)/$(@:test_%1=%)"
twisti@4780 626 else
twisti@4780 627 @$(ECHO) "No compiler1 ($(@:test_%=%)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
twisti@4780 628 endif
twisti@4780 629
twisti@4780 630 # Zero test targets
drchase@4942 631 test_productzero test_optimizedzero test_fastdebugzero test_debugzero:
twisti@4780 632 @$(MAKE) generic_test ALTJVM_DIR="$(ZERO_DIR)/$(@:test_%zero=%)"
twisti@4780 633
twisti@4780 634 # Shark test targets
drchase@4942 635 test_productshark test_optimizedshark test_fastdebugshark test_debugshark:
twisti@4780 636 @$(MAKE) generic_test ALTJVM_DIR="$(SHARK_DIR)/$(@:test_%shark=%)"
twisti@4780 637
twisti@4780 638 # Minimal1 test targets
drchase@4942 639 test_productminimal1 test_optimizedminimal1 test_fastdebugminimal1 test_debugminimal1:
twisti@4780 640 @$(MAKE) generic_test ALTJVM_DIR="$(MINIMAL1_DIR)/$(@:test_%minimal1=%)"
twisti@4780 641
twisti@4780 642
duke@435 643 test_jdk:
erikj@3649 644 ifeq ($(JVM_VARIANT_CLIENT), true)
erikj@3649 645 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -client -Xinternalversion
erikj@3649 646 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -client -version
erikj@3649 647 endif
erikj@3649 648 ifeq ($(findstring true, $(JVM_VARIANT_SERVER)\
erikj@3649 649 $(JVM_VARIANT_ZERO)$(JVM_VARIANT_ZEROSHARK)), true)
erikj@3649 650 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -Xinternalversion
erikj@3649 651 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -version
erikj@3649 652 endif
duke@435 653
phh@3492 654 copy_product_jdk::
duke@435 655 $(RM) -r $(JDK_IMAGE_DIR)
duke@435 656 $(MKDIR) -p $(JDK_IMAGE_DIR)
duke@435 657 ($(CD) $(JDK_IMPORT_PATH) && \
coleenp@548 658 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 659 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
duke@435 660
phh@3492 661 copy_fastdebug_jdk::
duke@435 662 $(RM) -r $(JDK_IMAGE_DIR)/fastdebug
duke@435 663 $(MKDIR) -p $(JDK_IMAGE_DIR)/fastdebug
duke@435 664 if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
duke@435 665 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
coleenp@548 666 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 667 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
duke@435 668 else \
duke@435 669 ($(CD) $(JDK_IMPORT_PATH) && \
coleenp@548 670 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 671 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
duke@435 672 fi
duke@435 673
phh@3492 674 copy_debug_jdk::
duke@435 675 $(RM) -r $(JDK_IMAGE_DIR)/debug
duke@435 676 $(MKDIR) -p $(JDK_IMAGE_DIR)/debug
duke@435 677 if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \
duke@435 678 ($(CD) $(JDK_IMPORT_PATH)/debug && \
coleenp@548 679 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 680 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
duke@435 681 elif [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
duke@435 682 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
coleenp@548 683 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 684 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
duke@435 685 else \
duke@435 686 ($(CD) $(JDK_IMPORT_PATH) && \
coleenp@548 687 $(TAR) -cf - $(JDK_DIRS)) | \
duke@435 688 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
duke@435 689 fi
duke@435 690
iignatyev@7119 691 copy_optimized_jdk::
iignatyev@7119 692 $(RM) -r $(JDK_IMAGE_DIR)/optimized
iignatyev@7119 693 $(MKDIR) -p $(JDK_IMAGE_DIR)/optimized
iignatyev@7119 694 if [ -d $(JDK_IMPORT_PATH)/optimized ] ; then \
iignatyev@7119 695 ($(CD) $(JDK_IMPORT_PATH)/optimized && \
iignatyev@7119 696 $(TAR) -cf - $(JDK_DIRS)) | \
iignatyev@7119 697 ($(CD) $(JDK_IMAGE_DIR)/optimized && $(TAR) -xf -) ; \
iignatyev@7119 698 else \
iignatyev@7119 699 ($(CD) $(JDK_IMPORT_PATH) && \
iignatyev@7119 700 $(TAR) -cf - $(JDK_DIRS)) | \
iignatyev@7119 701 ($(CD) $(JDK_IMAGE_DIR)/optimized && $(TAR) -xf -) ; \
iignatyev@7119 702 fi
iignatyev@7119 703
duke@435 704 #
duke@435 705 # Check target
duke@435 706 #
duke@435 707 check: variable_check
duke@435 708
duke@435 709 #
duke@435 710 # Help target
duke@435 711 #
duke@435 712 help: intro_help target_help variable_help notes_help examples_help
duke@435 713
duke@435 714 # Intro help message
duke@435 715 intro_help:
duke@435 716 @$(ECHO) \
drchase@4942 717 "Makefile for the Hotspot workspace."
duke@435 718 @$(ECHO) \
duke@435 719 "Default behavior is to build and create an export area for the j2se builds."
duke@435 720
duke@435 721 # Target help
duke@435 722 target_help:
duke@435 723 @$(ECHO) "help: This help message"
duke@435 724 @$(ECHO) "all: Same as: all_product all_fastdebug"
duke@435 725 @$(ECHO) "world: Same as: all create_jdk"
duke@435 726 @$(ECHO) "all_product: Same as: product product1 export_product"
duke@435 727 @$(ECHO) "all_fastdebug: Same as: fastdebug fastdebug1 export_fastdebug"
drchase@4942 728 @$(ECHO) "all_debug: Same as: debug debug1 export_debug"
duke@435 729 @$(ECHO) "all_optimized: Same as: optimized optimized1 export_optimized"
duke@435 730 @$(ECHO) "clean: Clean all areas"
duke@435 731 @$(ECHO) "export_product: Export product files to EXPORT_PATH"
duke@435 732 @$(ECHO) "export_fastdebug: Export fastdebug files to EXPORT_PATH"
duke@435 733 @$(ECHO) "export_debug: Export debug files to EXPORT_PATH"
duke@435 734 @$(ECHO) "export_optimized: Export optimized files to EXPORT_PATH"
duke@435 735 @$(ECHO) "create_jdk: Create JDK image, export all files into it"
duke@435 736 @$(ECHO) "update_jdk: Update JDK image with fresh exported files"
duke@435 737 @$(ECHO) " "
jprovino@4165 738 @$(ECHO) "Other targets are:"
duke@435 739 @$(ECHO) " $(C1_VM_TARGETS)"
duke@435 740 @$(ECHO) " $(C2_VM_TARGETS)"
jprovino@4165 741 @$(ECHO) " $(MINIMAL1_VM_TARGETS)"
duke@435 742
duke@435 743 # Variable help (only common ones used by this workspace)
duke@435 744 variable_help: variable_help_intro variable_list variable_help_end
duke@435 745 variable_help_intro:
duke@435 746 @$(ECHO) "--- Common Variables ---"
duke@435 747 variable_help_end:
duke@435 748 @$(ECHO) " "
duke@435 749 @$(ECHO) "--- Make Arguments ---"
duke@435 750 @$(ECHO) "MAKE_ARGS=$(MAKE_ARGS)"
duke@435 751
duke@435 752 # One line descriptions for the variables
duke@435 753 SLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
duke@435 754 OUTPUTDIR.desc = Output directory, default is build/<osname>
duke@435 755 BOOTDIR.desc = JDK used to compile agent java source and test with
duke@435 756 JDK_IMPORT_PATH.desc = Promoted JDK to copy for 'create_jdk'
twisti@3567 757 JDK_IMAGE_DIR.desc = Directory to place JDK to copy
duke@435 758 EXPORT_PATH.desc = Directory to place files to export for JDK build
duke@435 759
duke@435 760 # Make variables to print out (description and value)
duke@435 761 VARIABLE_PRINTVAL_LIST += \
duke@435 762 SLASH_JAVA \
duke@435 763 OUTPUTDIR \
duke@435 764 BOOTDIR \
duke@435 765 JDK_IMPORT_PATH \
twisti@3567 766 JDK_IMAGE_DIR \
duke@435 767 EXPORT_PATH
duke@435 768
duke@435 769 # Make variables that should refer to directories that exist
duke@435 770 VARIABLE_CHECKDIR_LIST += \
duke@435 771 SLASH_JAVA \
duke@435 772 BOOTDIR \
duke@435 773 JDK_IMPORT_PATH
duke@435 774
duke@435 775 # For pattern rules below, so all are treated the same
duke@435 776 DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
duke@435 777 DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
duke@435 778
duke@435 779 # Complete variable check
duke@435 780 variable_check: $(DO_CHECKDIR_LIST)
duke@435 781 variable_list: $(DO_PRINTVAL_LIST) variable_check
duke@435 782
duke@435 783 # Pattern rule for printing out a variable
duke@435 784 %.printval:
duke@435 785 @$(ECHO) " ALT_$* - $($*.desc)"
duke@435 786 @$(ECHO) " $*=$($*)"
duke@435 787
duke@435 788 # Pattern rule for checking to see if a variable with a directory exists
duke@435 789 %.checkdir:
duke@435 790 @if [ ! -d $($*) ] ; then \
duke@435 791 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
duke@435 792 fi
duke@435 793
duke@435 794 # Pattern rule for checking to see if a variable with a file exists
duke@435 795 %.checkfil:
duke@435 796 @if [ ! -f $($*) ] ; then \
duke@435 797 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
duke@435 798 fi
duke@435 799
duke@435 800 # Misc notes on help
duke@435 801 notes_help:
duke@435 802 @$(ECHO) \
duke@435 803 "--- Notes --- "
duke@435 804 @$(ECHO) \
duke@435 805 "- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted"
duke@435 806 @$(ECHO) \
duke@435 807 " builds or previous release JDK builds will work."
duke@435 808 @$(ECHO) \
duke@435 809 "- The fastest builds have been when the workspace and the BOOTDIR are on"
duke@435 810 @$(ECHO) \
duke@435 811 " local disk."
duke@435 812
duke@435 813 examples_help:
duke@435 814 @$(ECHO) \
duke@435 815 "--- Examples --- "
duke@435 816 @$(ECHO) \
duke@435 817 " $(MAKE) all"
duke@435 818 @$(ECHO) \
duke@435 819 " $(MAKE) world"
duke@435 820 @$(ECHO) \
drchase@4942 821 " $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)"
duke@435 822 @$(ECHO) \
duke@435 823 " $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)"
duke@435 824
phh@3492 825 # Universal build support
phh@3492 826 ifeq ($(OS_VENDOR), Darwin)
phh@3492 827 ifeq ($(MACOSX_UNIVERSAL),true)
phh@3492 828 include $(GAMMADIR)/make/$(OSNAME)/makefiles/universal.gmk
phh@3492 829 endif
phh@3492 830 endif
phh@3492 831
drchase@4942 832 # Compatibility for transition to new naming
drchase@4942 833 warn_jvmg_deprecated:
drchase@4942 834 echo "Warning: The jvmg target has been replaced with debug"
drchase@4942 835 echo "Warning: Please update your usage"
drchase@4942 836
drchase@4942 837 jvmg: warn_jvmg_deprecated debug
drchase@4942 838
drchase@4942 839 jvmg1: warn_jvmg_deprecated debug1
drchase@4942 840
drchase@4942 841 jvmgminimal1: warn_jvmg_deprecated debugminimal1
drchase@4942 842
drchase@4942 843 jvmgcore: warn_jvmg_deprecated debugcore
drchase@4942 844
drchase@4942 845 jvmgzero: warn_jvmg_deprecated debugzero
drchase@4942 846
drchase@4942 847 jvmgshark: warn_jvmg_deprecated debugshark
drchase@4942 848
duke@435 849 # JPRT rule to build this workspace
duke@435 850 include $(GAMMADIR)/make/jprt.gmk
duke@435 851
duke@435 852 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \
zgu@4492 853 $(MINIMAL1_VM_TARGETS) \
zgu@4492 854 generic_build1 generic_build2 generic_buildminimal1 generic_export \
duke@435 855 export_product export_fastdebug export_debug export_optimized \
duke@435 856 export_jdk_product export_jdk_fastdebug export_jdk_debug \
duke@435 857 create_jdk copy_jdk update_jdk test_jdk \
jprovino@4165 858 copy_product_jdk copy_fastdebug_jdk copy_debug_jdk \
jprovino@4165 859 $(HS_ALT_MAKE)/Makefile.make

mercurial