author | jlaskey |
Tue, 19 Feb 2013 09:47:02 -0400 | |
changeset 16248 | e4bcc4b4f897 |
parent 10336 | 0bb1999251f8 |
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 sunjce_provider.jar. |
|
28 |
# |
|
29 |
# This file was derived from make/javax/crypto/Makefile. |
|
30 |
# |
|
31 |
||
32 |
# |
|
33 |
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds |
|
34 |
# respectively.) |
|
35 |
# |
|
36 |
# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE |
|
37 |
# jar files do not require signing, but those for JDK do. If an unsigned |
|
38 |
# jar file is installed into JDK, things will break when the crypto |
|
39 |
# routines are called. |
|
40 |
# |
|
41 |
# This Makefile does the "real" build of the JCE files. There are some |
|
42 |
# javac options currently specific to JCE, so we recompile now to make |
|
43 |
# sure any implicit compilations didn't use any incorrect flags. |
|
44 |
# |
|
45 |
# For OpenJDK, the jar files built here are installed directly into the |
|
46 |
# OpenJDK. |
|
47 |
# |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
48 |
# 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
|
49 |
# 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
|
50 |
# 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
|
51 |
# 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
|
52 |
# 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
|
53 |
# separate from the JDK workspace to prevent its disclosure. |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
54 |
# |
2 | 55 |
# 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
|
56 |
# 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
|
57 |
# 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
|
58 |
# 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
|
59 |
# reflected in the shipped binaries. The "release" target should be |
2 | 60 |
# used to generate the required files. |
61 |
# |
|
62 |
# There are a number of targets to help both JDK/OpenJDK developers. |
|
63 |
# |
|
64 |
# Main Targets (JDK/OPENJDK): |
|
65 |
# |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
66 |
# all/clobber/clean The usual. |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
67 |
# If OpenJDK, installs sunjce_provider.jar. |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
68 |
# If JDK, installs prebuilt |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
69 |
# sunjce_provider.jar. |
2 | 70 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
71 |
# jar Builds/installs sunjce_provider.jar |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
72 |
# If OpenJDK, does not sign. |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
73 |
# If JDK, tries to sign. |
2 | 74 |
# |
75 |
# Other lesser-used Targets (JDK/OPENJDK): |
|
76 |
# |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
77 |
# build-jar Builds sunjce_provider.jar |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
78 |
# (does not sign/install) |
2 | 79 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
80 |
# install-jar Alias for "jar" above. |
2 | 81 |
# |
82 |
# Other targets (JDK only): |
|
83 |
# |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
84 |
# sign Alias for sign-jar |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
85 |
# sign-jar Builds/signs sunjce_provider.jar (no install) |
2 | 86 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
87 |
# release Builds all targets in preparation |
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
88 |
# for workspace integration. |
2 | 89 |
# |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
90 |
# install-prebuilt Installs the pre-built jar files |
2 | 91 |
# |
92 |
# This makefile was written to support parallel target execution. |
|
93 |
# |
|
94 |
||
95 |
BUILDDIR = ../../../.. |
|
96 |
PACKAGE = com.sun.crypto.provider |
|
97 |
PRODUCT = sun |
|
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
98 |
|
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
99 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
100 |
# 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
|
101 |
# (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
|
102 |
# 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
|
103 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
104 |
ifndef OPENJDK |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
105 |
ifdef ALT_JCE_BUILD_DIR |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
106 |
# ===================================================== |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
107 |
# 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
|
108 |
# 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
|
109 |
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
|
110 |
IGNORE_WRITABLE_OUTPUTDIR_TEST=true |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
111 |
else |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
112 |
JCE_BUILD_DIR=${TEMPDIR} |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
113 |
endif |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
114 |
endif |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
115 |
|
10336
0bb1999251f8
7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror
jjg
parents:
9035
diff
changeset
|
116 |
JAVAC_MAX_WARNINGS = false |
0bb1999251f8
7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror
jjg
parents:
9035
diff
changeset
|
117 |
JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation |
0bb1999251f8
7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror
jjg
parents:
9035
diff
changeset
|
118 |
JAVAC_WARNINGS_FATAL = true |
2 | 119 |
include $(BUILDDIR)/common/Defs.gmk |
120 |
||
121 |
# |
|
122 |
# Location for the newly built classfiles. |
|
123 |
# |
|
124 |
CLASSDESTDIR = $(TEMPDIR)/classes |
|
125 |
||
126 |
# |
|
127 |
# Subdirectories of these are automatically included. |
|
128 |
# |
|
129 |
AUTO_FILES_JAVA_DIRS = \ |
|
130 |
com/sun/crypto/provider |
|
131 |
||
132 |
include $(BUILDDIR)/common/Classes.gmk |
|
133 |
||
134 |
# |
|
135 |
# Rules |
|
136 |
# |
|
137 |
||
138 |
# |
|
139 |
# Some licensees do not get the security sources, but we still need to |
|
140 |
# be able to build "all" for them. Check here to see if the sources were |
|
141 |
# available. If not, then we don't need to continue this rule. |
|
142 |
# |
|
143 |
||
144 |
ifdef OPENJDK |
|
145 |
all: build-jar install-jar |
|
146 |
else # OPENJDK |
|
147 |
ifeq ($(strip $(FILES_java)),) |
|
148 |
all: install-prebuilt |
|
149 |
$(no-source-warning) |
|
150 |
else # FILES_java available |
|
151 |
all: build-jar install-prebuilt |
|
152 |
$(build-warning) |
|
153 |
endif # $(FILES_java) available |
|
154 |
endif # OPENJDK |
|
155 |
||
156 |
# |
|
157 |
# We use a variety of subdirectories in the $(TEMPDIR) depending on what |
|
158 |
# 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
|
159 |
# 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
|
160 |
# placed in the appropriate areas. |
2 | 161 |
# |
162 |
UNSIGNED_DIR = $(TEMPDIR)/unsigned |
|
163 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
164 |
include $(BUILDDIR)/javax/crypto/Defs-jce.gmk |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
165 |
|
2 | 166 |
|
167 |
# ===================================================== |
|
168 |
# Build the unsigned sunjce_provider.jar file. |
|
169 |
# |
|
170 |
||
171 |
JAR_DESTFILE = $(EXTDIR)/sunjce_provider.jar |
|
172 |
||
173 |
# |
|
174 |
# The sunjce_provider.jar needs to be in the extension class directory, |
|
175 |
# therefore none of its classes should appear in $(CLASSBINDIR). |
|
176 |
# Currently no one is using any of the SunJCE internals, so these files |
|
177 |
# should not have been built. |
|
178 |
# |
|
179 |
||
180 |
# |
|
181 |
# Since the -C option to jar is used below, each directory entry must be |
|
182 |
# preceded with the appropriate directory to "cd" into. |
|
183 |
# |
|
184 |
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS)) |
|
185 |
||
186 |
build-jar: $(UNSIGNED_DIR)/sunjce_provider.jar |
|
187 |
||
188 |
# |
|
189 |
# Build sunjce_provider.jar. |
|
190 |
# |
|
191 |
$(UNSIGNED_DIR)/sunjce_provider.jar: build $(JCE_MANIFEST_FILE) |
|
192 |
$(prep-target) |
|
193 |
$(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
|
194 |
$(BOOT_JAR_JFLAGS) |
2 | 195 |
@$(java-vm-cleanup) |
196 |
||
197 |
||
198 |
ifndef OPENJDK |
|
199 |
# ===================================================== |
|
200 |
# Sign the provider jar file. Not needed for OpenJDK. |
|
201 |
# |
|
202 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
203 |
SIGNED_DIR = $(JCE_BUILD_DIR)/signed |
2 | 204 |
|
205 |
sign: sign-jar |
|
206 |
||
207 |
sign-jar: $(SIGNED_DIR)/sunjce_provider.jar |
|
208 |
||
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
209 |
ifndef ALT_JCE_BUILD_DIR |
2 | 210 |
$(SIGNED_DIR)/sunjce_provider.jar: $(UNSIGNED_DIR)/sunjce_provider.jar |
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
211 |
else |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
212 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
213 |
# 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
|
214 |
# 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
|
215 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
216 |
$(SIGNED_DIR)/sunjce_provider.jar: |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
217 |
@if [ ! -r $(UNSIGNED_DIR)/sunjce_provider.jar ] ; then \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
218 |
$(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunjce_provider.jar"; \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
219 |
exit 1; \ |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
220 |
fi |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
221 |
endif |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
222 |
$(call sign-file, $(UNSIGNED_DIR)/sunjce_provider.jar) |
2 | 223 |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
224 |
|
2 | 225 |
# ===================================================== |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
226 |
# Create the Release Engineering files. Signed builds, etc. |
2 | 227 |
# |
228 |
||
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
229 |
release: $(SIGNED_DIR)/sunjce_provider.jar |
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
230 |
$(RM) $(JCE_BUILD_DIR)/release/sunjce_provider.jar |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
231 |
$(MKDIR) -p $(JCE_BUILD_DIR)/release |
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
232 |
$(CP) $(SIGNED_DIR)/sunjce_provider.jar $(JCE_BUILD_DIR)/release |
2 | 233 |
$(release-warning) |
234 |
||
235 |
endif # OPENJDK |
|
236 |
||
237 |
||
238 |
# ===================================================== |
|
239 |
# Install routines. |
|
240 |
# |
|
241 |
||
242 |
# |
|
243 |
# Install sunjce_provider.jar, depending on which type is requested. |
|
244 |
# |
|
245 |
install-jar jar: $(JAR_DESTFILE) |
|
246 |
ifndef OPENJDK |
|
247 |
$(release-warning) |
|
248 |
endif |
|
249 |
||
250 |
ifdef OPENJDK |
|
251 |
$(JAR_DESTFILE): $(UNSIGNED_DIR)/sunjce_provider.jar |
|
252 |
else |
|
253 |
$(JAR_DESTFILE): $(SIGNED_DIR)/sunjce_provider.jar |
|
254 |
endif |
|
8583
15dea0fdc2ea
7025631: Remove the modules build support from jdk 7
mchung
parents:
7668
diff
changeset
|
255 |
$(install-file) |
2 | 256 |
|
257 |
ifndef OPENJDK |
|
258 |
install-prebuilt: |
|
259 |
@$(ECHO) "\n>>>Installing prebuilt SunJCE provider..." |
|
260 |
$(RM) $(JAR_DESTFILE) |
|
261 |
$(CP) $(PREBUILT_DIR)/jce/sunjce_provider.jar $(JAR_DESTFILE) |
|
262 |
endif |
|
263 |
||
264 |
||
265 |
# ===================================================== |
|
266 |
# Support routines. |
|
267 |
# |
|
268 |
||
269 |
clobber clean:: |
|
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
2
diff
changeset
|
270 |
$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR) |
2 | 271 |
|
272 |
.PHONY: build-jar jar install-jar |
|
273 |
ifndef OPENJDK |
|
3353
ddbd63234844
6647452: Remove obfuscation, framework and provider self-verification checking
wetmore
parents:
3332
diff
changeset
|
274 |
.PHONY: sign sign-jar release install-prebuilt |
2 | 275 |
endif |