author | wetmore |
Mon, 03 Aug 2009 18:06:51 -0700 | |
changeset 3353 | ddbd63234844 |
parent 3332 | b9c68d909f98 |
child 4665 | d14dc3d9e1fa |
permissions | -rw-r--r-- |
2 | 1 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
2 |
# Copyright 2007-2009 Sun Microsystems, Inc. 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 |
|
7 |
# published by the Free Software Foundation. Sun designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
# have any questions. |
|
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 |
|
2 | 131 |
include $(BUILDDIR)/common/Defs.gmk |
132 |
||
133 |
# |
|
134 |
# Location for the newly built classfiles. |
|
135 |
# |
|
136 |
CLASSDESTDIR = $(TEMPDIR)/classes |
|
137 |
||
138 |
# |
|
139 |
# Subdirectories of these are automatically included. |
|
140 |
# |
|
141 |
AUTO_FILES_JAVA_DIRS = \ |
|
142 |
javax/crypto \ |
|
143 |
sun/security/internal/interfaces \ |
|
144 |
sun/security/internal/spec |
|
145 |
||
146 |
include $(BUILDDIR)/common/Classes.gmk |
|
147 |
||
148 |
# |
|
149 |
# Rules |
|
150 |
# |
|
151 |
||
152 |
# |
|
153 |
# Some licensees do not get the security sources, but we still need to |
|
154 |
# be able to build "all" for them. Check here to see if the sources were |
|
155 |
# available. If not, then we don't need to continue this rule. |
|
156 |
# |
|
157 |
||
158 |
ifdef OPENJDK |
|
159 |
all: build-jar install-jar build-policy install-limited |
|
160 |
else # OPENJDK |
|
161 |
ifeq ($(strip $(FILES_java)),) |
|
162 |
all: |
|
163 |
$(no-source-warning) |
|
164 |
else # FILES_java/policy files available |
|
165 |
all: build-jar build-policy |
|
166 |
$(build-warning) |
|
167 |
endif # $(FILES_java)/policy files available |
|
168 |
endif # OPENJDK |
|
169 |
||
170 |
# |
|
171 |
# We use a variety of subdirectories in the $(TEMPDIR) depending on what |
|
172 |
# 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
|
173 |
# 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
|
174 |
# placed in the appropriate areas. |
2 | 175 |
# |
176 |
UNSIGNED_DIR = $(TEMPDIR)/unsigned |
|
177 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
178 |
include Defs-jce.gmk |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
179 |
|
2 | 180 |
|
181 |
# ===================================================== |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
182 |
# Build the unsigned jce.jar file. Signing comes later. |
2 | 183 |
# |
184 |
||
185 |
JAR_DESTFILE = $(LIBDIR)/jce.jar |
|
186 |
||
187 |
# |
|
188 |
# JCE building is somewhat involved. |
|
189 |
# |
|
190 |
# OpenJDK: Since we do not ship prebuilt JCE files, previous compiles |
|
191 |
# in the build may have needed JCE class signatures. There were then |
|
192 |
# implicitly built by javac (likely using the boot javac). While using |
|
193 |
# those class files was fine for signatures, we need to rebuild using |
|
194 |
# the right compiler. |
|
195 |
# |
|
196 |
# JDK: Even through the jce.jar was previously installed, since the |
|
197 |
# source files are accessible in the source directories, they will |
|
198 |
# always be "newer" than the prebuilt files inside the jar, and thus |
|
199 |
# make will always rebuild them. (We could "hide" the JCE source in a |
|
200 |
# separate directory, but that would make the build logic for JDK and |
|
201 |
# OpenJDK more complicated.) |
|
202 |
# |
|
203 |
# Thus in either situation, we shouldn't use these files. |
|
204 |
# |
|
205 |
# To make sure the classes were built with the right compiler options, |
|
206 |
# delete the existing files in $(CLASSBINDIR), rebuild the right way in a |
|
207 |
# directory under $(TEMPDIR), then copy the files back to |
|
208 |
# $(CLASSBINDIR). Building in $(TEMPDIR) allows us to use our make |
|
209 |
# infrastructure without modification: .classes.list, macros, etc. |
|
210 |
# |
|
211 |
||
212 |
# |
|
213 |
# The list of directories that will be remade from scratch, using the |
|
214 |
# right compilers/options. |
|
215 |
# |
|
216 |
DELETE_DIRS = $(patsubst %, $(CLASSBINDIR)/%, $(AUTO_FILES_JAVA_DIRS)) |
|
217 |
||
218 |
# |
|
219 |
# Since the -C option to jar is used below, each directory entry must be |
|
220 |
# preceded with the appropriate directory to "cd" into. |
|
221 |
# |
|
222 |
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS)) |
|
223 |
||
224 |
build-jar: $(UNSIGNED_DIR)/jce.jar |
|
225 |
||
226 |
# |
|
227 |
# Build jce.jar, then replace the previously built JCE files in the |
|
228 |
# classes directory with these. This ensures we have consistently built |
|
229 |
# files throughout the workspaces. |
|
230 |
# |
|
231 |
$(UNSIGNED_DIR)/jce.jar: prebuild build $(JCE_MANIFEST_FILE) |
|
232 |
$(prep-target) |
|
233 |
$(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
|
234 |
$(BOOT_JAR_JFLAGS) |
2 | 235 |
$(CP) -r $(CLASSDESTDIR)/* $(CLASSBINDIR) |
236 |
@$(java-vm-cleanup) |
|
237 |
||
238 |
build: prebuild |
|
239 |
||
240 |
prebuild: |
|
241 |
$(RM) -r $(DELETE_DIRS) |
|
242 |
||
243 |
||
244 |
# ===================================================== |
|
245 |
# Build the unsigned policy files. |
|
246 |
# |
|
247 |
# Given the current state of world export/import policies, |
|
248 |
# these settings work for Sun's situation. This note is not |
|
249 |
# legal guidance, you must still resolve any export/import issues |
|
250 |
# applicable for your situation. Contact your export/import |
|
251 |
# counsel for more information. |
|
252 |
# |
|
253 |
||
254 |
POLICY_DESTDIR = $(LIBDIR)/security |
|
255 |
UNSIGNED_POLICY_BUILDDIR = $(UNSIGNED_DIR)/policy |
|
256 |
||
257 |
build-policy: unlimited limited |
|
258 |
||
259 |
# |
|
260 |
# Build the unsigned unlimited policy files. |
|
261 |
# |
|
262 |
unlimited: \ |
|
263 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \ |
|
264 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar |
|
265 |
||
266 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar: \ |
|
267 |
policy/unlimited/default_US_export.policy \ |
|
268 |
policy/unlimited/UNLIMITED |
|
269 |
$(prep-target) |
|
270 |
$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@ \ |
|
271 |
-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
|
272 |
$(BOOT_JAR_JFLAGS) |
2 | 273 |
@$(java-vm-cleanup) |
274 |
||
275 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar: \ |
|
276 |
policy/unlimited/default_local.policy \ |
|
277 |
policy/unlimited/UNLIMITED |
|
278 |
$(prep-target) |
|
279 |
$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@ \ |
|
280 |
-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
|
281 |
$(BOOT_JAR_JFLAGS) |
2 | 282 |
@$(java-vm-cleanup) |
283 |
||
284 |
# |
|
285 |
# Build the unsigned limited policy files. |
|
286 |
# |
|
287 |
# NOTE: We currently do not place restrictions on our limited export |
|
288 |
# policy. This was not a typo. |
|
289 |
# |
|
290 |
limited: \ |
|
291 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \ |
|
292 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar |
|
293 |
||
294 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar: \ |
|
295 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar |
|
296 |
$(install-file) |
|
297 |
||
298 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar: \ |
|
299 |
policy/limited/default_local.policy \ |
|
300 |
policy/limited/exempt_local.policy \ |
|
301 |
policy/limited/LIMITED |
|
302 |
$(prep-target) |
|
303 |
$(BOOT_JAR_CMD) cmf policy/limited/LIMITED $@ \ |
|
304 |
-C policy/limited default_local.policy \ |
|
305 |
-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
|
306 |
$(BOOT_JAR_JFLAGS) |
2 | 307 |
@$(java-vm-cleanup) |
308 |
||
309 |
UNSIGNED_POLICY_FILES = \ |
|
310 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \ |
|
311 |
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar \ |
|
312 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \ |
|
313 |
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar \ |
|
314 |
||
315 |
||
316 |
ifndef OPENJDK |
|
317 |
# ===================================================== |
|
318 |
# Sign the various jar files. Not needed for OpenJDK. |
|
319 |
# |
|
320 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
321 |
SIGNED_DIR = $(JCE_BUILD_DIR)/signed |
2 | 322 |
SIGNED_POLICY_BUILDDIR = $(SIGNED_DIR)/policy |
323 |
||
324 |
SIGNED_POLICY_FILES = \ |
|
325 |
$(patsubst $(UNSIGNED_POLICY_BUILDDIR)/%,$(SIGNED_POLICY_BUILDDIR)/%, \ |
|
326 |
$(UNSIGNED_POLICY_FILES)) |
|
327 |
||
328 |
sign: sign-jar sign-policy |
|
329 |
||
330 |
sign-jar: $(SIGNED_DIR)/jce.jar |
|
331 |
||
332 |
sign-policy: $(SIGNED_POLICY_FILES) |
|
333 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
334 |
ifndef ALT_JCE_BUILD_DIR |
2 | 335 |
$(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
|
336 |
else |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
337 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
338 |
# 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
|
339 |
# 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
|
340 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
341 |
$(SIGNED_DIR)/jce.jar: |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
342 |
@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
|
343 |
$(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
|
344 |
exit 1; \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
345 |
fi |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
346 |
endif |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
347 |
$(call sign-file, $(UNSIGNED_DIR)/jce.jar) |
2 | 348 |
|
349 |
$(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
|
350 |
$(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
|
351 |
$(call sign-file, $<) |
2 | 352 |
|
353 |
$(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
|
354 |
$(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
|
355 |
$(call sign-file, $<) |
2 | 356 |
|
357 |
$(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
|
358 |
$(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
|
359 |
$(call sign-file, $<) |
2 | 360 |
|
361 |
$(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
|
362 |
$(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
|
363 |
$(call sign-file, $<) |
2 | 364 |
|
365 |
||
366 |
# ===================================================== |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
367 |
# Create the Release Engineering files. Signed builds, |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
368 |
# unlimited policy file distribution, etc. |
2 | 369 |
# |
370 |
||
371 |
CLOSED_DIR = $(BUILDDIR)/closed/javax/crypto |
|
372 |
||
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
373 |
release: $(SIGNED_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/COPYRIGHT.html \ |
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
374 |
$(CLOSED_DIR)/doc/README.txt |
2 | 375 |
$(RM) -r \ |
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
376 |
$(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
377 |
$(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
|
378 |
$(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
|
379 |
$(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
|
380 |
$(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
|
381 |
$(MKDIR) -p $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
382 |
$(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
|
383 |
$(CP) \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
384 |
$(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
|
385 |
$(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
|
386 |
$(JCE_BUILD_DIR)/release |
2 | 387 |
$(CP) \ |
388 |
$(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
|
389 |
$(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
|
390 |
$(CLOSED_DIR)/doc/COPYRIGHT.html \ |
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 |
|
417 |
$(install-file) |
|
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 |
||
428 |
install-limited: \ |
|
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) |
|
436 |
ifndef OPENJDK |
|
437 |
$(release-warning) |
|
438 |
endif |
|
439 |
||
440 |
install-unlimited: \ |
|
441 |
$(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar \ |
|
442 |
$(INSTALL_POLICYDIR)/unlimited/local_policy.jar |
|
443 |
$(MKDIR) -p $(POLICY_DESTDIR) |
|
444 |
$(RM) \ |
|
445 |
$(POLICY_DESTDIR)/US_export_policy.jar \ |
|
446 |
$(POLICY_DESTDIR)/local_policy.jar |
|
447 |
$(CP) $^ $(POLICY_DESTDIR) |
|
448 |
ifndef OPENJDK |
|
449 |
$(release-warning) |
|
450 |
endif |
|
451 |
||
452 |
ifndef OPENJDK |
|
453 |
install-prebuilt: |
|
454 |
@$(ECHO) "\n>>>Installing prebuilt JCE framework..." |
|
455 |
$(RM) $(JAR_DESTFILE) \ |
|
456 |
$(POLICY_DESTDIR)/US_export_policy.jar \ |
|
457 |
$(POLICY_DESTDIR)/local_policy.jar |
|
458 |
$(CP) $(PREBUILT_DIR)/jce/jce.jar $(JAR_DESTFILE) |
|
459 |
$(CP) \ |
|
460 |
$(PREBUILT_DIR)/jce/US_export_policy.jar \ |
|
461 |
$(PREBUILT_DIR)/jce/local_policy.jar \ |
|
462 |
$(POLICY_DESTDIR) |
|
463 |
endif |
|
464 |
||
465 |
||
466 |
# ===================================================== |
|
467 |
# Support routines. |
|
468 |
# |
|
469 |
||
470 |
clobber clean:: |
|
471 |
$(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
|
472 |
$(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
|
473 |
$(JCE_BUILD_DIR) |
2 | 474 |
|
475 |
.PHONY: build-jar jar build-policy unlimited limited install-jar \ |
|
476 |
install-limited install-unlimited |
|
477 |
ifndef OPENJDK |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
478 |
.PHONY: sign sign-jar sign-policy release install-prebuilt |
2 | 479 |
endif |