make/Makefile

Mon, 06 May 2013 19:49:23 -0700

author
twisti
date
Mon, 06 May 2013 19:49:23 -0700
changeset 5109
aabf54ccedb1
parent 4946
1c6887c9afaa
child 5237
f2110083203d
child 6439
164db61dbced
permissions
-rw-r--r--

8008772: remove gamma launcher
Reviewed-by: kvn, neliasso, ctornqvi

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

mercurial