make/copy/Copy-java.base.gmk
author serb
Fri, 02 Nov 2018 15:38:03 -0700
changeset 52538 6cf31480d3a3
parent 52065 dea8a62cdfc3
child 53683 48ff68e2fe5c
child 57145 ceaa243112bd
permissions -rw-r--r--
8207070: Webstart app popup on wrong screen in a one-screen setup changing to multi-monitor Reviewed-by: prr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     1
#
51730
cd0775f67ab0 8209167: Use CLDR's time zone mappings for Windows
naoto
parents: 51709
diff changeset
     2
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     4
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    10
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    15
# accompanied this code).
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    16
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    20
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    23
# questions.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    24
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    25
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    26
include CopyCommon.gmk
49537
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
    27
include Modules.gmk
48355
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
    28
include TextFileProcessing.gmk
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    29
47314
743814386712 8188814: Simplify IncludeCustomExtension
ihse
parents: 47253
diff changeset
    30
$(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    31
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    32
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    33
51730
cd0775f67ab0 8209167: Use CLDR's time zone mappings for Windows
naoto
parents: 51709
diff changeset
    34
ifeq ($(OPENJDK_TARGET_OS), aix)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    35
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    36
  TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    37
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
    38
  $(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    39
	$(call install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    40
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27286
diff changeset
    41
  TARGETS += $(LIB_DST_DIR)/tzmappings
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    42
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    43
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    44
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    45
################################################################################
28984
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    46
# Copy the microsoft runtime libraries on windows
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    47
ifeq ($(OPENJDK_TARGET_OS), windows)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    48
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    49
  # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
28984
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    50
  define copy-and-chmod
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    51
	$(install-file)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    52
	$(CHMOD) a+rx $@
28984
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    53
  endef
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27286
diff changeset
    54
28984
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    55
  # Use separate macro calls in case the source files are not in the same
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    56
  # directory.
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    57
  $(eval $(call SetupCopyFiles,COPY_MSVCR, \
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    58
      DEST := $(LIB_DST_DIR), \
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    59
      FILES := $(MSVCR_DLL), \
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    60
      MACRO := copy-and-chmod))
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    61
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    62
  $(eval $(call SetupCopyFiles,COPY_MSVCP, \
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    63
      DEST := $(LIB_DST_DIR), \
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    64
      FILES := $(MSVCP_DLL), \
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    65
      MACRO := copy-and-chmod))
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    66
12031ba2dc38 8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents: 27799
diff changeset
    67
  TARGETS += $(COPY_MSVCR) $(COPY_MSVCP)
50073
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    68
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    69
  ifneq ($(UCRT_DLL_DIR), )
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    70
    $(eval $(call SetupCopyFiles, COPY_UCRT_DLLS, \
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    71
        DEST := $(LIB_DST_DIR), \
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    72
        SRC := $(UCRT_DLL_DIR), \
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    73
        FILES := $(wildcard $(UCRT_DLL_DIR)/*.dll), \
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    74
        MACRO := copy-and-chmod, \
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    75
    ))
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    76
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    77
    TARGETS += $(COPY_UCRT_DLLS)
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 49537
diff changeset
    78
  endif
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    79
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    80
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    81
################################################################################
50129
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    82
# In jvm.cfg, the first listed KNOWN variant is the default. On most build
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    83
# configurations, that is the server variant.
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    84
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), windows-x86)
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    85
  DEFAULT_CFG_VARIANT ?= client
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    86
endif
50129
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    87
DEFAULT_CFG_VARIANT ?= server
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    88
50129
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    89
# Any variant other than server, client or minimal is represented as server in
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    90
# the cfg file.
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    91
VALID_CFG_VARIANTS := server client minimal
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    92
CFG_VARIANTS := $(filter $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)) \
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    93
    $(if $(filter-out $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)), server)
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    94
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    95
# Change the order to put the default variant first if present.
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    96
ORDERED_CFG_VARIANTS := \
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    97
    $(if $(filter $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS)), $(DEFAULT_CFG_VARIANT)) \
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    98
    $(filter-out $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS))
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
    99
42753
40f61533b93d 8066474: Remove the lib/ directory from Linux and Solaris images
erikj
parents: 41833
diff changeset
   100
JVMCFG := $(LIB_DST_DIR)/jvm.cfg
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   101
50129
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   102
define print-cfg-line
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   103
	$(call LogInfo, Adding -$1 $2 to jvm.cfg)
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   104
	$(PRINTF) -- "-$1 $2\n" >> $@ $(NEWLINE)
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   105
endef
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   106
50129
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   107
$(JVMCFG): $(call DependOnVariable, ORDERED_CFG_VARIANTS)
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   108
	$(call MakeTargetDir)
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   109
	$(RM) $@
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   110
	$(foreach v, $(ORDERED_CFG_VARIANTS), \
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   111
	  $(call print-cfg-line,$v,KNOWN) \
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   112
	)
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   113
        # If either of server or client aren't present, add IGNORE lines for
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   114
        # them.
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   115
	$(foreach v, server client, \
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   116
	  $(if $(filter $v, $(ORDERED_CFG_VARIANTS)), , \
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   117
	    $(call print-cfg-line,$v,IGNORE) \
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   118
	  ) \
7db531b83661 8202920: jvm.cfg generation incorrect
erikj
parents: 50084
diff changeset
   119
	)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   120
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27286
diff changeset
   121
TARGETS += $(JVMCFG)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   122
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   123
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   124
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   125
POLICY_SRC := $(TOPDIR)/src/java.base/share/conf/security/java.policy
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27286
diff changeset
   126
POLICY_DST := $(CONF_DST_DIR)/security/java.policy
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   127
39884
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   128
POLICY_SRC_LIST := $(POLICY_SRC)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   129
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   130
$(POLICY_DST): $(POLICY_SRC_LIST)
52065
dea8a62cdfc3 8211724: Change mkdir -p to MakeDir macro where possible
erikj
parents: 51730
diff changeset
   131
	$(call MakeTargetDir)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   132
	$(RM) $@ $@.tmp
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   133
	$(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   134
	$(MV) $@.tmp $@
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   135
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27286
diff changeset
   136
TARGETS += $(POLICY_DST)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   137
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   138
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   139
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   140
DEF_POLICY_SRC := $(TOPDIR)/src/java.base/share/lib/security/default.policy
39884
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   141
DEF_POLICY_DST := $(LIB_DST_DIR)/security/default.policy
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   142
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   143
DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC)
42230
8b75662a3762 8170242: jdk.desktop needs package access to sun.awt.
prr
parents: 41833
diff changeset
   144
DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST)
39884
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   145
40401
47a0de15f8b6 8164071: Default.policy file missing content for solaris
mullan
parents: 40253
diff changeset
   146
ifneq ($(filter $(OPENJDK_TARGET_OS), windows solaris), )
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   147
  DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
39884
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   148
endif
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   149
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   150
# Allow imported modules to modify the java.policy
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   151
ifneq ($(IMPORT_MODULES_CONF), )
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   152
  DEF_POLICY_SRC_LIST += $(wildcard $(IMPORT_MODULES_CONF)/java.base/security/java.policy.extra)
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   153
endif
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   154
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   155
$(DEF_POLICY_DST): $(DEF_POLICY_SRC_LIST)
52065
dea8a62cdfc3 8211724: Change mkdir -p to MakeDir macro where possible
erikj
parents: 51730
diff changeset
   156
	$(call MakeTargetDir)
39884
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   157
	$(RM) $@ $@.tmp
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   158
	$(foreach f,$(DEF_POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   159
	$(MV) $@.tmp $@
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   160
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   161
TARGETS += $(DEF_POLICY_DST)
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   162
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   163
################################################################################
9a543219d0bb 8159752: Grant de-privileged module permissions by default with java.security.policy override option
mullan
parents: 37525
diff changeset
   164
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   165
ifeq ($(CACERTS_FILE), )
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   166
  CACERTS_FILE := $(TOPDIR)/src/java.base/share/lib/security/cacerts
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   167
endif
35241
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 29887
diff changeset
   168
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27286
diff changeset
   169
CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   170
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   171
$(CACERTS_DST): $(CACERTS_FILE)
47253
92fd0e04e0e1 8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents: 47217
diff changeset
   172
	$(call LogInfo, Copying $(patsubst $(OUTPUTDIR)/%, %, $@))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   173
	$(call install-file)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   174
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27286
diff changeset
   175
TARGETS += $(CACERTS_DST)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   176
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   177
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   178
35241
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 29887
diff changeset
   179
$(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   180
    FILES := $(TOPDIR)/src/java.base/share/conf/net.properties, \
35241
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 29887
diff changeset
   181
    DEST := $(CONF_DST_DIR), \
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 29887
diff changeset
   182
))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   183
35241
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 29887
diff changeset
   184
TARGETS += $(COPY_NET_PROPERTIES)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   185
51709
a15a61e954c0 8059019: sdp.conf.template should be copied on linux too
ihse
parents: 50129
diff changeset
   186
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux), )
35241
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 29887
diff changeset
   187
  $(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   188
      FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
35241
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 29887
diff changeset
   189
      DEST := $(CONF_DST_DIR)/sdp, \
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 29887
diff changeset
   190
  ))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   191
35241
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 29887
diff changeset
   192
  TARGETS += $(COPY_SDP_CONF)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   193
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   194
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   195
################################################################################
42670
d833113eb7d7 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42230
diff changeset
   196
d833113eb7d7 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42230
diff changeset
   197
# JDK license and assembly exception files to be packaged in JMOD
d833113eb7d7 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42230
diff changeset
   198
44264
8ff59e9e832c 8176849: jdk9 BCL builds fail after cleaning up temporary file ASSEMBLY_EXCEPTION
erikj
parents: 44117
diff changeset
   199
# The license files may not be present if the source has been obtained using a
8ff59e9e832c 8176849: jdk9 BCL builds fail after cleaning up temporary file ASSEMBLY_EXCEPTION
erikj
parents: 44117
diff changeset
   200
# different license.
8ff59e9e832c 8176849: jdk9 BCL builds fail after cleaning up temporary file ASSEMBLY_EXCEPTION
erikj
parents: 44117
diff changeset
   201
JDK_LICENSE ?= $(wildcard $(TOPDIR)/LICENSE)
8ff59e9e832c 8176849: jdk9 BCL builds fail after cleaning up temporary file ASSEMBLY_EXCEPTION
erikj
parents: 44117
diff changeset
   202
JDK_NOTICE  ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION)
48338
a3c7d963c952 8193208: Add additional licensing file for the JDK
erikj
parents: 48300
diff changeset
   203
JDK_ADDITIONAL_LICENSE_INFO  ?= $(wildcard $(TOPDIR)/ADDITIONAL_LICENSE_INFO)
42670
d833113eb7d7 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42230
diff changeset
   204
d833113eb7d7 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42230
diff changeset
   205
$(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \
48338
a3c7d963c952 8193208: Add additional licensing file for the JDK
erikj
parents: 48300
diff changeset
   206
    FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \
49537
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   207
    DEST := $(COMMON_LEGAL_DST_DIR), \
42670
d833113eb7d7 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42230
diff changeset
   208
    FLATTEN := true, \
d833113eb7d7 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42230
diff changeset
   209
))
d833113eb7d7 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42230
diff changeset
   210
d833113eb7d7 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42230
diff changeset
   211
TARGETS += $(COPY_JDK_NOTICES)
47355
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   212
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   213
################################################################################
49537
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   214
#
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   215
# Copy and filter the legal files depending on what 3rd party components are
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   216
# bundled or linked from the OS.
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   217
#
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   218
ifeq ($(USE_EXTERNAL_LIBZ), true)
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   219
  LEGAL_EXCLUDES += zlib.md
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   220
endif
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   221
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   222
$(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   223
    EXCLUDES := $(LEGAL_EXCLUDES), \
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   224
))
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   225
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   226
TARGETS += $(COPY_LEGAL)
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   227
149dc554808c 8199539: Provide a standard way for the build to filter un-needed legal .md files
erikj
parents: 48355
diff changeset
   228
################################################################################
47355
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   229
# Optionally copy libffi.so.? into the the image
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   230
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   231
ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   232
  $(eval $(call SetupCopyFiles, COPY_LIBFFI, \
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   233
      FILES := $(LIBFFI_LIB_FILE), \
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   234
      DEST := $(call FindLibDirForModule, $(MODULE)), \
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   235
      FLATTEN := true, \
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   236
      MACRO := install-file-nolink, \
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   237
  ))
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   238
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   239
  TARGETS += $(COPY_LIBFFI)
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   240
endif
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   241
8cf060fad8a8 8189430: make/hotspot/copy/Copy-java.base.gmk in wrong location after consolidation
erikj
parents: 47314
diff changeset
   242
################################################################################
48355
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   243
# Generate classfile_constants.h
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   244
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   245
$(eval $(call SetupTextFileProcessing, CREATE_CLASSFILE_CONSTANTS_H, \
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   246
    SOURCE_FILES := $(TOPDIR)/src/java.base/share/native/include/classfile_constants.h.template, \
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   247
    OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/modules_include/java.base/classfile_constants.h, \
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   248
    REPLACEMENTS := \
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   249
        @@VERSION_CLASSFILE_MAJOR@@ => $(VERSION_CLASSFILE_MAJOR) ; \
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   250
        @@VERSION_CLASSFILE_MINOR@@ => $(VERSION_CLASSFILE_MINOR) ; , \
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   251
))
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   252
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   253
TARGETS += $(CREATE_CLASSFILE_CONSTANTS_H)
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   254
4944950606ef 8191913: Bump classfile version number to 55
psandoz
parents: 48338
diff changeset
   255
################################################################################