author | kshefov |
Tue, 25 Nov 2014 14:16:55 +0400 | |
changeset 27758 | dfba484228ed |
parent 26861 | 47dde7f5cf36 |
permissions | -rw-r--r-- |
25859 | 1 |
# |
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
2 |
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
25859 | 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 |
default: all |
|
27 |
||
28 |
include $(SPEC) |
|
29 |
include MakeBase.gmk |
|
30 |
include JavaCompilation.gmk |
|
31 |
||
32 |
||
33 |
################################################################################ |
|
34 |
||
35 |
US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar |
|
36 |
||
37 |
ifneq ($(BUILD_CRYPTO), no) |
|
38 |
||
39 |
US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \ |
|
40 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar |
|
41 |
US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \ |
|
42 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar |
|
43 |
||
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
44 |
ifndef OPENJDK |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
45 |
# |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
46 |
# In past releases, Oracle JDK has had a separately downloadable set of |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
47 |
# policy files which has been a nightmare for deployment. |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
48 |
# |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
49 |
# Now if we're closed and limited (default for Oracle JDK), create |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
50 |
# an "unlimited_policy" directory that contains the unlimited policy |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
51 |
# files. It will be up to the user/deployer to make an informed choice |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
52 |
# as to whether they are legally entitled to use the unlimited policy |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
53 |
# file in their environment. Users/deployers simply need to overwrite |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
54 |
# the files. Consult README.txt (below) for more info. |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
55 |
# |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
56 |
UNLIMITED_POLICY_DIR := $(JDK_OUTPUTDIR)/lib/security/unlimited_policy |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
57 |
endif |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
58 |
|
25859 | 59 |
# |
60 |
# TODO fix so that SetupArchive does not write files into SRCS |
|
61 |
# then we don't need this extra copying |
|
62 |
# |
|
63 |
# NOTE: We currently do not place restrictions on our limited export |
|
64 |
# policy. This was not a typo. This means we are shipping the same file |
|
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
65 |
# for both limited and unlimited US_export_policy.jar. Only the local |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
66 |
# policy file currently has restrictions. |
25859 | 67 |
# |
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
68 |
US_EXPORT_POLICY_JAR_SRC_DIR := \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
69 |
$(JDK_TOPDIR)/make/data/cryptopolicy/unlimited |
25859 | 70 |
US_EXPORT_POLICY_JAR_TMP := \ |
71 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp |
|
72 |
||
73 |
$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/% |
|
74 |
$(install-file) |
|
75 |
||
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
76 |
US_EXPORT_POLICY_JAR_DEPS := \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
77 |
$(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy |
25859 | 78 |
|
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
79 |
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
80 |
$(US_EXPORT_POLICY_JAR_DEPS), \ |
25859 | 81 |
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \ |
82 |
SUFFIXES := .policy, \ |
|
83 |
JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \ |
|
84 |
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \ |
|
85 |
SKIP_METAINF := true)) |
|
86 |
||
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
87 |
$(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
88 |
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
89 |
$(ECHO) $(LOG_INFO) \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
90 |
Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
91 |
$(install-file) |
25859 | 92 |
|
93 |
TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \ |
|
94 |
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) |
|
95 |
endif |
|
96 |
||
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
97 |
ifeq ($(UNLIMITED_CRYPTO), true) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
98 |
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) |
25859 | 99 |
$(install-file) |
100 |
else |
|
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
101 |
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) |
25859 | 102 |
$(install-file) |
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
103 |
endif |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
104 |
|
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
105 |
ifndef OPENJDK |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
106 |
ifneq ($(UNLIMITED_CRYPTO), true) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
107 |
$(UNLIMITED_POLICY_DIR)/US_export_policy.jar: \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
108 |
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
109 |
$(install-file) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
110 |
TARGETS += $(UNLIMITED_POLICY_DIR)/US_export_policy.jar |
25859 | 111 |
endif |
112 |
endif |
|
113 |
||
114 |
POLICY_JARS += $(US_EXPORT_POLICY_JAR_DST) |
|
115 |
||
116 |
################################################################################ |
|
117 |
||
118 |
LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar |
|
119 |
||
120 |
ifneq ($(BUILD_CRYPTO), no) |
|
121 |
||
122 |
LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \ |
|
123 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar |
|
124 |
LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \ |
|
125 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar |
|
126 |
||
127 |
# |
|
128 |
# TODO fix so that SetupArchive does not write files into SRCS |
|
129 |
# then we don't need this extra copying |
|
130 |
# |
|
131 |
LOCAL_POLICY_JAR_LIMITED_TMP := \ |
|
132 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp |
|
133 |
LOCAL_POLICY_JAR_UNLIMITED_TMP := \ |
|
134 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp |
|
135 |
||
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
136 |
$(LOCAL_POLICY_JAR_LIMITED_TMP)/%: \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
137 |
$(JDK_TOPDIR)/make/data/cryptopolicy/limited/% |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
138 |
$(install-file) |
25859 | 139 |
|
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
140 |
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
141 |
$(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/% |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
142 |
$(install-file) |
25859 | 143 |
|
144 |
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_LIMITED, \ |
|
145 |
$(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \ |
|
146 |
$(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \ |
|
147 |
SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \ |
|
148 |
SUFFIXES := .policy, \ |
|
149 |
JAR := $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED), \ |
|
150 |
EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \ |
|
151 |
SKIP_METAINF := true)) |
|
152 |
||
153 |
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_UNLIMITED, \ |
|
154 |
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \ |
|
155 |
SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \ |
|
156 |
SUFFIXES := .policy, \ |
|
157 |
JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \ |
|
158 |
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \ |
|
159 |
SKIP_METAINF := true)) |
|
160 |
||
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
161 |
TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
162 |
$(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED) |
25859 | 163 |
|
164 |
ifndef OPENJDK |
|
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
165 |
ifneq ($(UNLIMITED_CRYPTO), true) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
166 |
$(UNLIMITED_POLICY_DIR)/README.txt: \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
167 |
$(JDK_TOPDIR)/make/closed/data/cryptopolicy/README.txt |
25859 | 168 |
$(install-file) |
169 |
||
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
170 |
TARGETS += $(UNLIMITED_POLICY_DIR)/README.txt |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
171 |
endif |
25859 | 172 |
endif |
173 |
endif |
|
174 |
||
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
175 |
ifeq ($(UNLIMITED_CRYPTO), true) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
176 |
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
177 |
$(install-file) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
178 |
else |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
179 |
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) |
25859 | 180 |
$(install-file) |
26861
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
181 |
endif |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
182 |
|
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
183 |
ifndef OPENJDK |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
184 |
ifneq ($(UNLIMITED_CRYPTO), true) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
185 |
$(UNLIMITED_POLICY_DIR)/local_policy.jar: \ |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
186 |
$(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
187 |
$(install-file) |
47dde7f5cf36
8058845: Update JCE environment for build improvements
wetmore
parents:
25859
diff
changeset
|
188 |
TARGETS += $(UNLIMITED_POLICY_DIR)/local_policy.jar |
25859 | 189 |
endif |
190 |
endif |
|
191 |
||
192 |
POLICY_JARS += $(LOCAL_POLICY_JAR_DST) |
|
193 |
TARGETS += $(POLICY_JARS) |
|
194 |
||
195 |
################################################################################ |
|
196 |
||
197 |
all: $(TARGETS) |
|
198 |