author | katleman |
Thu, 16 Feb 2012 13:01:33 -0800 | |
changeset 11857 | fb2fa6f6c9df |
parent 10336 | 0bb1999251f8 |
child 14006 | f3680f57ce55 |
permissions | -rw-r--r-- |
2 | 1 |
# |
9035
1255eb81cc2f
7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents:
8583
diff
changeset
|
2 |
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
# |
|
5506 | 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. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Makefile for building jce.jar and the various cryptographic strength |
|
28 |
# policy jar files. |
|
29 |
# |
|
30 |
||
31 |
# |
|
32 |
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds |
|
33 |
# respectively.) |
|
34 |
# |
|
35 |
# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE |
|
36 |
# jar files do not require signing, but those for JDK do. If an unsigned |
|
37 |
# jar file is installed into JDK, things will break when the crypto |
|
38 |
# routines are called. |
|
39 |
# |
|
40 |
# This Makefile does the "real" build of the JCE files. There are some |
|
41 |
# javac options currently specific to JCE, so we recompile now to make |
|
42 |
# sure any implicit compilations didn't use any incorrect flags. |
|
43 |
# |
|
44 |
# For OpenJDK, the jar files built here are installed directly into the |
|
45 |
# OpenJDK. |
|
46 |
# |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
47 |
# For JDK, the binaries use pre-built/pre-signed binary files stored in |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
48 |
# the closed workspace that are not shipped in the OpenJDK workspaces. |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
49 |
# We still build the JDK files here to verify the files compile, and in |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
50 |
# preparation for possible signing. Developers working on JCE in JDK |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
51 |
# must sign the JCE files before testing. The JCE signing key is kept |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
52 |
# separate from the JDK workspace to prevent its disclosure. |
2 | 53 |
# |
54 |
# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
55 |
# be built and signed, and the resulting jar files *MUST BE CHECKED INTO |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
56 |
# THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT BE |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
57 |
# FORGOTTEN*, otherwise a bug fixed in the source code will not be |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
58 |
# reflected in the shipped binaries. The "release" target should be |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
59 |
# used to generate the required files. |
2 | 60 |
# |
61 |
# There are a number of targets to help both JDK/OpenJDK developers. |
|
62 |
# |
|
63 |
# Main Targets (JDK/OPENJDK): |
|
64 |
# |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
65 |
# all/clobber/clean The usual. |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
66 |
# If OpenJDK: builds/installs the |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
67 |
# jce.jar/limited policy files. |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
68 |
# If JDK: builds but does not install. |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
69 |
# During full tops-down builds, |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
70 |
# prebuilt/presigned jce.jar & |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
71 |
# limited policy files are copied |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
72 |
# in by make/java/redist/Makefile. |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
73 |
# If you are working in this directory |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
74 |
# and want to install the prebuilts, |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
75 |
# use the "install-prebuilt" target. |
2 | 76 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
77 |
# jar Builds/installs jce.jar |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
78 |
# If OpenJDK, does not sign |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
79 |
# If JDK, tries to sign |
2 | 80 |
# |
81 |
# Other lesser-used Targets (JDK/OPENJDK): |
|
82 |
# |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
83 |
# build-jar Builds jce.jar (does not sign/install) |
2 | 84 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
85 |
# build-policy Builds policy files (does not sign/install) |
2 | 86 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
87 |
# install-jar Alias for "jar" above |
2 | 88 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
89 |
# install-limited Builds/installs limited policy files |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
90 |
# If OpenJDK, does not sign |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
91 |
# If JDK, tries to sign |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
92 |
# install-unlimited Builds/nstalls unlimited policy files |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
93 |
# If OpenJDK, does not sign |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
94 |
# If JDK, tries to sign |
2 | 95 |
# |
96 |
# Other targets (JDK only): |
|
97 |
# |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
98 |
# sign Alias for sign-jar and sign-policy |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
99 |
# sign-jar Builds/signs jce.jar file (no install) |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
100 |
# sign-policy Builds/signs policy files (no install) |
2 | 101 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
102 |
# release Builds all targets in preparation |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
103 |
# for workspace integration. |
2 | 104 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
105 |
# install-prebuilt Installs the pre-built jar files |
2 | 106 |
# |
107 |
# This makefile was written to support parallel target execution. |
|
108 |
# |
|
109 |
||
110 |
BUILDDIR = ../.. |
|
111 |
PACKAGE = javax.crypto |
|
112 |
PRODUCT = sun |
|
113 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
114 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
115 |
# The following is for when we need to do postprocessing |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
116 |
# (signing) against a read-only build. If the OUTPUTDIR |
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
117 |
# isn't writable, the build currently crashes out. |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
118 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
119 |
ifndef OPENJDK |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
120 |
ifdef ALT_JCE_BUILD_DIR |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
121 |
# ===================================================== |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
122 |
# Where to place the output, in case we're building from a read-only |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
123 |
# build area. (e.g. a release engineering build.) |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
124 |
JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR} |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
125 |
IGNORE_WRITABLE_OUTPUTDIR_TEST=true |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
126 |
else |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
127 |
JCE_BUILD_DIR=${TEMPDIR} |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
128 |
endif |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
129 |
endif |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
130 |
|
10336
0bb1999251f8
7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror
jjg
parents:
9776
diff
changeset
|
131 |
JAVAC_MAX_WARNINGS = true |
0bb1999251f8
7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror
jjg
parents:
9776
diff
changeset
|
132 |
JAVAC_WARNINGS_FATAL = true |
2 | 133 |
include $(BUILDDIR)/common/Defs.gmk |
134 |
||
135 |
# |
|
136 |
# Location for the newly built classfiles. |
|
137 |
# |
|
138 |
CLASSDESTDIR = $(TEMPDIR)/classes |
|
139 |
||
140 |
# |
|
141 |
# Subdirectories of these are automatically included. |
|
142 |
# |
|
143 |
AUTO_FILES_JAVA_DIRS = \ |
|
144 |
javax/crypto \ |
|
145 |
sun/security/internal/interfaces \ |
|
146 |
sun/security/internal/spec |
|
147 |
||
148 |
include $(BUILDDIR)/common/Classes.gmk |
|
149 |
||
150 |
# |
|
151 |
# Rules |
|
152 |
# |
|
153 |
||
154 |
# |
|
155 |
# Some licensees do not get the security sources, but we still need to |
|
156 |
# be able to build "all" for them. Check here to see if the sources were |
|
157 |
# available. If not, then we don't need to continue this rule. |
|
158 |
# |
|
159 |
||
160 |
ifdef OPENJDK |
|
161 |
all: build-jar install-jar build-policy install-limited |
|
162 |
else # OPENJDK |
|
163 |
ifeq ($(strip $(FILES_java)),) |
|
164 |
all: |
|
165 |
$(no-source-warning) |
|
166 |
else # FILES_java/policy files available |
|
167 |
all: build-jar build-policy |
|
168 |
$(build-warning) |
|
169 |
endif # $(FILES_java)/policy files available |
|
170 |
endif # OPENJDK |
|
171 |
||
172 |
# |
|
173 |
# We use a variety of subdirectories in the $(TEMPDIR) depending on what |
|
174 |
# part of the build we're doing. Both OPENJDK/JDK builds are initially |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
175 |
# done in the unsigned area. When files are signed in JDK, they will be |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
176 |
# placed in the appropriate areas. |
2 | 177 |
# |
178 |
UNSIGNED_DIR = $(TEMPDIR)/unsigned |
|
179 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
180 |
include Defs-jce.gmk |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
181 |
|
2 | 182 |
|
183 |
# ===================================================== |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
184 |
# Build the unsigned jce.jar file. Signing comes later. |
2 | 185 |
# |
186 |
||
187 |
JAR_DESTFILE = $(LIBDIR)/jce.jar |
|
188 |
||
189 |
# |
|
190 |
# JCE building is somewhat involved. |
|
191 |
# |
|
192 |
# OpenJDK: Since we do not ship prebuilt JCE files, previous compiles |
|
193 |
# in the build may have needed JCE class signatures. There were then |
|
194 |
# implicitly built by javac (likely using the boot javac). While using |
|
195 |
# those class files was fine for signatures, we need to rebuild using |
|
196 |
# the right compiler. |
|
197 |
# |
|
198 |
# JDK: Even through the jce.jar was previously installed, since the |
|
199 |
# source files are accessible in the source directories, they will |
|
200 |
# always be "newer" than the prebuilt files inside the jar, and thus |
|
201 |
# make will always rebuild them. (We could "hide" the JCE source in a |
|
202 |
# separate directory, but that would make the build logic for JDK and |
|
203 |
# OpenJDK more complicated.) |
|
204 |
# |
|
205 |
# Thus in either situation, we shouldn't use these files. |
|
206 |
# |
|
207 |
# To make sure the classes were built with the right compiler options, |
|
208 |
# delete the existing files in $(CLASSBINDIR), rebuild the right way in a |
|
209 |
# directory under $(TEMPDIR), then copy the files back to |
|
210 |
# $(CLASSBINDIR). Building in $(TEMPDIR) allows us to use our make |
|
211 |
# infrastructure without modification: .classes.list, macros, etc. |
|
212 |
# |
|
213 |
||
214 |
# |
|
215 |
# The list of directories that will be remade from scratch, using the |
|
216 |
# right compilers/options. |
|
217 |
# |
|
218 |
DELETE_DIRS = $(patsubst %, $(CLASSBINDIR)/%, $(AUTO_FILES_JAVA_DIRS)) |
|
219 |
||
220 |
# |
|
221 |
# Since the -C option to jar is used below, each directory entry must be |
|
222 |
# preceded with the appropriate directory to "cd" into. |
|
223 |
# |
|
224 |
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS)) |
|
225 |
||
226 |
build-jar: $(UNSIGNED_DIR)/jce.jar |
|
227 |
||
228 |
# |
|
229 |
# Build jce.jar, then replace the previously built JCE files in the |
|
230 |
# classes directory with these. This ensures we have consistently built |
|
231 |
# files throughout the workspaces. |
|
232 |
# |
|
233 |
$(UNSIGNED_DIR)/jce.jar: prebuild build $(JCE_MANIFEST_FILE) |
|
234 |
$(prep-target) |
|
235 |
$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \ |
|
916
867515b155b5
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
300
diff
changeset
|
236 |
$(BOOT_JAR_JFLAGS) |
2 | 237 |
$(CP) -r $(CLASSDESTDIR)/* $(CLASSBINDIR) |
238 |
@$(java-vm-cleanup) |
|
239 |
||
240 |
build: prebuild |
|
241 |
||
242 |
prebuild: |
|
243 |
$(RM) -r $(DELETE_DIRS) |
|
244 |
||
245 |
||
246 |
# ===================================================== |
|
247 |
# Build the unsigned policy files. |
|
248 |
# |
|
249 |
# Given the current state of world export/import policies, |
|
250 |
# these settings work for Sun's situation. This note is not |
|
251 |
# legal guidance, you must still resolve any export/import issues |
|
252 |
# applicable for your situation. Contact your export/import |
|
253 |
# counsel for more information. |
|
254 |
# |
|
255 |
||
256 |
POLICY_DESTDIR = $(LIBDIR)/security |
|
257 |
UNSIGNED_POLICY_BUILDDIR = $(UNSIGNED_DIR)/policy |
|
258 |
||
259 |
build-policy: unlimited limited |
|
260 |
||
261 |
# |
|
262 |
# Build the unsigned unlimited policy files. |
|
263 |
# |
|
264 |
unlimited: \ |
|
265 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \ |
|
266 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar |
|
267 |
||
268 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar: \ |
|
269 |
policy/unlimited/default_US_export.policy \ |
|
270 |
policy/unlimited/UNLIMITED |
|
271 |
$(prep-target) |
|
272 |
$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@ \ |
|
273 |
-C policy/unlimited default_US_export.policy \ |
|
916
867515b155b5
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
300
diff
changeset
|
274 |
$(BOOT_JAR_JFLAGS) |
2 | 275 |
@$(java-vm-cleanup) |
276 |
||
277 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar: \ |
|
278 |
policy/unlimited/default_local.policy \ |
|
279 |
policy/unlimited/UNLIMITED |
|
280 |
$(prep-target) |
|
281 |
$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@ \ |
|
282 |
-C policy/unlimited default_local.policy \ |
|
916
867515b155b5
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
300
diff
changeset
|
283 |
$(BOOT_JAR_JFLAGS) |
2 | 284 |
@$(java-vm-cleanup) |
285 |
||
286 |
# |
|
287 |
# Build the unsigned limited policy files. |
|
288 |
# |
|
289 |
# NOTE: We currently do not place restrictions on our limited export |
|
290 |
# policy. This was not a typo. |
|
291 |
# |
|
292 |
limited: \ |
|
293 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \ |
|
294 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar |
|
295 |
||
296 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar: \ |
|
297 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar |
|
8583
15dea0fdc2ea
7025631: Remove the modules build support from jdk 7
mchung
parents:
7668
diff
changeset
|
298 |
$(install-file) |
2 | 299 |
|
300 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar: \ |
|
301 |
policy/limited/default_local.policy \ |
|
302 |
policy/limited/exempt_local.policy \ |
|
303 |
policy/limited/LIMITED |
|
304 |
$(prep-target) |
|
305 |
$(BOOT_JAR_CMD) cmf policy/limited/LIMITED $@ \ |
|
306 |
-C policy/limited default_local.policy \ |
|
307 |
-C policy/limited exempt_local.policy \ |
|
916
867515b155b5
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
300
diff
changeset
|
308 |
$(BOOT_JAR_JFLAGS) |
2 | 309 |
@$(java-vm-cleanup) |
310 |
||
311 |
UNSIGNED_POLICY_FILES = \ |
|
312 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \ |
|
313 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar \ |
|
314 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \ |
|
315 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar \ |
|
316 |
||
317 |
||
318 |
ifndef OPENJDK |
|
319 |
# ===================================================== |
|
320 |
# Sign the various jar files. Not needed for OpenJDK. |
|
321 |
# |
|
322 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
323 |
SIGNED_DIR = $(JCE_BUILD_DIR)/signed |
2 | 324 |
SIGNED_POLICY_BUILDDIR = $(SIGNED_DIR)/policy |
325 |
||
326 |
SIGNED_POLICY_FILES = \ |
|
327 |
$(patsubst $(UNSIGNED_POLICY_BUILDDIR)/%,$(SIGNED_POLICY_BUILDDIR)/%, \ |
|
328 |
$(UNSIGNED_POLICY_FILES)) |
|
329 |
||
330 |
sign: sign-jar sign-policy |
|
331 |
||
332 |
sign-jar: $(SIGNED_DIR)/jce.jar |
|
333 |
||
334 |
sign-policy: $(SIGNED_POLICY_FILES) |
|
335 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
336 |
ifndef ALT_JCE_BUILD_DIR |
2 | 337 |
$(SIGNED_DIR)/jce.jar: $(UNSIGNED_DIR)/jce.jar |
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
338 |
else |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
339 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
340 |
# We have to remove the build dependency, otherwise, we'll try to rebuild it |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
341 |
# which we can't do on a read-only filesystem. |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
342 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
343 |
$(SIGNED_DIR)/jce.jar: |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
344 |
@if [ ! -r $(UNSIGNED_DIR)/jce.jar ] ; then \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
345 |
$(ECHO) "Couldn't find $(UNSIGNED_DIR)/jce.jar"; \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
346 |
exit 1; \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
347 |
fi |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
348 |
endif |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
349 |
$(call sign-file, $(UNSIGNED_DIR)/jce.jar) |
2 | 350 |
|
351 |
$(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar: \ |
|
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
352 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
353 |
$(call sign-file, $<) |
2 | 354 |
|
355 |
$(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar: \ |
|
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
356 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
357 |
$(call sign-file, $<) |
2 | 358 |
|
359 |
$(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar: \ |
|
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
360 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
361 |
$(call sign-file, $<) |
2 | 362 |
|
363 |
$(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar: \ |
|
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
364 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
365 |
$(call sign-file, $<) |
2 | 366 |
|
367 |
||
368 |
# ===================================================== |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
369 |
# Create the Release Engineering files. Signed builds, |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
370 |
# unlimited policy file distribution, etc. |
2 | 371 |
# |
372 |
||
373 |
CLOSED_DIR = $(BUILDDIR)/closed/javax/crypto |
|
374 |
||
9776
3b9d58a79b55
7042097: JDK 7's Unlimited Cryptographic Policy bundle text files must be updated.
wetmore
parents:
9035
diff
changeset
|
375 |
release: $(SIGNED_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/README.txt |
2 | 376 |
$(RM) -r \ |
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
377 |
$(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
378 |
$(JCE_BUILD_DIR)/release/jce.jar \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
379 |
$(JCE_BUILD_DIR)/release/US_export_policy.jar \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
380 |
$(JCE_BUILD_DIR)/release/local_policy.jar \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
381 |
$(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy.zip |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
382 |
$(MKDIR) -p $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
383 |
$(CP) $(SIGNED_DIR)/jce.jar $(JCE_BUILD_DIR)/release |
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
384 |
$(CP) \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
385 |
$(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
386 |
$(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
387 |
$(JCE_BUILD_DIR)/release |
2 | 388 |
$(CP) \ |
389 |
$(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \ |
|
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
390 |
$(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
391 |
$(CLOSED_DIR)/doc/README.txt \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
392 |
$(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
393 |
cd $(JCE_BUILD_DIR)/release ; \ |
2 | 394 |
$(ZIPEXE) -qr UnlimitedJCEPolicy.zip UnlimitedJCEPolicy |
395 |
$(release-warning) |
|
396 |
||
397 |
endif # OPENJDK |
|
398 |
||
399 |
||
400 |
# ===================================================== |
|
401 |
# Install routines. |
|
402 |
# |
|
403 |
||
404 |
# |
|
405 |
# Install jce.jar, depending on which type is requested. |
|
406 |
# |
|
407 |
install-jar jar: $(JAR_DESTFILE) |
|
408 |
ifndef OPENJDK |
|
409 |
$(release-warning) |
|
410 |
endif |
|
411 |
||
412 |
ifdef OPENJDK |
|
413 |
$(JAR_DESTFILE): $(UNSIGNED_DIR)/jce.jar |
|
414 |
else |
|
415 |
$(JAR_DESTFILE): $(SIGNED_DIR)/jce.jar |
|
416 |
endif |
|
8583
15dea0fdc2ea
7025631: Remove the modules build support from jdk 7
mchung
parents:
7668
diff
changeset
|
417 |
$(install-file) |
2 | 418 |
|
419 |
# |
|
420 |
# Install the appropriate policy file, depending on the type of build. |
|
421 |
# |
|
422 |
ifdef OPENJDK |
|
423 |
INSTALL_POLICYDIR = $(UNSIGNED_POLICY_BUILDDIR) |
|
424 |
else |
|
425 |
INSTALL_POLICYDIR = $(SIGNED_POLICY_BUILDDIR) |
|
426 |
endif |
|
427 |
||
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3353
diff
changeset
|
428 |
install-limited-jars: \ |
2 | 429 |
$(INSTALL_POLICYDIR)/limited/US_export_policy.jar \ |
430 |
$(INSTALL_POLICYDIR)/limited/local_policy.jar |
|
431 |
$(MKDIR) -p $(POLICY_DESTDIR) |
|
432 |
$(RM) \ |
|
433 |
$(POLICY_DESTDIR)/US_export_policy.jar \ |
|
434 |
$(POLICY_DESTDIR)/local_policy.jar |
|
435 |
$(CP) $^ $(POLICY_DESTDIR) |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3353
diff
changeset
|
436 |
|
8583
15dea0fdc2ea
7025631: Remove the modules build support from jdk 7
mchung
parents:
7668
diff
changeset
|
437 |
install-limited: install-limited-jars |
2 | 438 |
ifndef OPENJDK |
439 |
$(release-warning) |
|
440 |
endif |
|
441 |
||
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3353
diff
changeset
|
442 |
install-unlimited-jars: \ |
2 | 443 |
$(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar \ |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3353
diff
changeset
|
444 |
$(INSTALL_POLICYDIR)/unlimited/local_policy.jar |
2 | 445 |
$(MKDIR) -p $(POLICY_DESTDIR) |
446 |
$(RM) \ |
|
447 |
$(POLICY_DESTDIR)/US_export_policy.jar \ |
|
448 |
$(POLICY_DESTDIR)/local_policy.jar |
|
449 |
$(CP) $^ $(POLICY_DESTDIR) |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3353
diff
changeset
|
450 |
|
8583
15dea0fdc2ea
7025631: Remove the modules build support from jdk 7
mchung
parents:
7668
diff
changeset
|
451 |
install-unlimited: install-unlimited-jars |
2 | 452 |
ifndef OPENJDK |
453 |
$(release-warning) |
|
454 |
endif |
|
455 |
||
456 |
ifndef OPENJDK |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3353
diff
changeset
|
457 |
install-prebuilt-jars: |
2 | 458 |
@$(ECHO) "\n>>>Installing prebuilt JCE framework..." |
459 |
$(RM) $(JAR_DESTFILE) \ |
|
460 |
$(POLICY_DESTDIR)/US_export_policy.jar \ |
|
461 |
$(POLICY_DESTDIR)/local_policy.jar |
|
462 |
$(CP) $(PREBUILT_DIR)/jce/jce.jar $(JAR_DESTFILE) |
|
463 |
$(CP) \ |
|
464 |
$(PREBUILT_DIR)/jce/US_export_policy.jar \ |
|
465 |
$(PREBUILT_DIR)/jce/local_policy.jar \ |
|
466 |
$(POLICY_DESTDIR) |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3353
diff
changeset
|
467 |
|
8583
15dea0fdc2ea
7025631: Remove the modules build support from jdk 7
mchung
parents:
7668
diff
changeset
|
468 |
install-prebuilt: install-prebuilt-jars |
2 | 469 |
endif |
470 |
||
471 |
# ===================================================== |
|
472 |
# Support routines. |
|
473 |
# |
|
474 |
||
475 |
clobber clean:: |
|
476 |
$(RM) -r $(JAR_DESTFILE) $(POLICY_DESTDIR)/US_export_policy.jar \ |
|
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
477 |
$(POLICY_DESTDIR)/local_policy.jar $(DELETE_DIRS) $(TEMPDIR) \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
478 |
$(JCE_BUILD_DIR) |
2 | 479 |
|
480 |
.PHONY: build-jar jar build-policy unlimited limited install-jar \ |
|
481 |
install-limited install-unlimited |
|
482 |
ifndef OPENJDK |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
483 |
.PHONY: sign sign-jar sign-policy release install-prebuilt |
2 | 484 |
endif |