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