CopyFiles.gmk 20.2 KB
Newer Older
1
#
G
guangyu.zgy 已提交
2
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

INCLUDEDIR = $(JDK_OUTPUTDIR)/include
27

28
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
29

30
ifeq ($(OPENJDK_TARGET_OS), windows)
31
  OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
32
else ifeq ($(OPENJDK_TARGET_OS), macosx)
33
  OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
34 35
endif

36 37 38
#
# Copy exported header files to outputdir.
#
39 40 41 42 43 44 45 46
H_TARGET_FILES = $(INCLUDEDIR)/jdwpTransport.h \
    $(INCLUDEDIR)/jni.h \
    $(INCLUDEDIR)/jvmti.h \
    $(INCLUDEDIR)/jvmticmlr.h \
    $(INCLUDEDIR)/classfile_constants.h \
    $(INCLUDEDIR)/jawt.h \
    $(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h \
    $(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
47 48

$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
49
	$(call install-file)
50

51
$(OPENJDK_TARGET_OS_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_EXPORT_DIR)/javavm/export/%.h
52
	$(call install-file)
53 54 55 56 57

COPY_FILES = $(H_TARGET_FILES)

##########################################################################################

58
  ifeq ($(OPENJDK_TARGET_OS), windows)
59
    COPY_FILES += $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCallbacks.h \
60 61 62 63
        $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.h \
        $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgePackages.h \
        $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.c \
        $(JDK_OUTPUTDIR)/lib/accessibility.properties
64 65

    $(OPENJDK_TARGET_OS_INCLUDE)/bridge/%: \
66
      $(JDK_TOPDIR)/src/windows/native/sun/bridge/%
67
		$(install-file)
68 69

    $(JDK_OUTPUTDIR)/lib/accessibility.properties: \
70
      $(JDK_TOPDIR)/src/windows/native/sun/bridge/accessibility.properties
71
		$(install-file)
72 73 74 75
endif

##########################################################################################

76 77 78 79 80 81 82 83
LIBDIR = $(JDK_OUTPUTDIR)/lib

MGMT_LIBDIR = $(LIBDIR)/management
MGMT_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/management
MGMT_SRC_FILES = $(wildcard $(MGMT_LIB_SRC)/*)
MGMT_TARGET_FILES = $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))

$(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
84
	$(call install-file)
85 86
	$(CHMOD) 644 $@

87 88
# this file has different permissions...don't know why...
$(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
89
	$(call install-file)
90 91
	$(CHMOD) 644 $@

92
$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
93
	$(call install-file)
94 95 96 97 98 99 100 101 102
	$(CHMOD) 444 $@

COPY_FILES += $(MGMT_TARGET_FILES)

##########################################################################################

LOGGING_LIB_SRC = $(JDK_TOPDIR)/src/share/lib

$(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
103
	$(call install-file)
104 105 106 107 108 109 110 111 112 113 114

COPY_FILES += $(LIBDIR)/logging.properties

##########################################################################################
#
# Copy property files from sun/print to LIBDIR
#
PSFONTPROPFILE_SRC_DIR = $(JDK_TOPDIR)/src/share/classes/sun/print
PSFONTPROPFILE_SRCS = $(wildcard $(PSFONTPROPFILE_SRC_DIR)/*.properties*)
PSFONTPROPFILE_TARGET_FILES = $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS))

115
$(LIBDIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
116
	$(call install-file)
117 118 119 120 121 122 123

COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES)

##########################################################################################
#
# Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
#
124
ifneq ($(OPENJDK_TARGET_OS), macosx)
125
  OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
126
else
127
  OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
128
endif
129

130
$(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
131
	$(call install-file)
132 133 134 135

COPY_FILES += $(LIBDIR)/flavormap.properties

CURSORS_DEST_DIR = $(LIBDIR)/images/cursors
136
CURSORS_OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib/images/cursors
137

138
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
139
	$(call install-file)
140 141 142 143

COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties

CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors
144
ifeq ($(OPENJDK_TARGET_OS), windows)
145
  CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
146
else # OPENJDK_TARGET_OS
147
  CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
148
endif # OPENJDK_TARGET_OS
149
CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
150

151
$(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
152
	$(call install-file)
153 154 155 156 157

COPY_FILES += $(CURSORS_TARGET_FILES)

##########################################################################################

158
CONTENT_TYPES_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
159 160

$(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
161
	$(call install-file)
162 163 164 165 166

COPY_FILES += $(LIBDIR)/content-types.properties

##########################################################################################

167 168 169
CALENDARS_SRC := $(JDK_TOPDIR)/src/share/lib

$(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
170
	$(call install-file)
171 172 173

COPY_FILES += $(LIBDIR)/calendars.properties

174 175 176 177 178 179 180
$(LIBDIR)/hijrah-config-umalqura.properties: $(CALENDARS_SRC)/hijrah-config-umalqura.properties
	$(MKDIR) -p $(@D)
	$(RM) $@
	$(CP) $< $@

COPY_FILES += $(LIBDIR)/hijrah-config-umalqura.properties

181 182
##########################################################################################

183
ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
184

185
  TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/lib
186

187
  $(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
188
	$(call install-file)
189

190
  COPY_FILES += $(LIBDIR)/tzmappings
191 192 193 194 195

endif

##########################################################################################

196 197 198
ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm

ifdef OPENJDK
199
  ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
S
sla 已提交
200
else
201
  ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
202 203
endif

204 205
ICCPROFILE_SRCS := $(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
ICCPROFILE_TARGET_FILES := $(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
206 207

$(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
208
	$(call install-file)
209 210 211 212 213 214
	$(CHMOD) 444 $@

COPY_FILES += $(ICCPROFILE_TARGET_FILES)

##########################################################################################

I
ihse 已提交
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
  # We need to bundle the freetype library, so it will be available at runtime as well as link time.
  #
  # NB: Default freetype build system uses -h linker option and
  # result .so contains hardcoded library name that is later
  # used for adding dependencies to other objects
  # (e.g. libfontmanager.so).
  #
  # It is not obvious how to extract that hardcoded name (libfreetype.so.6)
  # without overcomplicating logic here.
  # To workaround this we hardcode .6 suffix for now.
  #
  # Note that .so.6 library will not be found by System.loadLibrary()
  # but fortunately we need to load FreeType library explicitly
  # on windows only
  #
  #TODO: rework this to avoid hardcoding library name in the makefile
  #
233
  ifeq ($(OPENJDK_TARGET_OS), windows)
I
ihse 已提交
234
    FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
235
  else
I
ihse 已提交
236
    FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
237
  endif
238

I
ihse 已提交
239 240
  $(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
	$(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
241 242 243
        ifeq ($(OPENJDK_BUILD_OS), windows)
	  $(CHMOD) +rx $@
        endif
244

I
ihse 已提交
245
  COPY_FILES += $(FREETYPE_TARGET_LIB)
246 247 248 249
endif

##########################################################################################

250
# Copy the microsoft runtime libraries on windows
251
ifeq ($(OPENJDK_TARGET_OS), windows)
252

253
  # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
254 255
  define copy-and-chmod
	$(install-file)
256
	$(CHMOD) a+rx $@
257 258 259 260 261 262 263 264 265 266 267 268 269
  endef

  # Use separate macro calls in case the source files are not in the same
  # directory.
  $(eval $(call SetupCopyFiles,COPY_MSVCR, \
      DEST := $(JDK_OUTPUTDIR)/bin, \
      FILES := $(MSVCR_DLL), \
      MACRO := copy-and-chmod))

  $(eval $(call SetupCopyFiles,COPY_MSVCP, \
      DEST := $(JDK_OUTPUTDIR)/bin, \
      FILES := $(MSVCP_DLL), \
      MACRO := copy-and-chmod))
270

271
  COPY_FILES += $(COPY_MSVCR) $(COPY_MSVCP)
272 273 274 275 276 277 278 279 280

  ifneq ($(UCRT_DLL_DIR), )
    $(eval $(call SetupCopyFiles,COPY_UCRT_DLLS, \
        DEST := $(JDK_OUTPUTDIR)/bin, \
        FILES := $(wildcard $(UCRT_DLL_DIR)/*.dll), \
        MACRO := copy-and-chmod \
    ))
    COPY_FILES += $(COPY_UCRT_DLLS)
  endif
281 282 283
endif

##########################################################################################
284

285
HPROF_SRC = $(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
286

287
$(LIBDIR)/jvm.hprof.txt: $(HPROF_SRC)
288
	$(call install-file)
289 290 291 292 293 294 295 296 297

COPY_FILES += $(LIBDIR)/jvm.hprof.txt

##########################################################################################

#
# How to install jvm.cfg.
#
ifeq ($(JVM_VARIANT_ZERO), true)
298
  JVMCFG_ARCH := zero
299
else
300
  JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
301 302
endif

303
ifeq ($(OPENJDK_TARGET_OS), macosx)
304 305
  JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
else
306 307 308 309
  JVMCFG_BASE := $(OPENJDK_TARGET_OS_API_DIR)/bin/$(JVMCFG_ARCH)/jvm.cfg
  ALT_JVMCFG_SRC := $(JDK_TOPDIR)/src/closed/$(JVMCFG_BASE)
  # Use the ALT file if it exists
  JVMCFG_SRC := $(if $(wildcard $(ALT_JVMCFG_SRC)),$(ALT_JVMCFG_SRC),$(JDK_TOPDIR)/src/$(JVMCFG_BASE))
310
endif
311
JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
312 313
JVMCFG := $(JVMCFG_DIR)/jvm.cfg

314
# To do: should this also support -zeroshark?
315

316
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
317 318
  COPY_JVM_CFG_FILE := true
else
319 320 321 322 323 324 325 326
  # On 32-bit machines we have three potential VMs: client, server and minimal.
  # Historically we usually have both client and server and so that is what the
  # committed jvm.cfg expects (including platform specific ergonomics switches
  # to decide whether to use client or server by default). So when we have anything
  # other than client and server we need to define a new jvm.cfg file.
  # The main problem is deciding whether to use aliases for the VMs that are not
  # present and the current position is that we add aliases for client and server, but
  # not for minimal.
327
  CLIENT_AND_SERVER := $(and $(findstring true, $(JVM_VARIANT_SERVER)), $(findstring true, $(JVM_VARIANT_CLIENT)))
328
  ifeq ($(CLIENT_AND_SERVER), true)
329 330 331 332 333 334 335 336 337 338
    COPY_JVM_CFG_FILE := true
  else
    # For zero, the default jvm.cfg file is sufficient
    ifeq ($(JVM_VARIANT_ZERO), true)
      COPY_JVM_CFG_FILE := true
    endif
  endif
endif

ifeq ($(COPY_JVM_CFG_FILE), true)
339
  $(JVMCFG): $(JVMCFG_SRC)
340
	$(call install-file)
341
else
342
  $(JVMCFG):
343 344
	$(MKDIR) -p $(@D)
	$(RM) $(@)
345 346 347 348 349
        # Now check for other permutations
        ifeq ($(JVM_VARIANT_SERVER), true)
	  $(PRINTF) "-server KNOWN\n">>$(@)
	  $(PRINTF) "-client ALIASED_TO -server\n">>$(@)
          ifeq ($(JVM_VARIANT_MINIMAL1), true)
350
	    $(PRINTF) "-minimal KNOWN\n">>$(@)
351 352 353
          endif
        else
          ifeq ($(JVM_VARIANT_CLIENT), true)
354 355 356
	    $(PRINTF) "-client KNOWN\n">>$(@)
	    $(PRINTF) "-server ALIASED_TO -client\n">>$(@)
            ifeq ($(JVM_VARIANT_MINIMAL1), true)
357
	      $(PRINTF) "-minimal KNOWN\n">>$(@)
358
            endif
359
          else
360
            ifeq ($(JVM_VARIANT_MINIMAL1), true)
361 362 363
	      $(PRINTF) "-minimal KNOWN\n">>$(@)
	      $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
	      $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
364
            endif
365
          endif
366 367 368 369 370 371 372
        endif
endif

COPY_FILES += $(JVMCFG)

##########################################################################################

373
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-$(OPENJDK_TARGET_OS)
374 375
PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security

376 377 378 379 380
ifndef OPENJDK

RESTRICTED_PKGS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/restricted.pkgs
RESTRICTED_PKGS := $(shell $(CAT) $(RESTRICTED_PKGS_SRC) | $(TR) "\n" " ")

381 382
endif

383 384
$(PROPS_DST): $(PROPS_SRC)
	$(MKDIR) -p $(@D)
385 386 387 388 389 390 391 392 393
        ifndef OPENJDK
	  $(TOOL_ADDTORESTRICTEDPKGS) $^ $@.tmp $(RESTRICTED_PKGS)
        else
	  $(CP) $^ $@.tmp
        endif
        ifeq ($(UNLIMITED_CRYPTO), true)
	  $(TOOL_CRYPTOLEVEL) $@.tmp $@.tmp2 unlimited
	  $(MV) $@.tmp2 $@.tmp
        endif
394 395
	$(MV) $@.tmp $@

396 397 398 399 400 401 402 403
COPY_FILES += $(PROPS_DST)

##########################################################################################

POLICY_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.policy
POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy

$(POLICY_DST): $(POLICY_SRC)
404
	$(call install-file)
405 406 407 408 409 410 411 412 413

COPY_FILES += $(POLICY_DST)

##########################################################################################

CACERTS_SRC := $(CACERTS_FILE)
CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts

$(CACERTS_DST): $(CACERTS_SRC)
414
	$(call install-file)
415 416 417 418 419

COPY_FILES += $(CACERTS_DST)

##########################################################################################

420 421 422
BLACKLISTED_CERTS_SRC := $(JDK_TOPDIR)/src/share/lib/security/blacklisted.certs
BLACKLISTED_CERTS_DST := $(JDK_OUTPUTDIR)/lib/security/blacklisted.certs

423 424
ifndef OPENJDK

425 426
  BLACKLIST_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
  BLACKLIST_DST := $(JDK_OUTPUTDIR)/lib/security/blacklist
427

428
  BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/src/closed/share/lib/security/blacklisted.certs)
429

430 431
  TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
  TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
432

433
  $(BLACKLIST_DST): $(BLACKLIST_SRC)
434
	$(call install-file)
435

436
  COPY_FILES += $(BLACKLIST_DST)
437

438
  $(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
439
	$(call install-file)
440

441
  COPY_FILES += $(TRUSTEDLIBS_DST)
442 443 444

endif

445 446 447 448 449 450 451 452 453 454 455 456 457 458
$(BLACKLISTED_CERTS_DST): $(BLACKLISTED_CERTS_SRC)
	$(MKDIR) -p $(@D)
	$(CAT) $^ | $(SED) '/^$$/d' | $(SORT) | $(UNIQ) > $@.tmp
	$(GREP) -i Algorithm $@.tmp > $@
	if [ `$(SED) -n -e "$$=" $@` != 1 ]; then \
	   $(ECHO) "Different algorithms defined in $^"; \
	   $(RM) $@ $@.tmp; \
	   false; \
	fi
	$(GREP) -iv Algorithm $@.tmp >> $@
	$(RM) $@.tmp

COPY_FILES += $(BLACKLISTED_CERTS_DST)

459 460 461 462
##########################################################################################

ifndef OPENJDK

463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478
  SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts
  SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
  SHARED_FONTS_FILES := \
      LucidaTypewriterRegular.ttf \
      LucidaTypewriterBold.ttf \
      LucidaBrightRegular.ttf \
      LucidaBrightDemiBold.ttf \
      LucidaBrightItalic.ttf \
      LucidaBrightDemiItalic.ttf \
      LucidaSansRegular.ttf \
      LucidaSansDemiBold.ttf \

  SHARED_FONTS_SRC := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_SRC_DIR)/$(F))
  SHARED_FONTS_DST := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_DST_DIR)/$(F))

  $(SHARED_FONTS_DST_DIR)/%.ttf: $(SHARED_FONTS_SRC_DIR)/%.ttf
479
	$(call install-file)
480

481
  $(SHARED_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
482
	$(call install-file)
483

484
  COPY_FILES += $(SHARED_FONTS_DST)
485

486
  ifneq ($(OPENJDK_TARGET_OS), windows)
487
    COPY_FILES += $(SHARED_FONTS_DST_DIR)/fonts.dir
488
  endif
489

490
  ifeq ($(OPENJDK_TARGET_OS), linux)
491

492
  # The oblique fonts are only needed/wanted on Linux.
493

494 495 496 497
    OBL_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts/oblique
    OBL_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/oblique-fonts
    OBL_FONTS_FILES := LucidaTypewriterOblique.ttf LucidaTypewriterBoldOblique.ttf \
        LucidaSansOblique.ttf LucidaSansDemiOblique.ttf
498

499 500
    OBL_FONTS_SRC := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_SRC_DIR)/$(F))
    OBL_FONTS_DST := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_DST_DIR)/$(F))
501

502
    $(OBL_FONTS_DST_DIR)/%.ttf: $(OBL_FONTS_SRC_DIR)/%.ttf
503
	$(call install-file)
504

505
    $(OBL_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
506
	$(call install-file)
507

508
    COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
509

510
  endif # linux
511 512 513 514 515 516
endif # OPENJDK

##########################################################################################

ifndef OPENJDK

517 518 519
  #
  # Solaris X11 Direct Graphics Access library
  #
520

521 522 523 524 525 526
  _DGALIBS_sparc = \
      libxinerama.so \
      libjdgaSUNWcg6.so \
      libjdgaSUNWffb.so \
      libjdgaSUNWm64.so \
      libjdgaSUNWafb.so
527

528 529 530 531 532 533
  _DGALIBS_sparcv9 = \
      libxinerama.so \
      libjdgaSUNWcg6.so \
      libjdgaSUNWffb.so \
      libjdgaSUNWm64.so \
      libjdgaSUNWafb.so
534

535
  _DGALIBS_i586 = # no i586 library yet
536

537
  _DGALIBS_amd64 = # no amd64 library yet
538

539
  DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
540

541
  $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
542
	$(call install-file)
543
	$(CHMOD) 755 $@
544

545
  $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so
546
	$(call install-file)
547
	$(CHMOD) 755 $@
548

549
  $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
550 551
	$(MKDIR) -p $(@D)
	$(RM) $@
O
ohair 已提交
552
	$(LN) -s $(<F) $@
553

554
  COPY_FILES += $(DGALIBS)
555 556 557 558 559

endif

##########################################################################################

560
ifeq ($(OPENJDK_TARGET_OS), solaris)
561

562 563
  SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
  SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
564

565
  $(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
566
	$(call install-file)
567

568
  COPY_FILES += $(SUNPKCS11_CFG_DST)
569 570 571 572 573 574

endif

##########################################################################################

ifndef OPENJDK
575
  ifeq ($(OPENJDK_TARGET_OS), solaris)
576

577 578
    UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/ucrypto-solaris.cfg
    UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
579

580
    $(UCRYPTO_CFG_DST): $(UCRYPTO_CFG_SRC)
581
	$(call install-file)
582

583
    COPY_FILES += $(UCRYPTO_CFG_DST)
584

585
  endif
586 587 588 589
endif

##########################################################################################

590
$(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/share/lib/sound.properties
591
	$(call install-file)
592 593 594 595

COPY_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties

##########################################################################################
S
sla 已提交
596

597
ifeq ($(OPENJDK_TARGET_OS), linux)
G
guangyu.zgy 已提交
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625
# copy hotspot trace files

HOTSPOT_TRACE_SRC_DIR := $(TOPDIR)/hotspot/src/share/vm/trace
HOTSPOT_TRACE_DST_DIR := $(JDK_OUTPUTDIR)/classes/jdk/jfr/internal/types

COPY_FILES += $(HOTSPOT_TRACE_DST_DIR)/trace.dtd \
    $(HOTSPOT_TRACE_DST_DIR)/tracerelationdecls.xml \
    $(HOTSPOT_TRACE_DST_DIR)/trace.xml \
    $(HOTSPOT_TRACE_DST_DIR)/traceevents.xml \
    $(HOTSPOT_TRACE_DST_DIR)/tracetypes.xml

$(HOTSPOT_TRACE_DST_DIR)/%.xml: $(HOTSPOT_TRACE_SRC_DIR)/%.xml
	$(call install-file)

$(HOTSPOT_TRACE_DST_DIR)/trace.dtd: $(HOTSPOT_TRACE_SRC_DIR)/trace.dtd
	$(call install-file)

# copy jfr configuration files

JFR_CONFIGURATION_DIR_SRC := $(JDK_TOPDIR)/src/share/lib/jfr
JFR_CONFIGURATION_DIR_DST := $(JDK_OUTPUTDIR)/lib/jfr

COPY_FILES += $(JFR_CONFIGURATION_DIR_DST)/default.jfc \
    $(JFR_CONFIGURATION_DIR_DST)/profile.jfc

$(JFR_CONFIGURATION_DIR_DST)/%.jfc: $(JFR_CONFIGURATION_DIR_SRC)/%.jfc
	$(call install-file)

626
endif # linux
G
guangyu.zgy 已提交
627 628
##########################################################################################

629
-include $(CUSTOM_MAKE_DIR)/CopyFiles.gmk