jdk/make/java/redist/Makefile
changeset 4665 d14dc3d9e1fa
parent 4340 ec6ba551fa78
child 4917 c98da2209f8c
equal deleted inserted replaced
4664:0b0443cbc448 4665:d14dc3d9e1fa
    33 #
    33 #
    34 # INTERNAL_IMPORT_LIST is the list of destination files from BUILDDIR.
    34 # INTERNAL_IMPORT_LIST is the list of destination files from BUILDDIR.
    35 # 
    35 # 
    36 
    36 
    37 BUILDDIR = ../..
    37 BUILDDIR = ../..
       
    38 MODULE   = base
    38 PRODUCT  = java
    39 PRODUCT  = java
    39 include $(BUILDDIR)/common/Defs.gmk
    40 include $(BUILDDIR)/common/Defs.gmk
    40 
    41 
    41 SERVER_LOCATION = server
    42 SERVER_LOCATION = server
    42 CLIENT_LOCATION = client
    43 CLIENT_LOCATION = client
    59 CLASSSHARINGDATA_DIR   = $(BUILDDIR)/tools/sharing
    60 CLASSSHARINGDATA_DIR   = $(BUILDDIR)/tools/sharing
    60 
    61 
    61 # Needed to do file copy
    62 # Needed to do file copy
    62 ABS_BUILDDIR :=$(call FullPath,$(BUILDDIR))
    63 ABS_BUILDDIR :=$(call FullPath,$(BUILDDIR))
    63 
    64 
    64 all: build
    65 SUBDIRS = fonts sajdi
       
    66 all clean clobber::
       
    67 	$(SUBDIRS-loop)
       
    68 
       
    69 all:: build
    65 
    70 
    66 # List of files created here or coming from BUILDDIR area (this workspace)
    71 # List of files created here or coming from BUILDDIR area (this workspace)
    67 INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
    72 INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
    68 
    73 
    69 # List of files coming from outside this workspace
    74 # List of files coming from outside this workspace
    70 IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
    75 IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
    71               $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
    76               $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
    72 
       
    73 # INCLUDE_SA is false on platforms where SA is not supported.
       
    74 # On platforms where it is supported, we want to allow it to
       
    75 # not be present, at least temporarily.  So,
       
    76 # if the SA files (well, just sa-jdi.jar) do not exist 
       
    77 # in the HOTSPOT_IMPORT_PATH, then we won't build SA.
       
    78 SA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
       
    79                           $(ECHO) true; \
       
    80                         else \
       
    81                           $(ECHO) false; \
       
    82                         fi)
       
    83 
       
    84 ifeq ($(SA_EXISTS), false)
       
    85   INCLUDE_SA := false
       
    86 endif
       
    87 
       
    88 ifeq ($(INCLUDE_SA), true)
       
    89   IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
       
    90                  $(LIB_LOCATION)/$(SALIB_NAME)
       
    91   ifeq ($(PLATFORM), windows)
       
    92     IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
       
    93                    $(LIB_LOCATION)/$(SAPDB_NAME)
       
    94   endif
       
    95 endif # INCLUDE_SA
       
    96 
    77 
    97 # Hotspot client is only available on 32-bit non-Zero builds
    78 # Hotspot client is only available on 32-bit non-Zero builds
    98 ifneq ($(ZERO_BUILD), true)
    79 ifneq ($(ZERO_BUILD), true)
    99 ifeq ($(ARCH_DATA_MODEL), 32)
    80 ifeq ($(ARCH_DATA_MODEL), 32)
   100   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \
    81   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \
   108 IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
    89 IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
   109 
    90 
   110 # NOTE: These might actually come from BUILDDIR, depends on the settings.
    91 # NOTE: These might actually come from BUILDDIR, depends on the settings.
   111 $(BINDIR)/msvcrt.dll: $(MSVCRT_DLL_PATH)/msvcrt.dll
    92 $(BINDIR)/msvcrt.dll: $(MSVCRT_DLL_PATH)/msvcrt.dll
   112 	$(install-import-file)
    93 	$(install-import-file)
   113 	$(CHMOD) a+x $@
    94 	$(call chmod-file, a+x)
   114 $(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
    95 $(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
   115 	$(install-import-file)
    96 	$(install-import-file)
   116 	$(CHMOD) a+x $@
    97 	$(call chmod-file, a+x)
   117 
    98 
   118 # Get the hotspot .map and .pdb files for client and server
    99 # Get the hotspot .map and .pdb files for client and server
   119 IMPORT_LIST += \
   100 IMPORT_LIST += \
   120 	$(LIBDIR)/$(JVMLIB_NAME) \
   101 	$(LIBDIR)/$(JVMLIB_NAME) \
   121 	$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \
   102 	$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \
   138 # it is OK for the .map and .pdb files to not exist, so do not force a 
   119 # it is OK for the .map and .pdb files to not exist, so do not force a 
   139 # dependency on them from the bootstrap location, and allow the copy to fail.
   120 # dependency on them from the bootstrap location, and allow the copy to fail.
   140 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME):
   121 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME):
   141 	@$(prep-target)
   122 	@$(prep-target)
   142 	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMMAP_NAME)  $@
   123 	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMMAP_NAME)  $@
       
   124 	@$(install-module-file)
   143 
   125 
   144 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME):
   126 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME):
   145 	@$(prep-target)
   127 	@$(prep-target)
   146 	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMMAP_NAME)  $@
   128 	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMMAP_NAME)  $@
       
   129 	@$(install-module-file)
   147 
   130 
   148 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME):
   131 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME):
   149 	@$(prep-target)
   132 	@$(prep-target)
   150 	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@
   133 	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@
       
   134 	@$(install-module-file)
   151 
   135 
   152 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME):
   136 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME):
   153 	@$(prep-target)
   137 	@$(prep-target)
   154 	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)  $@
   138 	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)  $@
       
   139 	@$(install-module-file)
   155 
   140 
   156 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME):
   141 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME):
   157 	@$(prep-target)
   142 	@$(prep-target)
   158 	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)  $@
   143 	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)  $@
       
   144 	@$(install-module-file)
   159 
   145 
   160 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): 
   146 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): 
   161 	@$(prep-target)
   147 	@$(prep-target)
   162 	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@
   148 	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@
       
   149 	@$(install-module-file)
   163 
   150 
   164 #  Windows     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Windows
   151 #  Windows     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Windows
   165 else # PLATFORM
   152 else # PLATFORM
   166 #  NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  NOT Windows
   153 #  NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  NOT Windows
   167 
   154 
   218 	$(install-import-file)
   205 	$(install-import-file)
   219 
   206 
   220 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
   207 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
   221 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
   208 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
   222 	@$(prep-target)
   209 	@$(prep-target)
   223 	$(LN) -s ../$(LIBJSIG_NAME) $@
   210 	$(call install-sym-link, ../$(LIBJSIG_NAME))
   224 
   211 
   225 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
   212 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
   226 	$(install-import-file)
   213 	$(install-import-file)
   227 
   214 
   228 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_NAME)
   215 $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_NAME)
   243 $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.txt
   230 $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.txt
   244 	$(install-import-file)
   231 	$(install-import-file)
   245 
   232 
   246 $(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt : $(HOTSPOT_KERNEL_PATH)/Xusage.txt
   233 $(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt : $(HOTSPOT_KERNEL_PATH)/Xusage.txt
   247 	$(install-file)
   234 	$(install-file)
   248 
       
   249 ifeq ($(INCLUDE_SA), true)
       
   250 # The Serviceability Agent is built in the Hotspot workspace.
       
   251 # It contains two files:
       
   252 #  - sa-jdi.jar:  This goes into the same dir as tools.jar.
       
   253 #  - a shared library:  sawindbg.dll on windows / libproc.sa on unix
       
   254 #		        This goes into the same dir as the other
       
   255 #			shared libs, eg. libjdwp.so.
       
   256 $(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
       
   257 	$(install-import-file)
       
   258 
       
   259 $(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
       
   260 	$(install-import-file)
       
   261 
       
   262 ifeq ($(PLATFORM), windows)
       
   263 $(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
       
   264 	$(install-import-file)
       
   265 
       
   266 $(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
       
   267 	$(install-import-file)
       
   268 endif # windows
       
   269 endif # INCLUDE_SA
       
   270 
   235 
   271 #
   236 #
   272 # Specific to OpenJDK building
   237 # Specific to OpenJDK building
   273 #
   238 #
   274 ifdef OPENJDK
   239 ifdef OPENJDK
   286             $(LIBDIR)/security/local_policy.jar \
   251             $(LIBDIR)/security/local_policy.jar \
   287             $(LIBDIR)/jce.jar
   252             $(LIBDIR)/jce.jar
   288 
   253 
   289 $(LIBDIR)/jce.jar: \
   254 $(LIBDIR)/jce.jar: \
   290 	    $(BUILDDIR)/closed/tools/crypto/jce/jce.jar
   255 	    $(BUILDDIR)/closed/tools/crypto/jce/jce.jar
   291 	$(install-file)
   256 	$(install-non-module-file)
   292 $(LIBDIR)/security/US_export_policy.jar: \
   257 $(LIBDIR)/security/US_export_policy.jar: \
   293 	    $(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar
   258 	    $(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar
   294 	$(install-file)
   259 	$(install-file)
   295 $(LIBDIR)/security/local_policy.jar: \
   260 $(LIBDIR)/security/local_policy.jar: \
   296 	    $(BUILDDIR)/closed/tools/crypto/jce/local_policy.jar
   261 	    $(BUILDDIR)/closed/tools/crypto/jce/local_policy.jar
   307 	@$(prep-target)
   272 	@$(prep-target)
   308 	@$(RM) -f $@.temp
   273 	@$(RM) -f $@.temp
   309 	$(BOOT_JAVA_CMD) -jar $(ADDJSUM_JARFILE) \
   274 	$(BOOT_JAVA_CMD) -jar $(ADDJSUM_JARFILE) \
   310 	    $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) $@.temp
   275 	    $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) $@.temp
   311 	$(MV) $@.temp $@
   276 	$(MV) $@.temp $@
   312 
       
   313 ifndef OPENJDK
       
   314 
       
   315 # Lucida font files are not included in the OpenJDK distribution.
       
   316 # Get names of font files
       
   317 include FILES.gmk
       
   318 
       
   319 # Copy font files into OUTPUTDIR area
       
   320 
       
   321 FONTFILES = $(SHARED_FONTFILES)
       
   322 FONTSDIR  = $(LIBDIR)/fonts
       
   323 FONTSDIRFILE  = $(FONTSDIR)/fonts.dir
       
   324 INTERNAL_IMPORT_LIST += $(FONTFILES) 
       
   325 
       
   326 ifneq ($(PLATFORM), windows)
       
   327   INTERNAL_IMPORT_LIST += $(FONTSDIRFILE)
       
   328 endif
       
   329 
       
   330 $(LIBDIR)/fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/%.ttf
       
   331 	$(install-file)
       
   332 
       
   333 $(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
       
   334 	$(install-file)
       
   335 
       
   336 ifeq ($(PLATFORM), linux)
       
   337 
       
   338 # The oblique fonts are only needed/wanted on Linux.
       
   339 
       
   340 OBLFONTSDIR  = $(LIBDIR)/oblique-fonts
       
   341 OBLFONTSDIRFILE	 = $(OBLFONTSDIR)/fonts.dir
       
   342 INTERNAL_IMPORT_LIST += $(OBLIQUE_FONTFILES) $(OBLFONTSDIRFILE)
       
   343 
       
   344 $(LIBDIR)/oblique-fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/oblique/%.ttf
       
   345 	$(install-file)
       
   346 
       
   347 $(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
       
   348 	$(install-file)
       
   349 
       
   350 endif # linux
       
   351 endif # !OPENJDK
       
   352 
   277 
   353 # Import internal files (ones that are stashed in this source tree)
   278 # Import internal files (ones that are stashed in this source tree)
   354 import_internal_files : $(INTERNAL_IMPORT_LIST)
   279 import_internal_files : $(INTERNAL_IMPORT_LIST)
   355 
   280 
   356 # Import files from the JDK that we are not building
   281 # Import files from the JDK that we are not building