1 #
   2 # Copyright (c) 1997, 2011, 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 PRODUCT  = java
  39 include $(BUILDDIR)/common/Defs.gmk
  40 
  41 SERVER_LOCATION = server
  42 CLIENT_LOCATION = client
  43 
  44 DB_SUFFIX = _db
  45 DTRACE_SUFFIX = _dtrace
  46 
  47 ifeq ($(PLATFORM), windows)
  48   LIB_LOCATION = $(BINDIR)
  49 else ifeq ($(PLATFORM), macosx)
  50   LIB_LOCATION = $(LIBDIR)
  51 else
  52   LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
  53 endif
  54 
  55 JVM_NAME               = $(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX)
  56 JVMLIB_NAME            = $(LIB_PREFIX)jvm.$(LIB_SUFFIX)
  57 JVMMAP_NAME            = $(LIB_PREFIX)jvm.map
  58 JVMPDB_NAME            = $(LIB_PREFIX)jvm.pdb
  59 LIBJSIG_NAME           = $(LIB_PREFIX)jsig.$(LIBRARY_SUFFIX)
  60 JVMDB_NAME             = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX)
  61 JVMDTRACE_NAME         = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX)
  62 
  63 JVM_DEBUGINFO_NAME       = $(LIB_PREFIX)jvm.debuginfo
  64 LIBJSIG_DEBUGINFO_NAME   = $(LIB_PREFIX)jsig.debuginfo
  65 JVMDB_DEBUGINFO_NAME     = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
  66 JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
  67 
  68 CLASSSHARINGDATA_DIR   = $(BUILDDIR)/tools/sharing
  69 
  70 # Needed to do file copy
  71 ABS_BUILDDIR :=$(call FullPath,$(BUILDDIR))
  72 
  73 SUBDIRS_desktop = fonts
  74 SUBDIRS_tools   = sajdi
  75 include $(BUILDDIR)/common/Subdirs.gmk
  76 
  77 all clean clobber::
  78         $(SUBDIRS-loop)
  79 
  80 all:: build
  81 
  82 # List of files created here or coming from BUILDDIR area (this workspace)
  83 INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
  84 
  85 # List of files coming from outside this workspace
  86 ifndef BUILD_CLIENT_ONLY
  87   IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
  88                 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
  89   ifneq ($(OBJCOPY),)
  90     # the import JDK may not contain .debuginfo files
  91     ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),)
  92       IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME)
  93     endif
  94   endif
  95 else
  96   IMPORT_LIST =
  97 endif
  98 
  99 # Hotspot client is only available on 32-bit non-Zero builds
 100 ifneq ($(ZERO_BUILD), true)
 101 ifeq ($(ARCH_DATA_MODEL), 32)
 102   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \
 103                  $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt
 104   ifneq ($(OBJCOPY),)
 105     # the import JDK may not contain .debuginfo files
 106     ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),)
 107       IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME)
 108     endif
 109   endif
 110 endif
 111 endif
 112 
 113 ifeq ($(PLATFORM), windows)
 114 #  Windows     vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  Windows
 115 
 116 IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
 117 
 118 $(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
 119         $(install-import-file)
 120         $(call chmod-file, a+x)
 121 
 122 # Get the hotspot .map and .pdb files for client and server
 123 ifndef BUILD_CLIENT_ONLY
 124 IMPORT_LIST += \
 125         $(LIBDIR)/$(JVMLIB_NAME) \
 126         $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \
 127         $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME)
 128 endif
 129 
 130 # Add .map and .pdb files to the import path for client and kernel VMs. 
 131 # These are only available on 32-bit windows builds. 
 132 ifeq ($(ARCH_DATA_MODEL), 32)
 133   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME) \
 134                  $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME)
 135   ifeq ($(DO_KERNEL), true)
 136     IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME) \
 137                    $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME)
 138   endif
 139 endif
 140 
 141 $(LIBDIR)/$(JVMLIB_NAME): $(HOTSPOT_LIB_PATH)/$(JVMLIB_NAME)
 142         $(install-import-file)
 143 
 144 # it is OK for the .map and .pdb files to not exist, so do not force a 
 145 # dependency on them from the bootstrap location, and allow the copy to fail.
 146 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME):
 147         @$(prep-target)
 148         -$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMMAP_NAME)  $@
 149 
 150 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME):
 151         @$(prep-target)
 152         -$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMMAP_NAME)  $@
 153 
 154 ifndef BUILD_CLIENT_ONLY
 155 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME):
 156         @$(prep-target)
 157         -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@
 158 endif
 159 
 160 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME):
 161         @$(prep-target)
 162         -$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)  $@
 163 
 164 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME):
 165         @$(prep-target)
 166         -$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)  $@
 167 
 168 ifndef BUILD_CLIENT_ONLY
 169 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): 
 170         @$(prep-target)
 171         -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@
 172 endif
 173 
 174 #  Windows     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Windows
 175 else # PLATFORM
 176 #  NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  NOT Windows
 177 
 178 IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME) 
 179 ifneq ($(OBJCOPY),)
 180   # the import JDK may not contain .debuginfo files
 181   ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
 182     IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
 183   endif
 184 endif
 185 ifndef BUILD_CLIENT_ONLY
 186   IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
 187   ifneq ($(OBJCOPY),)
 188     # the import JDK may not contain the target of the symlink
 189     ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
 190       IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
 191     endif
 192   endif
 193 endif
 194 
 195 ifeq ($(PLATFORM), solaris)
 196   ifndef BUILD_CLIENT_ONLY
 197     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
 198     ifneq ($(OBJCOPY),)
 199       # the import JDK may not contain .debuginfo files
 200       ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
 201         IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
 202       endif
 203     endif
 204     # The conditional can be removed when import JDKs contain these files.
 205     ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),)
 206       IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME)
 207       ifneq ($(OBJCOPY),)
 208         # the import JDK may not contain .debuginfo files
 209         ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
 210           IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
 211         endif
 212       endif
 213     else
 214       $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!)
 215     endif 
 216   endif 
 217 endif
 218 
 219 ifneq ($(ZERO_BUILD), true)
 220 ifeq ($(ARCH_DATA_MODEL), 32)
 221 
 222 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME)
 223 ifneq ($(OBJCOPY),)
 224   # the import JDK may not contain the target of the symlink
 225   ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
 226     IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
 227   endif
 228 endif
 229 
 230 ifeq ($(PLATFORM), solaris)
 231 #  solaris   vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  solaris
 232 
 233 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
 234 ifneq ($(OBJCOPY),)
 235   # the import JDK may not contain .debuginfo files
 236   ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
 237     IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
 238   endif
 239 endif
 240 
 241 # The conditional can be removed when import JDKs contain these files.
 242 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)),)
 243   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME)
 244   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME)
 245   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME)
 246   ifneq ($(OBJCOPY),)
 247     # the import JDK may not contain .debuginfo files
 248     ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
 249       IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
 250       IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
 251       IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
 252   endif
 253   endif
 254 else
 255   $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!)
 256 endif
 257 
 258 ifndef BUILD_CLIENT_ONLY
 259   # The conditional can be removed when import JDKs contain these files.
 260   ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),)
 261     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
 262     ifneq ($(OBJCOPY),)
 263       # the import JDK may not contain .debuginfo files
 264       ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),)
 265         IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
 266       endif
 267     endif
 268   else
 269     $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!)
 270   endif
 271 
 272   # The conditional can be removed when import JDKs contain these files.
 273   ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),)
 274     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME)
 275     ifneq ($(OBJCOPY),)
 276       # the import JDK may not contain .debuginfo files
 277       ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),)
 278         IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
 279       endif
 280     endif
 281   else
 282     $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!)
 283  endif
 284 endif
 285 
 286 # For backwards compatability, make a link of the 32-bit client JVM to $(LIBDIR)
 287 IMPORT_LIST += $(LIB_LOCATION)/$(JVM_NAME)
 288 
 289 $(LIB_LOCATION)/$(JVM_NAME): $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME)
 290         @$(prep-target)
 291 
 292 #  solaris   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ solaris
 293 endif # 32bit solaris
 294 
 295 endif # 32bit
 296 
 297 endif # ZERO_BUILD
 298 
 299 #  NOT Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NOT Windows
 300 
 301 endif # PLATFORM
 302 
 303 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_NAME)
 304         $(install-import-file)
 305         @$(call binary_file_verification,$@)
 306 
 307 ifneq ($(OBJCOPY),)
 308 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)
 309         $(install-import-file)
 310 endif
 311 
 312 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME)
 313         $(install-file)
 314         @$(call binary_file_verification,$@)
 315 
 316 $(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_NAME)
 317         $(install-import-file)
 318         @$(call binary_file_verification,$@)
 319 
 320 ifneq ($(OBJCOPY),)
 321 $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)
 322         $(install-import-file)
 323 endif
 324 
 325 ifndef BUILD_CLIENT_ONLY
 326 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
 327 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
 328         @$(prep-target)
 329         $(call install-sym-link, ../$(LIBJSIG_NAME))
 330 
 331 ifneq ($(OBJCOPY),)
 332 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) \
 333 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
 334         @$(prep-target)
 335         $(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
 336 endif
 337 else
 338 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME):
 339         @$(prep-target)
 340         $(call install-sym-link, ../$(LIBJSIG_NAME))
 341 
 342 ifneq ($(OBJCOPY),)
 343 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
 344         @$(prep-target)
 345         $(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
 346 endif
 347 endif
 348 
 349 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
 350         $(install-import-file)
 351         @$(call binary_file_verification,$@)
 352 
 353 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_NAME)
 354         $(install-import-file)
 355         @$(call binary_file_verification,$@)
 356 
 357 ifneq ($(OBJCOPY),)
 358 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)
 359         $(install-import-file)
 360 
 361 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
 362         $(install-import-file)
 363 endif
 364 
 365 ifndef BUILD_CLIENT_ONLY
 366 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME)
 367         $(install-import-file)
 368         @$(call binary_file_verification,$@)
 369 
 370 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)
 371         $(install-import-file)
 372         @$(call binary_file_verification,$@)
 373 
 374 ifneq ($(OBJCOPY),)
 375 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)
 376         $(install-import-file)
 377 
 378 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
 379         $(install-import-file)
 380 endif
 381 endif
 382 
 383 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)
 384         $(install-import-file)
 385         @$(call binary_file_verification,$@)
 386 
 387 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_NAME)
 388         $(install-import-file)
 389         @$(call binary_file_verification,$@)
 390 
 391 ifneq ($(OBJCOPY),)
 392 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
 393         $(install-import-file)
 394 
 395 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
 396         $(install-import-file)
 397 endif
 398 
 399 ifndef BUILD_CLIENT_ONLY
 400 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)
 401         $(install-import-file)
 402         @$(call binary_file_verification,$@)
 403 
 404 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)
 405         $(install-import-file)
 406         @$(call binary_file_verification,$@)
 407 
 408 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_NAME)
 409         $(install-import-file)
 410         @$(call binary_file_verification,$@)
 411 
 412 ifneq ($(OBJCOPY),)
 413 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
 414         $(install-import-file)
 415 
 416 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
 417         $(install-import-file)
 418 
 419 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)
 420         $(install-import-file)
 421 endif
 422 
 423 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt
 424         $(install-import-file)
 425 endif
 426 
 427 $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.txt
 428         $(install-import-file)
 429 
 430 $(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt : $(HOTSPOT_KERNEL_PATH)/Xusage.txt
 431         $(install-file)
 432 
 433 #
 434 # Specific to non-OpenJDK building
 435 #
 436 ifndef OPENJDK
 437 
 438 INTERNAL_IMPORT_LIST += \
 439             $(LIBDIR)/security/US_export_policy.jar \
 440             $(LIBDIR)/security/local_policy.jar \
 441             $(LIBDIR)/jce.jar
 442 
 443 $(LIBDIR)/jce.jar: \
 444             $(BUILDDIR)/closed/tools/crypto/jce/jce.jar
 445         $(install-file)
 446 $(LIBDIR)/security/US_export_policy.jar: \
 447             $(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar
 448         $(install-file)
 449 $(LIBDIR)/security/local_policy.jar: \
 450             $(BUILDDIR)/closed/tools/crypto/jce/local_policy.jar
 451         $(install-file)
 452 
 453 endif # OPENJDK
 454 
 455 ADDJSUM_JARFILE = $(BUILDTOOLJARDIR)/addjsum.jar
 456 
 457 # Construct classlist file
 458 $(LIBDIR)/classlist: \
 459     $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) \
 460     $(ADDJSUM_JARFILE)
 461         @$(prep-target)
 462         @$(RM) -f $@.temp
 463         $(BOOT_JAVA_CMD) -jar $(ADDJSUM_JARFILE) \
 464             $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) $@.temp
 465         $(MV) $@.temp $@
 466 
 467 # Import internal files (ones that are stashed in this source tree)
 468 import_internal_files : $(INTERNAL_IMPORT_LIST)
 469 
 470 # Import files from the JDK that we are not building
 471 import_files: $(IMPORT_LIST)
 472 
 473 # Get component information variables and rules
 474 include $(BUILDDIR)/common/internal/ImportComponents.gmk
 475 
 476 # Security files we need to import
 477 SEC_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/sec-bin.zip
 478 SEC_FILES_WIN_ZIP=$(ABS_BUILDDIR)/tools/crypto/sec-windows-bin.zip
 479 JGSS_WIN32_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/jgss-windows-i586-bin.zip
 480 JGSS_WIN64_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/jgss-windows-x64-bin.zip
 481 
 482 # Unzip zip file $2 into directory $1 (if $2 exists)
 483 #   Warning: $2 must be absolute path not relative
 484 define SecUnzipper
 485 if [ -f $2 ] ; then \
 486   $(MKDIR) -p $1; \
 487   $(ECHO) "( $(CD) $1 && $(UNZIP) -o $2 )"; \
 488   ( $(CD) $1 && $(UNZIP) -o $2 ); \
 489 fi
 490 endef
 491 
 492 # If sec-bin exists, unpack it into the build directory
 493 #   Also, the library recompile build indirectly depends on two SSL classes,
 494 #   so copy those as well   FIXUP
 495 #   if sec-windows-bin exists, unpack it into the build directory
 496 #   if JGSS files exists, unpack it into the build directory
 497 $(TEMPDIR)/security_imported:
 498         @$(prep-target)
 499         @$(call SecUnzipper,$(OUTPUTDIR),$(SEC_FILES_ZIP))
 500 ifeq ($(PLATFORM), windows)
 501         @$(call SecUnzipper,$(OUTPUTDIR),$(SEC_FILES_WIN_ZIP))
 502 endif
 503 ifeq ($(PLATFORM), windows)
 504     ifeq ($(ARCH_DATA_MODEL), 32)
 505         @$(call SecUnzipper,$(OUTPUTDIR),$(JGSS_WIN32_FILES_ZIP))
 506     else
 507         @$(call SecUnzipper,$(OUTPUTDIR),$(JGSS_WIN64_FILES_ZIP))
 508     endif
 509 endif
 510         @$(ECHO) "Imported on `$(DATE)`" > $@
 511 
 512 # Import all files from other components
 513 $(TEMPDIR)/components_imported:
 514         @$(prep-target)
 515         $(call import-component-binaries,$(ABS_OUTPUTDIR))
 516         $(call import-component-sources,$(IMPORTSRCDIR))
 517         $(call import-component-docs,$(IMPORTDOCDIR))
 518         $(call import-component-classes,$(CLASSDESTDIR))
 519         @$(ECHO) "Imported on `$(DATE)`" > $@
 520 
 521 # Do pretty much everything
 522 build : import_files \
 523         import_internal_files \
 524         $(TEMPDIR)/components_imported \
 525         $(TEMPDIR)/security_imported
 526 
 527 # Clean up what we imported (except for component files)
 528 clean clobber::
 529         $(RM) $(IMPORT_LIST)
 530         $(RM) $(INTERNAL_IMPORT_LIST)
 531         $(call import-component-sources-clean,$(IMPORTSRCDIR))
 532         $(call import-component-docs-clean,$(IMPORTDOCDIR))
 533         $(call import-component-classes-clean,$(CLASSDESTDIR))
 534         $(RM) $(TEMPDIR)/components_imported
 535         $(RM) $(TEMPDIR)/security_imported
 536 
 537 .PHONY: import_files import_internal_files
 538