1 # 2 # Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 # 5 # This code is free software; you can redistribute it and/or modify it 6 # under the terms of the GNU General Public License version 2 only, as 7 # published by the Free Software Foundation. Oracle designates this 8 # particular file as subject to the "Classpath" exception as provided 9 # by Oracle in the LICENSE file that accompanied this code. 10 # 11 # This code is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 # 27 # Imports files exported by a hotspot build or provided from an external 28 # location into the OUTPUTDIR, and also primes the OUTPUTDIR with files 29 # that are provided inside this workspace. 30 # 31 # IMPORT_LIST contains the list of destination files that are copied 32 # from external places (outside this workspace). 33 # 34 # INTERNAL_IMPORT_LIST is the list of destination files from BUILDDIR. 35 # 36 37 BUILDDIR = ../.. 38 MODULE = base 39 PRODUCT = java 40 include $(BUILDDIR)/common/Defs.gmk 41 42 SERVER_LOCATION = server 43 CLIENT_LOCATION = client 44 45 DB_SUFFIX = _db 46 DTRACE_SUFFIX = _dtrace 47 48 ifeq ($(PLATFORM), windows) 49 LIB_LOCATION = $(BINDIR) 50 else ifeq ($(PLATFORM), macosx) 51 LIB_LOCATION = $(LIBDIR) 52 else 53 LIB_LOCATION = $(LIBDIR)/$(LIBARCH) 54 endif 55 56 BDB_NAME = $(LIB_PREFIX)db-rds.$(LIBRARY_SUFFIX) 57 58 JVM_NAME = $(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) 59 JVMLIB_NAME = $(LIB_PREFIX)jvm.$(LIB_SUFFIX) 60 JVMMAP_NAME = $(LIB_PREFIX)jvm.map 61 JVMPDB_NAME = $(LIB_PREFIX)jvm.pdb 62 LIBJSIG_NAME = $(LIB_PREFIX)jsig.$(LIBRARY_SUFFIX) 63 JVMDB_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX) 64 JVMDTRACE_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX) 65 66 JVM_DEBUGINFO_NAME = $(LIB_PREFIX)jvm.debuginfo 67 JVM_DIZ_NAME = $(LIB_PREFIX)jvm.diz 68 LIBJSIG_DEBUGINFO_NAME = $(LIB_PREFIX)jsig.debuginfo 69 LIBJSIG_DIZ_NAME = $(LIB_PREFIX)jsig.diz 70 JVMDB_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo 71 JVMDB_DIZ_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).diz 72 JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo 73 JVMDTRACE_DIZ_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).diz 74 75 CLASSSHARINGDATA_DIR = $(BUILDDIR)/tools/sharing 76 77 # Needed to do file copy 78 ABS_BUILDDIR :=$(call FullPath,$(BUILDDIR)) 79 80 SUBDIRS_desktop = fonts 81 SUBDIRS_tools = sajdi 82 include $(BUILDDIR)/common/Subdirs.gmk 83 84 all clean clobber:: 85 $(SUBDIRS-loop) 86 87 all:: build 88 89 # List of files created here or coming from BUILDDIR area (this workspace) 90 INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist 91 92 # List of files coming from outside this workspace 93 ifndef BUILD_CLIENT_ONLY 94 IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \ 95 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt 96 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 97 ifeq ($(ZIP_DEBUGINFO_FILES),1) 98 # the import JDK may not contain .diz files 99 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME)),) 100 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME) 101 endif 102 else 103 # the import JDK may not contain .debuginfo files 104 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),) 105 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME) 106 endif 107 endif 108 endif 109 else 110 IMPORT_LIST = 111 endif 112 113 # Hotspot client is only available on 32-bit non-Zero builds 114 ifneq ($(ZERO_BUILD), true) 115 ifeq ($(ARCH_DATA_MODEL), 32) 116 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \ 117 $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt 118 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 119 ifeq ($(ZIP_DEBUGINFO_FILES),1) 120 # the import JDK may not contain .diz files 121 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME)),) 122 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME) 123 endif 124 else 125 # the import JDK may not contain .debuginfo files 126 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),) 127 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME) 128 endif 129 endif 130 endif 131 endif 132 endif 133 134 ifndef USE_SYSTEM_BDB 135 IMPORT_LIST += $(LIB_LOCATION)/$(BDB_NAME) 136 IMPORT_LIST += $(GENNATIVESRCDIR)/bdb/db.h 137 endif 138 139 ifeq ($(PLATFORM), windows) 140 # Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Windows 141 142 IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%) 143 144 $(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) 145 $(install-import-file) 146 $(call chmod-file, a+x) 147 148 # Get the hotspot .map and .pdb files for client and server 149 ifndef BUILD_CLIENT_ONLY 150 IMPORT_LIST += $(LIBDIR)/$(JVMLIB_NAME) 151 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 152 ifeq ($(ZIP_DEBUGINFO_FILES),1) 153 # the import JDK may not contain .diz files 154 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME)),) 155 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME) 156 endif 157 else 158 # the import JDK may not contain .pdb files 159 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME)),) 160 # assume .map file is present if .pdb file is preset 161 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \ 162 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME) 163 endif 164 endif 165 endif 166 endif 167 168 # Add .map and .pdb files to the import path for client and kernel VMs. 169 # These are only available on 32-bit windows builds. 170 ifeq ($(ARCH_DATA_MODEL), 32) 171 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 172 ifeq ($(ZIP_DEBUGINFO_FILES),1) 173 # the import JDK may not contain .diz files 174 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME)),) 175 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME) 176 endif 177 else 178 # the import JDK may not contain .pdb files 179 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)),) 180 # assume .map file is present if .pdb file is preset 181 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME) \ 182 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME) 183 endif 184 endif 185 ifeq ($(DO_KERNEL), true) 186 ifeq ($(ZIP_DEBUGINFO_FILES),1) 187 # the import JDK may not contain .diz files 188 ifneq ($(wildcard $(HOTSPOT_KERNEL_PATH)/$(JVM_DIZ_NAME)),) 189 IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_DIZ_NAME) 190 endif 191 else 192 # the import JDK may not contain .pdb files 193 ifneq ($(wildcard $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)),) 194 # assume .map file is present if .pdb file is preset 195 IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME) \ 196 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME) 197 endif 198 endif 199 endif 200 endif 201 endif 202 203 $(LIBDIR)/$(JVMLIB_NAME): $(HOTSPOT_LIB_PATH)/$(JVMLIB_NAME) 204 $(install-import-file) 205 206 # it is OK for the .map and .pdb files to not exist, so do not force a 207 # dependency on them from the bootstrap location, and allow the copy to fail. 208 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME): 209 @$(prep-target) 210 -$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMMAP_NAME) $@ 211 @$(install-module-file) 212 213 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME): 214 @$(prep-target) 215 -$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMMAP_NAME) $@ 216 @$(install-module-file) 217 218 ifndef BUILD_CLIENT_ONLY 219 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME): 220 @$(prep-target) 221 -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@ 222 @$(install-module-file) 223 endif 224 225 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME): 226 @$(prep-target) 227 -$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME) $@ 228 @$(install-module-file) 229 230 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME): 231 @$(prep-target) 232 -$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME) $@ 233 @$(install-module-file) 234 235 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME): 236 @$(prep-target) 237 -$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME) $@ 238 @$(install-module-file) 239 240 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_DIZ_NAME): 241 @$(prep-target) 242 -$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVM_DIZ_NAME) $@ 243 @$(install-module-file) 244 245 ifndef BUILD_CLIENT_ONLY 246 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): 247 @$(prep-target) 248 -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@ 249 @$(install-module-file) 250 251 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME): 252 @$(prep-target) 253 -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME) $@ 254 @$(install-module-file) 255 endif 256 257 # Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Windows 258 else # PLATFORM 259 # NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv NOT Windows 260 261 IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME) 262 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 263 ifeq ($(ZIP_DEBUGINFO_FILES),1) 264 # the import JDK may not contain .diz files 265 ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)),) 266 IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DIZ_NAME) 267 endif 268 else 269 # the import JDK may not contain .debuginfo files 270 ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),) 271 IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) 272 endif 273 endif 274 endif 275 ifndef BUILD_CLIENT_ONLY 276 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME) 277 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 278 ifeq ($(ZIP_DEBUGINFO_FILES),1) 279 # the import JDK may not contain the target of the symlink 280 ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)),) 281 # check for the .diz file, but create the .debuginfo link 282 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) 283 endif 284 else 285 # the import JDK may not contain the target of the symlink 286 ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),) 287 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) 288 endif 289 endif 290 endif 291 endif 292 293 ifeq ($(PLATFORM), solaris) 294 ifndef BUILD_CLIENT_ONLY 295 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME) 296 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 297 ifeq ($(ZIP_DEBUGINFO_FILES),1) 298 # the import JDK may not contain .diz files 299 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DIZ_NAME)),) 300 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DIZ_NAME) 301 endif 302 else 303 # the import JDK may not contain .debuginfo files 304 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),) 305 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME) 306 endif 307 endif 308 endif 309 # The conditional can be removed when import JDKs contain these files. 310 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),) 311 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME) 312 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 313 ifeq ($(ZIP_DEBUGINFO_FILES),1) 314 # the import JDK may not contain .diz files 315 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DIZ_NAME)),) 316 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DIZ_NAME) 317 endif 318 else 319 # the import JDK may not contain .debuginfo files 320 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),) 321 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME) 322 endif 323 endif 324 endif 325 else 326 $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!) 327 endif 328 endif 329 endif 330 331 ifneq ($(ZERO_BUILD), true) 332 ifeq ($(ARCH_DATA_MODEL), 32) 333 334 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) 335 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 336 ifeq ($(ZIP_DEBUGINFO_FILES),1) 337 # the import JDK may not contain the target of the symlink 338 ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)),) 339 # check for the .diz file, but create the .debuginfo link 340 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) 341 endif 342 else 343 # the import JDK may not contain the target of the symlink 344 ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),) 345 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) 346 endif 347 endif 348 endif 349 350 ifeq ($(PLATFORM), solaris) 351 # solaris vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv solaris 352 353 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME) 354 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 355 ifeq ($(ZIP_DEBUGINFO_FILES),1) 356 # the import JDK may not contain .diz files 357 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DIZ_NAME)),) 358 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DIZ_NAME) 359 endif 360 else 361 # the import JDK may not contain .debuginfo files 362 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)),) 363 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME) 364 endif 365 endif 366 endif 367 368 # The conditional can be removed when import JDKs contain these files. 369 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)),) 370 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME) 371 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME) 372 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME) 373 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 374 ifeq ($(ZIP_DEBUGINFO_FILES),1) 375 # the import JDK may not contain .diz files 376 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DIZ_NAME)),) 377 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DIZ_NAME) 378 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DIZ_NAME) 379 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DIZ_NAME) 380 endif 381 else 382 # the import JDK may not contain .debuginfo files 383 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),) 384 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME) 385 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME) 386 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME) 387 endif 388 endif 389 endif 390 else 391 $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!) 392 endif 393 394 ifndef BUILD_CLIENT_ONLY 395 # The conditional can be removed when import JDKs contain these files. 396 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),) 397 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME) 398 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 399 ifeq ($(ZIP_DEBUGINFO_FILES),1) 400 # the import JDK may not contain .diz files 401 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DIZ_NAME)),) 402 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DIZ_NAME) 403 endif 404 else 405 # the import JDK may not contain .debuginfo files 406 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),) 407 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME) 408 endif 409 endif 410 endif 411 else 412 $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!) 413 endif 414 415 # The conditional can be removed when import JDKs contain these files. 416 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),) 417 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME) 418 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 419 ifeq ($(ZIP_DEBUGINFO_FILES),1) 420 # the import JDK may not contain .diz files 421 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DIZ_NAME)),) 422 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DIZ_NAME) 423 endif 424 else 425 # the import JDK may not contain .debuginfo files 426 ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),) 427 IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME) 428 endif 429 endif 430 endif 431 else 432 $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!) 433 endif 434 endif 435 436 # For backwards compatability, make a link of the 32-bit client JVM to $(LIBDIR) 437 IMPORT_LIST += $(LIB_LOCATION)/$(JVM_NAME) 438 439 $(LIB_LOCATION)/$(JVM_NAME): $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) 440 @$(prep-target) 441 442 # solaris ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ solaris 443 endif # 32bit solaris 444 445 endif # 32bit 446 447 endif # ZERO_BUILD 448 449 # NOT Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NOT Windows 450 451 endif # PLATFORM 452 453 ifndef USE_SYSTEM_BDB 454 $(LIB_LOCATION)/$(BDB_NAME): $(BDB_IMPORT_PATH)/lib/$(LIBARCH)/$(BDB_NAME) 455 $(install-import-file) 456 @$(call binary_file_verification,$@) 457 458 $(GENNATIVESRCDIR)/bdb/db.h: $(BDB_IMPORT_PATH)/header/db.h 459 $(install-file) 460 endif 461 462 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_NAME) 463 $(install-import-file) 464 @$(call binary_file_verification,$@) 465 466 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 467 ifeq ($(ZIP_DEBUGINFO_FILES),1) 468 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME) 469 $(install-import-file) 470 else 471 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME) 472 $(install-import-file) 473 endif 474 endif 475 476 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME) 477 $(install-file) 478 @$(call binary_file_verification,$@) 479 480 $(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_ARCH_VM_SUBDIR)/$(LIBJSIG_NAME) 481 $(install-import-file) 482 @$(call binary_file_verification,$@) 483 484 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 485 ifeq ($(ZIP_DEBUGINFO_FILES),1) 486 $(LIB_LOCATION)/$(LIBJSIG_DIZ_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME) 487 $(install-import-file) 488 else 489 $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME) 490 $(install-import-file) 491 endif 492 endif 493 494 ifndef BUILD_CLIENT_ONLY 495 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \ 496 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME): 497 @$(prep-target) 498 $(call install-sym-link, ../$(LIBJSIG_NAME)) 499 500 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 501 # we don't create a symlink to a libjsig.diz file 502 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) \ 503 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): 504 @$(prep-target) 505 $(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME)) 506 endif 507 else 508 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME): 509 @$(prep-target) 510 $(call install-sym-link, ../$(LIBJSIG_NAME)) 511 512 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 513 # we don't create a symlink to a libjsig.diz file 514 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): 515 @$(prep-target) 516 $(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME)) 517 endif 518 endif 519 520 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME) 521 $(install-import-file) 522 @$(call binary_file_verification,$@) 523 524 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_NAME) 525 $(install-import-file) 526 @$(call binary_file_verification,$@) 527 528 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 529 ifeq ($(ZIP_DEBUGINFO_FILES),1) 530 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DIZ_NAME) 531 $(install-import-file) 532 533 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DIZ_NAME) 534 $(install-import-file) 535 else 536 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME) 537 $(install-import-file) 538 539 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME) 540 $(install-import-file) 541 endif 542 endif 543 544 ifndef BUILD_CLIENT_ONLY 545 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) 546 $(install-import-file) 547 @$(call binary_file_verification,$@) 548 549 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) 550 $(install-import-file) 551 @$(call binary_file_verification,$@) 552 553 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 554 ifeq ($(ZIP_DEBUGINFO_FILES),1) 555 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DIZ_NAME) 556 $(install-import-file) 557 558 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DIZ_NAME) 559 $(install-import-file) 560 else 561 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME) 562 $(install-import-file) 563 564 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME) 565 $(install-import-file) 566 endif 567 endif 568 endif 569 570 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) 571 $(install-import-file) 572 @$(call binary_file_verification,$@) 573 574 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_NAME) 575 $(install-import-file) 576 @$(call binary_file_verification,$@) 577 578 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 579 ifeq ($(ZIP_DEBUGINFO_FILES),1) 580 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DIZ_NAME) 581 $(install-import-file) 582 583 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DIZ_NAME) 584 $(install-import-file) 585 else 586 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME) 587 $(install-import-file) 588 589 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME) 590 $(install-import-file) 591 endif 592 endif 593 594 ifndef BUILD_CLIENT_ONLY 595 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME) 596 $(install-import-file) 597 @$(call binary_file_verification,$@) 598 599 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) 600 $(install-import-file) 601 @$(call binary_file_verification,$@) 602 603 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_NAME) 604 $(install-import-file) 605 @$(call binary_file_verification,$@) 606 607 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 608 ifeq ($(ZIP_DEBUGINFO_FILES),1) 609 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DIZ_NAME) 610 $(install-import-file) 611 612 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DIZ_NAME) 613 $(install-import-file) 614 615 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME) 616 $(install-import-file) 617 else 618 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME) 619 $(install-import-file) 620 621 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME) 622 $(install-import-file) 623 624 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME) 625 $(install-import-file) 626 endif 627 endif 628 629 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt 630 $(install-import-file) 631 endif 632 633 $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.txt 634 $(install-import-file) 635 636 $(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt : $(HOTSPOT_KERNEL_PATH)/Xusage.txt 637 $(install-file) 638 639 # 640 # Specific to non-OpenJDK building 641 # 642 ifndef OPENJDK 643 644 INTERNAL_IMPORT_LIST += \ 645 $(LIBDIR)/security/US_export_policy.jar \ 646 $(LIBDIR)/security/local_policy.jar \ 647 $(LIBDIR)/jce.jar 648 649 $(LIBDIR)/jce.jar: \ 650 $(BUILDDIR)/closed/tools/crypto/jce/jce.jar 651 $(install-non-module-file) 652 $(LIBDIR)/security/US_export_policy.jar: \ 653 $(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar 654 $(install-file) 655 $(LIBDIR)/security/local_policy.jar: \ 656 $(BUILDDIR)/closed/tools/crypto/jce/local_policy.jar 657 $(install-file) 658 659 endif # OPENJDK 660 661 ADDJSUM_JARFILE = $(BUILDTOOLJARDIR)/addjsum.jar 662 663 # Construct classlist file 664 $(LIBDIR)/classlist: \ 665 $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) \ 666 $(ADDJSUM_JARFILE) 667 @$(prep-target) 668 @$(RM) -f $@.temp 669 $(BOOT_JAVA_CMD) -jar $(ADDJSUM_JARFILE) \ 670 $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) $@.temp 671 $(MV) $@.temp $@ 672 673 # Import internal files (ones that are stashed in this source tree) 674 import_internal_files : $(INTERNAL_IMPORT_LIST) 675 676 # Import files from the JDK that we are not building 677 import_files: $(IMPORT_LIST) 678 679 # Get component information variables and rules 680 include $(BUILDDIR)/common/internal/ImportComponents.gmk 681 682 # Security files we need to import 683 SEC_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/sec-bin.zip 684 SEC_FILES_WIN_ZIP=$(ABS_BUILDDIR)/tools/crypto/sec-windows-bin.zip 685 JGSS_WIN32_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/jgss-windows-i586-bin.zip 686 JGSS_WIN64_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/jgss-windows-x64-bin.zip 687 688 # Unzip zip file $2 into directory $1 (if $2 exists) 689 # Warning: $2 must be absolute path not relative 690 define SecUnzipper 691 if [ -f $2 ] ; then \ 692 $(MKDIR) -p $1; \ 693 $(ECHO) "( $(CD) $1 && $(UNZIP) -o $2 )"; \ 694 ( $(CD) $1 && $(UNZIP) -o $2 ); \ 695 fi 696 endef 697 698 # If sec-bin exists, unpack it into the build directory 699 # Also, the library recompile build indirectly depends on two SSL classes, 700 # so copy those as well FIXUP 701 # if sec-windows-bin exists, unpack it into the build directory 702 # if JGSS files exists, unpack it into the build directory 703 $(TEMPDIR)/security_imported: 704 @$(prep-target) 705 @$(call SecUnzipper,$(OUTPUTDIR),$(SEC_FILES_ZIP)) 706 ifeq ($(PLATFORM), windows) 707 @$(call SecUnzipper,$(OUTPUTDIR),$(SEC_FILES_WIN_ZIP)) 708 endif 709 ifeq ($(PLATFORM), windows) 710 ifeq ($(ARCH_DATA_MODEL), 32) 711 @$(call SecUnzipper,$(OUTPUTDIR),$(JGSS_WIN32_FILES_ZIP)) 712 else 713 @$(call SecUnzipper,$(OUTPUTDIR),$(JGSS_WIN64_FILES_ZIP)) 714 endif 715 endif 716 @$(ECHO) "Imported on `$(DATE)`" > $@ 717 718 # Import all files from other components 719 $(TEMPDIR)/components_imported: 720 @$(prep-target) 721 $(call import-component-binaries,$(ABS_OUTPUTDIR)) 722 $(call import-component-sources,$(IMPORTSRCDIR)) 723 $(call import-component-docs,$(IMPORTDOCDIR)) 724 $(call import-component-classes,$(CLASSDESTDIR)) 725 @$(ECHO) "Imported on `$(DATE)`" > $@ 726 727 # Do pretty much everything 728 build : import_files \ 729 import_internal_files \ 730 $(TEMPDIR)/components_imported \ 731 $(TEMPDIR)/security_imported 732 733 # Clean up what we imported (except for component files) 734 clean clobber:: 735 $(RM) $(IMPORT_LIST) 736 $(RM) $(INTERNAL_IMPORT_LIST) 737 $(call import-component-sources-clean,$(IMPORTSRCDIR)) 738 $(call import-component-docs-clean,$(IMPORTDOCDIR)) 739 $(call import-component-classes-clean,$(CLASSDESTDIR)) 740 $(RM) $(TEMPDIR)/components_imported 741 $(RM) $(TEMPDIR)/security_imported 742 743 .PHONY: import_files import_internal_files 744