blob: c317d8d795c95e895280561c4a4cd190c2f700ef [file] [log] [blame]
erikje78df742012-06-07 20:40:50 -07001#
2# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
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
26include $(SPEC)
27include MakeBase.gmk
28include JavaCompilation.gmk
29include Setup.gmk
30
31default: all
32
33include Tools.gmk
34
erikjaf85fc42012-07-03 16:10:44 -070035#
36# This makefile...so that altering will trigger rebuilding include/exclude-lists => jars
37#
38MAKEFILE=$(JDK_TOPDIR)/makefiles/CreateJars.gmk
erikje78df742012-06-07 20:40:50 -070039
40MAINMANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf
41BEANMANIFEST := $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest
42
43JARS:=
44
ohairb71409c2012-10-26 14:23:29 -070045$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/lib))
46
erikje78df742012-06-07 20:40:50 -070047##########################################################################################
48
ohairb71409c2012-10-26 14:23:29 -070049$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,,\
erikje78df742012-06-07 20:40:50 -070050 SRCS:=$(JDK_OUTPUTDIR)/classes,\
erikjaf85fc42012-07-03 16:10:44 -070051 SUFFIXES:=.class .gif .png .properties,\
erikje78df742012-06-07 20:40:50 -070052 INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
53 JARMAIN:=sun.tools.jconsole.JConsole,\
ohairb71409c2012-10-26 14:23:29 -070054 JAR:=$(IMAGES_OUTPUTDIR)/lib/jconsole.jar,\
erikje78df742012-06-07 20:40:50 -070055 SKIP_METAINF:=true))
56
ohairb71409c2012-10-26 14:23:29 -070057JARS+=$(IMAGES_OUTPUTDIR)/lib/jconsole.jar
erikje78df742012-06-07 20:40:50 -070058
59##########################################################################################
60
ohairb71409c2012-10-26 14:23:29 -070061$(eval $(call SetupArchive,BUILD_DNS_JAR,,\
erikje78df742012-06-07 20:40:50 -070062 SRCS:=$(JDK_OUTPUTDIR)/classes,\
63 INCLUDES:=sun/net/spi/nameservice/dns,\
64 EXTRA_FILES:=META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor,\
ohairb71409c2012-10-26 14:23:29 -070065 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar,\
erikje78df742012-06-07 20:40:50 -070066 SKIP_METAINF:=true))
67
ohairb71409c2012-10-26 14:23:29 -070068JARS+=$(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar
erikje78df742012-06-07 20:40:50 -070069
70##########################################################################################
71
naoto85d2c712012-10-31 11:33:36 -070072LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
73 iw ja ko lt lv mk ms mt nl no pl pt ro ru sk sl sq sr sv \
74 th tr uk vi zh
75
naotoc378ffc2012-08-21 11:00:30 -070076LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/,$(LOCALEDATA_INCLUDE_LOCALES)) \
77 $(addprefix sun/util/resources/,$(LOCALEDATA_INCLUDE_LOCALES))
erikje78df742012-06-07 20:40:50 -070078
naoto85d2c712012-10-31 11:33:36 -070079# For non-US English locale data
80
81LOCALEDATA_INCLUDES += \
82 sun/text/resources/en/FormatData_en_AU.class \
83 sun/text/resources/en/FormatData_en_CA.class \
84 sun/text/resources/en/FormatData_en_GB.class \
85 sun/text/resources/en/FormatData_en_IE.class \
86 sun/text/resources/en/FormatData_en_IN.class \
87 sun/text/resources/en/FormatData_en_MT.class \
88 sun/text/resources/en/FormatData_en_NZ.class \
89 sun/text/resources/en/FormatData_en_PH.class \
90 sun/text/resources/en/FormatData_en_SG.class \
91 sun/text/resources/en/FormatData_en_ZA.class \
92 sun/util/resources/en/CalendarData_en_GB.class \
93 sun/util/resources/en/CalendarData_en_IE.class \
94 sun/util/resources/en/CalendarData_en_MT.class \
95 sun/util/resources/en/CurrencyNames_en_AU.class \
96 sun/util/resources/en/CurrencyNames_en_CA.class \
97 sun/util/resources/en/CurrencyNames_en_GB.class \
98 sun/util/resources/en/CurrencyNames_en_IE.class \
99 sun/util/resources/en/CurrencyNames_en_IN.class \
100 sun/util/resources/en/CurrencyNames_en_MT.class \
101 sun/util/resources/en/CurrencyNames_en_NZ.class \
102 sun/util/resources/en/CurrencyNames_en_PH.class \
103 sun/util/resources/en/CurrencyNames_en_SG.class \
104 sun/util/resources/en/CurrencyNames_en_ZA.class \
105 sun/util/resources/en/LocaleNames_en_MT.class \
106 sun/util/resources/en/LocaleNames_en_PH.class \
107 sun/util/resources/en/LocaleNames_en_SG.class \
108 sun/util/resources/en/TimeZoneNames_en_CA.class \
109 sun/util/resources/en/TimeZoneNames_en_GB.class \
110 sun/util/resources/en/TimeZoneNames_en_IE.class
111
erikje78df742012-06-07 20:40:50 -0700112$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\
113 SRCS:=$(JDK_OUTPUTDIR)/classes,\
114 SUFFIXES:=.class _dict _th,\
115 INCLUDES:=$(LOCALEDATA_INCLUDES),\
naotoc378ffc2012-08-21 11:00:30 -0700116 EXCLUDES:=sun/text/resources/th/BreakIteratorRules_th.class,\
ohairb71409c2012-10-26 14:23:29 -0700117 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar,\
erikje78df742012-06-07 20:40:50 -0700118 SKIP_METAINF:=true))
119
ohairb71409c2012-10-26 14:23:29 -0700120JARS+=$(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar
erikje78df742012-06-07 20:40:50 -0700121
122##########################################################################################
123# rt.jar and resources.jar are being built in the same way as in the old build. They require
124# the files to be in a certain order and converting that is not easy and will not be needed
125# in jigsaw anyway.
126
127# Exclude list for rt.jar and resources.jar
128RT_JAR_EXCLUDES := \
129 com/sun/javadoc \
130 com/sun/jdi \
131 com/sun/jarsigner \
132 com/sun/source \
133 com/sun/istack/internal/tools \
134 META-INF/services/com.sun.jdi.connect.Connector \
135 META-INF/services/com.sun.jdi.connect.spi.TransportService \
136 META-INF/services/com.sun.tools.xjc.Plugin \
137 com/sun/tools \
138 sun/jvmstat \
139 sun/nio/cs/ext \
140 sun/awt/HKSCS.class \
141 sun/awt/motif/X11GB2312\$$$$Decoder.class \
142 sun/awt/motif/X11GB2312\$$$$Encoder.class \
143 sun/awt/motif/X11GB2312.class \
144 sun/awt/motif/X11GBK\$$$$Encoder.class \
145 sun/awt/motif/X11GBK.class \
146 sun/awt/motif/X11KSC5601\$$$$Decoder.class \
147 sun/awt/motif/X11KSC5601\$$$$Encoder.class \
148 sun/awt/motif/X11KSC5601.class \
149 META-INF/services/java.nio.charset.spi.CharsetProvider \
150 sun/rmi/rmic \
151 sun/tools/asm \
152 sun/tools/java \
153 sun/tools/javac \
154 com/sun/tools/classfile \
155 com/sun/tools/javap \
156 sun/tools/jcmd \
157 sun/tools/jconsole \
158 sun/tools/jps \
159 sun/tools/jstat \
160 sun/tools/jstatd \
161 sun/tools/native2ascii \
162 sun/tools/serialver \
163 sun/tools/tree \
164 sun/tools/util \
erikj4f66f2d2012-11-03 16:27:01 -0700165 sun/security/tools/jarsigner \
erikje78df742012-06-07 20:40:50 -0700166 sun/security/provider/Sun.class \
167 sun/security/rsa/SunRsaSign.class \
168 sun/security/ssl \
169 sun/security/ec/ECDHKeyAgreement.class \
170 sun/security/ec/ECDSASignature\$$$$Raw.class \
171 sun/security/ec/ECDSASignature\$$$$SHA1.class \
172 sun/security/ec/ECDSASignature\$$$$SHA224.class \
173 sun/security/ec/ECDSASignature\$$$$SHA256.class \
174 sun/security/ec/ECDSASignature\$$$$SHA384.class \
175 sun/security/ec/ECDSASignature\$$$$SHA512.class \
176 sun/security/ec/ECDSASignature.class \
ohair46fcac92012-09-18 11:29:24 -0700177 sun/security/ec/ECKeyFactory.class \
erikje78df742012-06-07 20:40:50 -0700178 sun/security/ec/ECKeyPairGenerator.class \
179 sun/security/ec/SunEC\$$$$1.class \
180 sun/security/ec/SunEC.class \
181 sun/security/ec/SunECEntries.class \
ohair46fcac92012-09-18 11:29:24 -0700182 sun/security/mscapi \
erikje78df742012-06-07 20:40:50 -0700183 sun/security/pkcs11 \
184 com/sun/net/ssl/internal/ssl \
185 javax/crypto \
186 sun/security/internal \
187 com/sun/crypto/provider \
188 META-INF/services/com.sun.tools.attach.spi.AttachProvider \
189 com/sun/tools/attach \
190 org/relaxng/datatype \
191 com/sun/codemodel \
192 com/sun/xml/internal/dtdparser \
193 com/sun/xml/internal/rngom \
194 com/sun/xml/internal/xsom \
195 com/sun/tools/script/shell \
196 sun/tools/attach \
197 sun/tools/jstack \
198 sun/tools/jinfo \
199 sun/tools/jmap \
200 sun/net/spi/nameservice/dns \
201 META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
202 javax/swing/beaninfo \
203 javax/swing/AbstractButtonBeanInfo.class \
204 javax/swing/BoxBeanInfo.class \
205 javax/swing/JAppletBeanInfo.class \
206 javax/swing/JButtonBeanInfo.class \
207 javax/swing/JCheckBoxBeanInfo.class \
208 javax/swing/JCheckBoxMenuItemBeanInfo.class \
209 javax/swing/JColorChooserBeanInfo.class \
210 javax/swing/JComboBoxBeanInfo.class \
211 javax/swing/JComponentBeanInfo.class \
212 javax/swing/JDesktopPaneBeanInfo.class \
213 javax/swing/JDialogBeanInfo.class \
214 javax/swing/JEditorPaneBeanInfo.class \
215 javax/swing/JFileChooserBeanInfo.class \
216 javax/swing/JFormattedTextFieldBeanInfo.class \
217 javax/swing/JFrameBeanInfo.class \
218 javax/swing/JInternalFrameBeanInfo.class \
219 javax/swing/JLabelBeanInfo.class \
220 javax/swing/JLayeredPaneBeanInfo.class \
221 javax/swing/JListBeanInfo.class \
222 javax/swing/JMenuBarBeanInfo.class \
223 javax/swing/JMenuBeanInfo.class \
224 javax/swing/JMenuItemBeanInfo.class \
225 javax/swing/JOptionPaneBeanInfo.class \
226 javax/swing/JPanelBeanInfo.class \
227 javax/swing/JPasswordFieldBeanInfo.class \
228 javax/swing/JPopupMenuBeanInfo.class \
229 javax/swing/JProgressBarBeanInfo.class \
230 javax/swing/JRadioButtonBeanInfo.class \
231 javax/swing/JRadioButtonMenuItemBeanInfo.class \
232 javax/swing/JScrollBarBeanInfo.class \
233 javax/swing/JScrollPaneBeanInfo.class \
234 javax/swing/JSeparatorBeanInfo.class \
235 javax/swing/JSliderBeanInfo.class \
236 javax/swing/JSpinnerBeanInfo.class \
237 javax/swing/JSplitPaneBeanInfo.class \
238 javax/swing/JTabbedPaneBeanInfo.class \
239 javax/swing/JTableBeanInfo.class \
240 javax/swing/JTextAreaBeanInfo.class \
241 javax/swing/JTextFieldBeanInfo.class \
242 javax/swing/JTextPaneBeanInfo.class \
243 javax/swing/JToggleButtonBeanInfo.class \
244 javax/swing/JToolBarBeanInfo.class \
245 javax/swing/JTreeBeanInfo.class \
246 javax/swing/JWindowBeanInfo.class \
247 javax/swing/SwingBeanInfoBase.class \
248 javax/swing/text/JTextComponentBeanInfo.class \
249 sun/swing/BeanInfoUtils.class \
naotoc378ffc2012-08-21 11:00:30 -0700250 $(LOCALEDATA_INCLUDES) \
251 sun/text/resources/cldr \
252 sun/util/resources/cldr \
253 sun/util/cldr/CLDRLocaleDataMetaInfo.class
erikje78df742012-06-07 20:40:50 -0700254
erikjaf85fc42012-07-03 16:10:44 -0700255# These files should never be put into rt.jar
256# but due to a misstake...some are put there if embedded
257#
258ifneq ($(JAVASE_EMBEDDED), true)
259# normal (correct) case
erikje78df742012-06-07 20:40:50 -0700260RT_JAR_EXCLUDES += \
261 com/oracle/jrockit/jfr \
262 oracle/jrockit/jfr
erikjaf85fc42012-07-03 16:10:44 -0700263else
264# embedded (broken) case
265RT_JAR_EXCLUDES += \
266 oracle/jrockit/jfr/parser \
267 oracle/jrockit/jfr/tools \
268 oracle/jrockit/jfr/NativeOptions.class \
269 oracle/jrockit/jfr/RepositoryChunkHandler.class
erikje78df742012-06-07 20:40:50 -0700270endif
erikjaf85fc42012-07-03 16:10:44 -0700271
272ifeq ($(OPENJDK_TARGET_OS), macosx)
273 RT_JAR_EXCLUDES += com/sun/nio/sctp \
ohrstrom70c34532012-11-08 12:25:15 +0100274 sun/nio/ch/sctp
erikje78df742012-06-07 20:40:50 -0700275endif
276
277# Find all files in the classes dir to use as dependencies. This could be more fine granular.
278ALL_FILES_IN_CLASSES := $(shell $(FIND) $(JDK_OUTPUTDIR)/classes -type f \
ohair46fcac92012-09-18 11:29:24 -0700279 | $(GREP) -v -e '/_the\.*' -e '^_the\.*' -e 'javac_state')
erikje78df742012-06-07 20:40:50 -0700280
ohairb71409c2012-10-26 14:23:29 -0700281RT_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib/_the.rt.jar_manifest
282RESOURCE_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib/_the.resources.jar_manifest
erikje78df742012-06-07 20:40:50 -0700283
284$(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
285 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700286 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700287 $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
288 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
ohair46fcac92012-09-18 11:29:24 -0700289 $(MAINMANIFEST) >> $@.tmp
290 $(ECHO) >> $@.tmp
291 $(CAT) $(BEANMANIFEST) >> $@.tmp
292 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700293
294$(RESOURCE_JAR_MANIFEST_FILE): $(MAINMANIFEST)
295 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700296 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700297 $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
298 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
ohair46fcac92012-09-18 11:29:24 -0700299 $(MAINMANIFEST) >> $@.tmp
300 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700301
ohairb71409c2012-10-26 14:23:29 -0700302$(IMAGES_OUTPUTDIR)/lib/_the.jars.exclude: $(MAKEFILE)
erikje78df742012-06-07 20:40:50 -0700303 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700304 $(RM) $@ $@.tmp
305 $(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@.tmp)
306 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700307
ohairb71409c2012-10-26 14:23:29 -0700308$(IMAGES_OUTPUTDIR)/lib/classlist : $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
erikjaf85fc42012-07-03 16:10:44 -0700309 $(MAKEFILE)
310 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700311 $(RM) $@ $@.tmp
312 $(TOOL_ADDJSUM) $< $@.tmp
313 $(MV) $@.tmp $@
erikjaf85fc42012-07-03 16:10:44 -0700314
ohairb71409c2012-10-26 14:23:29 -0700315$(IMAGES_OUTPUTDIR)/lib/_the.jars.contents: $(BUILD_TOOLS) $(IMAGES_OUTPUTDIR)/lib/_the.jars.exclude \
316 $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
erikje78df742012-06-07 20:40:50 -0700317 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700318 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700319 ($(CD) $(JDK_OUTPUTDIR)/classes && \
320 $(TOOL_JARREORDER) \
ohairb71409c2012-10-26 14:23:29 -0700321 -o $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib/_the.jars.exclude . )
ohair46fcac92012-09-18 11:29:24 -0700322 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700323
ohairb71409c2012-10-26 14:23:29 -0700324$(IMAGES_OUTPUTDIR)/lib/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents
ohair46fcac92012-09-18 11:29:24 -0700325 $(MKDIR) -p $(@D)
326 $(RM) $@ $@.tmp
ohairb71409c2012-10-26 14:23:29 -0700327 $(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents > $@.tmp
ohair46fcac92012-09-18 11:29:24 -0700328 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700329
ohairb71409c2012-10-26 14:23:29 -0700330$(IMAGES_OUTPUTDIR)/lib/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents
ohair46fcac92012-09-18 11:29:24 -0700331 $(MKDIR) -p $(@D)
332 $(RM) $@ $@.tmp
333 $(GREP) -v -e '\.class$$' \
334 -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
ohairb71409c2012-10-26 14:23:29 -0700335 $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents > $@.tmp
ohair46fcac92012-09-18 11:29:24 -0700336 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700337
erikjaf85fc42012-07-03 16:10:44 -0700338RT_JAR_CREATE_OPTIONS := c0fm
339ifeq ($(COMPRESS_JARS), true)
340 RT_JAR_CREATE_OPTIONS := cfm
341endif
342
ohairb71409c2012-10-26 14:23:29 -0700343$(IMAGES_OUTPUTDIR)/lib/rt.jar: $(IMAGES_OUTPUTDIR)/lib/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE)
erikje78df742012-06-07 20:40:50 -0700344 $(ECHO) Creating rt.jar
ohair46fcac92012-09-18 11:29:24 -0700345 $(MKDIR) -p $(@D)
346 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700347 $(CD) $(JDK_OUTPUTDIR)/classes && \
ohair46fcac92012-09-18 11:29:24 -0700348 $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
ohairb71409c2012-10-26 14:23:29 -0700349 @$(IMAGES_OUTPUTDIR)/lib/_the.rt.jar.contents
ohair46fcac92012-09-18 11:29:24 -0700350 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700351
ohairb71409c2012-10-26 14:23:29 -0700352$(IMAGES_OUTPUTDIR)/lib/resources.jar: $(IMAGES_OUTPUTDIR)/lib/_the.resources.jar.contents \
erikje78df742012-06-07 20:40:50 -0700353 $(RESOURCE_JAR_MANIFEST_FILE)
354 $(ECHO) Creating resources.jar
ohair46fcac92012-09-18 11:29:24 -0700355 $(MKDIR) -p $(@D)
356 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700357 $(CD) $(JDK_OUTPUTDIR)/classes && \
ohair46fcac92012-09-18 11:29:24 -0700358 $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
ohairb71409c2012-10-26 14:23:29 -0700359 @$(IMAGES_OUTPUTDIR)/lib/_the.resources.jar.contents
ohair46fcac92012-09-18 11:29:24 -0700360 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700361
ohairb71409c2012-10-26 14:23:29 -0700362JARS+=$(IMAGES_OUTPUTDIR)/lib/rt.jar $(IMAGES_OUTPUTDIR)/lib/resources.jar
erikje78df742012-06-07 20:40:50 -0700363
364##########################################################################################
365
erikjaf85fc42012-07-03 16:10:44 -0700366ifneq ($(OPENJDK_TARGET_OS), windows)
erikje78df742012-06-07 20:40:50 -0700367 CHARSETS_EXTRA_FILES:=sun/awt/motif/X11GBK.class \
368 sun/awt/motif/X11GB2312\$$$$Decoder.class \
369 sun/awt/motif/X11GB2312.class \
370 sun/awt/motif/X11KSC5601\$$$$Decoder.class \
371 sun/awt/motif/X11KSC5601\$$$$Encoder.class \
372 sun/awt/motif/X11GB2312\$$$$Encoder.class \
373 sun/awt/motif/X11GBK\$$$$Encoder.class \
374 sun/awt/motif/X11KSC5601.class
375endif
376
ohairb71409c2012-10-26 14:23:29 -0700377$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,,\
erikje78df742012-06-07 20:40:50 -0700378 SRCS:=$(JDK_OUTPUTDIR)/classes, \
379 SUFFIXES:=.class .dat,\
380 INCLUDES:=sun/nio/cs/ext,\
381 EXTRA_FILES := sun/awt/HKSCS.class \
382 $(CHARSETS_EXTRA_FILES) \
383 META-INF/services/java.nio.charset.spi.CharsetProvider, \
ohairb71409c2012-10-26 14:23:29 -0700384 JAR:=$(IMAGES_OUTPUTDIR)/lib/charsets.jar, \
erikjaf85fc42012-07-03 16:10:44 -0700385 SKIP_METAINF := true, \
386 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700387
ohairb71409c2012-10-26 14:23:29 -0700388JARS+=$(IMAGES_OUTPUTDIR)/lib/charsets.jar
erikje78df742012-06-07 20:40:50 -0700389
390##########################################################################################
391
ohairb71409c2012-10-26 14:23:29 -0700392ifndef OPENJDK
erikjaf85fc42012-07-03 16:10:44 -0700393ifeq ($(ENABLE_JFR), true)
erikje78df742012-06-07 20:40:50 -0700394 $(eval $(call SetupArchive,BUILD_JFR_JAR,,\
395 SRCS:=$(JDK_OUTPUTDIR)/classes,\
396 INCLUDES:=com/oracle/jrockit/jfr \
397 oracle/jrockit/jfr,\
ohairb71409c2012-10-26 14:23:29 -0700398 JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\
erikje78df742012-06-07 20:40:50 -0700399 SKIP_METAINF:=true,\
erikjaf85fc42012-07-03 16:10:44 -0700400 MANIFEST:=$(MAINMANIFEST), \
401 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700402
ohairb71409c2012-10-26 14:23:29 -0700403 JARS+=$(IMAGES_OUTPUTDIR)/lib/jfr.jar
404endif
erikje78df742012-06-07 20:40:50 -0700405endif
406
407##########################################################################################
408
409$(eval $(call SetupArchive,BUILD_JSSE_JAR,,\
410 SRCS:=$(JDK_OUTPUTDIR)/classes,\
411 INCLUDES:=sun/security/provider/Sun.class \
412 sun/security/rsa/SunRsaSign.class \
413 sun/security/ssl \
414 com/sun/net/ssl/internal/ssl,\
ohairb71409c2012-10-26 14:23:29 -0700415 JAR:=$(IMAGES_OUTPUTDIR)/lib/jsse.jar,\
erikje78df742012-06-07 20:40:50 -0700416 SKIP_METAINF:=true,\
erikjaf85fc42012-07-03 16:10:44 -0700417 MANIFEST:=$(MAINMANIFEST), \
418 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700419
ohairb71409c2012-10-26 14:23:29 -0700420JARS+=$(IMAGES_OUTPUTDIR)/lib/jsse.jar
erikje78df742012-06-07 20:40:50 -0700421
422##########################################################################################
erikj5a79bc72012-11-28 14:10:00 +0100423# Create manifest for security jars
424
425#
426# Include these extra attributes for now, should probably take out.
427#
428JCE_MANIFEST := $(IMAGES_OUTPUTDIR)/lib/_the.security.manifest.mf
429$(JCE_MANIFEST): $(MAINMANIFEST)
430 $(MKDIR) -p $(@D)
431 $(RM) $@ $@.tmp
432 $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
433 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
434 $(MAINMANIFEST) >> $@.tmp
435 $(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
436 $(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
437 $(MV) $@.tmp $@
438
439##########################################################################################
erikje78df742012-06-07 20:40:50 -0700440
ohairb71409c2012-10-26 14:23:29 -0700441SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
erikje78df742012-06-07 20:40:50 -0700442
ohair46fcac92012-09-18 11:29:24 -0700443ifndef OPENJDK
erikje78df742012-06-07 20:40:50 -0700444
ohair46fcac92012-09-18 11:29:24 -0700445 SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
erikje78df742012-06-07 20:40:50 -0700446
ohair46fcac92012-09-18 11:29:24 -0700447 $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700448 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
ohair46fcac92012-09-18 11:29:24 -0700449 $(MKDIR) -p $(@D)
450 $(RM) $@
451 $(CP) $< $@
erikje78df742012-06-07 20:40:50 -0700452
ohair46fcac92012-09-18 11:29:24 -0700453else
erikje78df742012-06-07 20:40:50 -0700454
ohairb71409c2012-10-26 14:23:29 -0700455 $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,,\
ohair46fcac92012-09-18 11:29:24 -0700456 SRCS:=$(JDK_OUTPUTDIR)/classes, \
457 SUFFIXES:=.class,\
458 INCLUDES:=sun/security/pkcs11,\
459 JAR:=$(SUNPKCS11_JAR_DST), \
erikj5a79bc72012-11-28 14:10:00 +0100460 MANIFEST:=$(JCE_MANIFEST), \
ohair46fcac92012-09-18 11:29:24 -0700461 SKIP_METAINF := true))
erikje78df742012-06-07 20:40:50 -0700462
erikj5a79bc72012-11-28 14:10:00 +0100463 $(SUNPKCS11_JAR_DST): $(JCE_MANIFEST)
464
erikje78df742012-06-07 20:40:50 -0700465endif
466
ohair46fcac92012-09-18 11:29:24 -0700467JARS += $(SUNPKCS11_JAR_DST)
468
erikje78df742012-06-07 20:40:50 -0700469##########################################################################################
470
ohairb71409c2012-10-26 14:23:29 -0700471SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar
erikje78df742012-06-07 20:40:50 -0700472
473ifndef OPENJDK
474
erikj5a79bc72012-11-28 14:10:00 +0100475 SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
erikje78df742012-06-07 20:40:50 -0700476
erikj5a79bc72012-11-28 14:10:00 +0100477 $(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700478 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
ohair46fcac92012-09-18 11:29:24 -0700479 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700480 $(RM) $@
481 $(CP) $< $@
482
483else
484
erikj5a79bc72012-11-28 14:10:00 +0100485 $(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
erikje78df742012-06-07 20:40:50 -0700486 SRCS:=$(JDK_OUTPUTDIR)/classes, \
487 SUFFIXES:=.class,\
488 INCLUDES:=sun/security/ec,\
erikje78df742012-06-07 20:40:50 -0700489 JAR:=$(SUNEC_JAR_DST), \
erikj5a79bc72012-11-28 14:10:00 +0100490 MANIFEST:=$(JCE_MANIFEST), \
erikje78df742012-06-07 20:40:50 -0700491 SKIP_METAINF := true))
492
erikj5a79bc72012-11-28 14:10:00 +0100493 $(SUNEC_JAR_DST): $(JCE_MANIFEST)
494
erikje78df742012-06-07 20:40:50 -0700495endif
496
497JARS += $(SUNEC_JAR_DST)
498
499##########################################################################################
500
501$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,,\
502 SRCS:=$(JDK_OUTPUTDIR)/classes,\
503 SUFFIXES:=BeanInfo.class .gif,\
504 INCLUDES:=javax/swing sun/swing,\
505 EXCLUDES:=javax/swing/plaf,\
506 EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
ohairb71409c2012-10-26 14:23:29 -0700507 JAR:=$(IMAGES_OUTPUTDIR)/lib/dt.jar,\
erikje78df742012-06-07 20:40:50 -0700508 SKIP_METAINF:=true))
509
ohairb71409c2012-10-26 14:23:29 -0700510JARS+=$(IMAGES_OUTPUTDIR)/lib/dt.jar
erikje78df742012-06-07 20:40:50 -0700511
512##########################################################################################
513
ohairb71409c2012-10-26 14:23:29 -0700514SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
erikje78df742012-06-07 20:40:50 -0700515
516ifndef OPENJDK
517 SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
518
519 $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700520 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
ohair46fcac92012-09-18 11:29:24 -0700521 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700522 $(RM) $@
523 $(CP) $< $@
524else
525
ohairb71409c2012-10-26 14:23:29 -0700526 $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
erikje78df742012-06-07 20:40:50 -0700527 SRCS:=$(JDK_OUTPUTDIR)/classes, \
528 SUFFIXES:=.class,\
529 INCLUDES:= com/sun/crypto/provider,\
530 JAR:=$(SUNJCE_PROVIDER_JAR_DST), \
erikj5a79bc72012-11-28 14:10:00 +0100531 MANIFEST:=$(JCE_MANIFEST), \
erikje78df742012-06-07 20:40:50 -0700532 SKIP_METAINF := true))
erikj5a79bc72012-11-28 14:10:00 +0100533
534 $(SUNJCE_PROVIDER_JAR_DST): $(JCE_MANIFEST)
535
erikje78df742012-06-07 20:40:50 -0700536endif
537
538JARS += $(SUNJCE_PROVIDER_JAR_DST)
539
ohairb71409c2012-10-26 14:23:29 -0700540JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
erikje78df742012-06-07 20:40:50 -0700541
542ifndef OPENJDK
543
erikj5a79bc72012-11-28 14:10:00 +0100544 JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
erikje78df742012-06-07 20:40:50 -0700545
erikj5a79bc72012-11-28 14:10:00 +0100546 $(JCE_JAR_DST) : $(JCE_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700547 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
ohair46fcac92012-09-18 11:29:24 -0700548 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700549 $(RM) $@
550 $(CP) $< $@
551
552else
553
erikj5a79bc72012-11-28 14:10:00 +0100554 $(eval $(call SetupArchive,BUILD_JCE_JAR,,\
erikje78df742012-06-07 20:40:50 -0700555 SRCS:=$(JDK_OUTPUTDIR)/classes, \
556 SUFFIXES:=.class,\
557 INCLUDES:= javax/crypto sun/security/internal,\
558 JAR:=$(JCE_JAR_DST), \
erikj5a79bc72012-11-28 14:10:00 +0100559 MANIFEST:=$(JCE_MANIFEST), \
erikje78df742012-06-07 20:40:50 -0700560 SKIP_METAINF := true))
erikj5a79bc72012-11-28 14:10:00 +0100561
562 $(JCE_JAR_DST): $(JCE_MANIFEST)
563
erikje78df742012-06-07 20:40:50 -0700564endif
565
566JARS += $(JCE_JAR_DST)
567
568##########################################################################################
569
570ifdef OPENJDK
571
572#
573# TODO fix so that SetupArchive does not write files into SRCS
574# then we don't need this extra copying
575#
erikjffb0d242012-10-29 13:55:47 -0700576# NOTE: We currently do not place restrictions on our limited export
577# policy. This was not a typo.
578#
ohairb71409c2012-10-26 14:23:29 -0700579US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
erikje78df742012-06-07 20:40:50 -0700580US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
ohairb71409c2012-10-26 14:23:29 -0700581US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
erikje78df742012-06-07 20:40:50 -0700582
583$(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
584 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700585 $(RM) $@
erikje78df742012-06-07 20:40:50 -0700586 $(CP) $< $@
587
588US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
589
590$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
591 SRCS:=$(US_EXPORT_POLICY_JAR_TMP), \
592 SUFFIXES:= .policy,\
593 JAR:=$(US_EXPORT_POLICY_JAR_DST), \
594 EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
595 SKIP_METAINF := true))
596
597JARS += $(US_EXPORT_POLICY_JAR_DST)
598
599endif
600
601##########################################################################################
602
603
604ifdef OPENJDK
605
606#
607# TODO fix so that SetupArchive does not write files into SRCS
608# then we don't need this extra copying
609#
ohairb71409c2012-10-26 14:23:29 -0700610LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
ohairb71409c2012-10-26 14:23:29 -0700611LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
erikje78df742012-06-07 20:40:50 -0700612
erikjffb0d242012-10-29 13:55:47 -0700613ifeq ($(UNLIMITED_CRYPTO), true)
614 LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
615 LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
616 LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
617else
618 LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
619 LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
ohairb71409c2012-10-26 14:23:29 -0700620 $(LOCAL_POLICY_JAR_TMP)/default_local.policy
erikjffb0d242012-10-29 13:55:47 -0700621 LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
622endif
erikje78df742012-06-07 20:40:50 -0700623
624$(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
625 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700626 $(RM) $@
erikje78df742012-06-07 20:40:50 -0700627 $(CP) $< $@
628
629$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
630 SRCS:=$(LOCAL_POLICY_JAR_TMP),\
631 SUFFIXES:= .policy,\
632 JAR:=$(LOCAL_POLICY_JAR_DST), \
erikjffb0d242012-10-29 13:55:47 -0700633 EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
erikje78df742012-06-07 20:40:50 -0700634 SKIP_METAINF := true))
635
636JARS += $(LOCAL_POLICY_JAR_DST)
637
638endif
639
640##########################################################################################
641
erikjaf85fc42012-07-03 16:10:44 -0700642ifeq ($(OPENJDK_TARGET_OS),windows)
erikje78df742012-06-07 20:40:50 -0700643
ohairb71409c2012-10-26 14:23:29 -0700644SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
erikje78df742012-06-07 20:40:50 -0700645
646ifndef OPENJDK
647SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
648
649$(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700650 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
ohair46fcac92012-09-18 11:29:24 -0700651 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700652 $(RM) $@
653 $(CP) $< $@
654
655else
656
ohairb71409c2012-10-26 14:23:29 -0700657$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,,\
erikje78df742012-06-07 20:40:50 -0700658 SRCS:=$(JDK_OUTPUTDIR)/classes, \
659 SUFFIXES:=.class,\
660 INCLUDES:= sun/security/mscapi,\
661 JAR:=$(SUNMSCAPI_JAR_DST), \
ohair46fcac92012-09-18 11:29:24 -0700662 SKIP_METAINF:=true))
erikje78df742012-06-07 20:40:50 -0700663endif
664
665JARS += $(SUNMSCAPI_JAR_DST)
666
667endif
668
669##########################################################################################
670
erikjaf85fc42012-07-03 16:10:44 -0700671ifeq ($(OPENJDK_TARGET_OS),solaris)
erikje78df742012-06-07 20:40:50 -0700672ifndef OPENJDK
673
ohairb71409c2012-10-26 14:23:29 -0700674UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
erikje78df742012-06-07 20:40:50 -0700675UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
676
677$(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700678 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
ohair46fcac92012-09-18 11:29:24 -0700679 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700680 $(RM) $@
681 $(CP) $< $@
682
683JARS += $(UCRYPTO_JAR_DST)
684
685endif
686endif
687
688##########################################################################################
689
naotoc378ffc2012-08-21 11:00:30 -0700690# Get the CLDRVERSION
691include GensrcCLDR.gmk
692
ohairb71409c2012-10-26 14:23:29 -0700693CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
naotoc378ffc2012-08-21 11:00:30 -0700694
ohairb71409c2012-10-26 14:23:29 -0700695$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR,,\
naotoc378ffc2012-08-21 11:00:30 -0700696 SRCS:=$(JDK_OUTPUTDIR)/classes,\
697 SUFFIXES:=.class,\
698 INCLUDES:=sun/text/resources/cldr \
699 sun/util/cldr \
700 sun/util/resources/cldr,\
701 EXCLUDES:=sun/util/cldr/CLDRLocaleProviderAdapter,\
702 JAR:=$(CLDRDATA_JAR_DST),\
703 EXTRA_MANIFEST_ATTR:=CLDR-Version: $(CLDRVERSION),\
704 SKIP_METAINF:=true))
705
706JARS += $(CLDRDATA_JAR_DST)
707
708##########################################################################################
709
erikje78df742012-06-07 20:40:50 -0700710TOOLS_JAR_INCLUDES := \
711 sun/tools/asm \
712 sun/tools/jar \
713 sun/tools/java \
714 sun/tools/javac \
715 sun/tools/jcmd \
716 sun/tools/jps \
717 sun/tools/jstat \
718 sun/tools/jstatd \
719 sun/tools/native2ascii \
720 sun/tools/serialver \
721 sun/tools/tree \
722 sun/tools/util \
erikj4f66f2d2012-11-03 16:27:01 -0700723 sun/security/tools/jarsigner \
erikje78df742012-06-07 20:40:50 -0700724 sun/rmi/rmic \
725 sun/applet \
726 sun/jvmstat \
727 com/sun/javadoc \
728 com/sun/jdi \
729 com/sun/jarsigner \
730 com/sun/source \
731 com/sun/tools/classfile \
732 com/sun/tools/doclets \
733 com/sun/tools/example/debug/expr \
734 com/sun/tools/example/debug/tty \
735 com/sun/tools/extcheck \
736 com/sun/tools/hat \
737 com/sun/tools/javac \
738 com/sun/tools/javadoc \
739 com/sun/tools/javah \
740 com/sun/tools/javap \
741 com/sun/tools/corba \
742 com/sun/tools/internal/xjc \
743 com/sun/tools/internal/ws \
744 com/sun/istack/internal/tools \
745 com/sun/tools/internal/jxc/ap \
746 com/sun/tools/internal/ws/wscompile/plugin/at_generated \
747 com/sun/codemodel \
748 com/sun/tools/internal/jxc \
749 com/sun/xml/internal/rngom \
750 com/sun/xml/internal/xsom \
751 org/relaxng/datatype \
752 com/sun/xml/internal/dtdparser \
753 com/sun/tools/jdi \
754 com/sun/tools/script/shell \
755 com/sun/tools/attach \
756 sun/tools/attach \
757 sun/tools/jstack \
758 sun/tools/jinfo \
759 sun/tools/jmap
760
ohairb71409c2012-10-26 14:23:29 -0700761# The sjavac tools is not ready for public consumption.
762TOOLS_JAR_EXCLUDES=com/sun/tools/sjavac
763
764$(eval $(call SetupArchive,BUILD_TOOLS_JAR,,\
erikje78df742012-06-07 20:40:50 -0700765 SRCS:=$(JDK_OUTPUTDIR)/classes,\
766 SUFFIXES:=.class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
767 Tool aliasmap options,\
768 INCLUDES:=$(TOOLS_JAR_INCLUDES),\
ohairb71409c2012-10-26 14:23:29 -0700769 EXCLUDES:=$(TOOLS_JAR_EXCLUDES),\
erikje78df742012-06-07 20:40:50 -0700770 EXTRA_FILES:=META-INF/services/com.sun.jdi.connect.Connector \
771 META-INF/services/com.sun.jdi.connect.spi.TransportService \
772 META-INF/services/com.sun.tools.attach.spi.AttachProvider \
773 META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
774 META-INF/services/com.sun.tools.internal.xjc.Plugin,\
ohairb71409c2012-10-26 14:23:29 -0700775 JAR:=$(IMAGES_OUTPUTDIR)/lib/tools.jar,\
erikjaf85fc42012-07-03 16:10:44 -0700776 SKIP_METAINF:=true, \
777 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700778
ohairb71409c2012-10-26 14:23:29 -0700779JARS+=$(IMAGES_OUTPUTDIR)/lib/tools.jar
erikje78df742012-06-07 20:40:50 -0700780
781##########################################################################################
782
ohair46fcac92012-09-18 11:29:24 -0700783include javadoc/CORE_PKGS.gmk
784include javadoc/NON_CORE_PKGS.gmk
erikje78df742012-06-07 20:40:50 -0700785
786# The compiler should not issue a "Proprietary" warning when compiling
787# classes in the com.sun.java.swing.plaf packages, since we've always
788# allowed, and even advocated, extending them (see bug 6476749).
789#
790# This approach is NOT to be used as a general purpose way to avoid such
791# compiler warnings for non-core packages. The correct way is to document
792# the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
793# definition.
794#
795# Swing has taken this approach only as a temporary measure to avoid
796# the compiler warnings until we can properly document these packages.
797# This is covered under 6491853.
798EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
799 com.sun.java.swing.plaf.motif \
800 com.sun.java.swing.plaf.gtk
801
802#
803# Include the exported private packages in ct.sym.
804# This is an interim solution until the ct.sym is replaced
805# with a new module system (being discussed for JDK 8).
806#
807EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
808 com.oracle.net \
809 com.oracle.nio
810
ohairb71409c2012-10-26 14:23:29 -0700811$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
ohair46fcac92012-09-18 11:29:24 -0700812 $(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
erikje78df742012-06-07 20:40:50 -0700813 $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
814 $(JAVA) \
815 -Xbootclasspath/a:$(JDK_OUTPUTDIR)/classes \
816 $(JAVAC_JARS) \
817 -XDprocess.packages -proc:only \
818 -processor com.sun.tools.javac.sym.CreateSymbols \
ohairb71409c2012-10-26 14:23:29 -0700819 -Acom.sun.tools.javac.sym.Jar=$(IMAGES_OUTPUTDIR)/lib/rt.jar \
erikje78df742012-06-07 20:40:50 -0700820 -Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
821 $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
822 $(TOUCH) $@
823
ohairb71409c2012-10-26 14:23:29 -0700824$(shell $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols)
erikje78df742012-06-07 20:40:50 -0700825$(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
826 SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
827 INCLUDES:=META-INF/sym,\
ohairb71409c2012-10-26 14:23:29 -0700828 JAR:=$(IMAGES_OUTPUTDIR)/lib/ct.sym, \
erikjaf85fc42012-07-03 16:10:44 -0700829 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700830
ohairb71409c2012-10-26 14:23:29 -0700831JARS+=$(IMAGES_OUTPUTDIR)/lib/ct.sym
erikje78df742012-06-07 20:40:50 -0700832
833##########################################################################################
834
835SRC_ZIP_INCLUDES = \
836 java/applet \
837 java/awt \
838 java/beans \
839 java/io \
840 java/lang \
841 java/math \
842 java/net \
843 java/nio \
844 java/rmi \
845 java/security \
846 java/sql \
847 java/text \
848 java/util \
849 com/sun/corba \
850 com/sun/image/codec/jpeg \
851 com/sun/imageio \
852 com/sun/java/swing \
853 com/sun/javadoc \
854 com/sun/jmx \
855 com/sun/source \
856 com/sun/naming \
857 com/sun/security/auth \
858 com/sun/security/jgss \
859 javax/accessibility \
860 javax/annotation \
861 javax/script \
862 javax/imageio \
863 javax/lang \
864 javax/management \
865 javax/naming \
866 javax/print \
867 javax/rmi \
868 javax/security \
869 javax/sound \
870 javax/sql \
871 javax/swing \
872 javax/tools \
873 javax/xml \
874 com/sun/org/apache \
875 com/sun/java_cup \
876 com/sun/jlex \
877 org/ietf \
878 org/omg \
879 org/w3c/dom \
ohair46fcac92012-09-18 11:29:24 -0700880 org/xml/sax \
881 sunw
erikje78df742012-06-07 20:40:50 -0700882
ohair46fcac92012-09-18 11:29:24 -0700883SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
erikje78df742012-06-07 20:40:50 -0700884SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
885SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/impsrc
886SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
887ifndef OPENJDK
888 SRC_ZIP_SRCS += $(JDK_TOPDIR)/src/closed/share/classes
889endif
890
891# Need to copy launcher src files into desired directory structure
892# before zipping the sources.
893LAUNCHER_SRC_FILES := $(wildcard $(JDK_TOPDIR)/src/share/bin/*) \
ohair46fcac92012-09-18 11:29:24 -0700894 $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/java_md*)
erikje78df742012-06-07 20:40:50 -0700895LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
ohair46fcac92012-09-18 11:29:24 -0700896 $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
erikje78df742012-06-07 20:40:50 -0700897 $(LAUNCHER_SRC_FILES)))
898
899$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
900 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700901 $(RM) $@
erikje78df742012-06-07 20:40:50 -0700902 $(CP) $< $@
903
ohair46fcac92012-09-18 11:29:24 -0700904$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%
erikje78df742012-06-07 20:40:50 -0700905 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700906 $(RM) $@
erikje78df742012-06-07 20:40:50 -0700907 $(CP) $< $@
908
909$(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
910
ohairb71409c2012-10-26 14:23:29 -0700911# This dir needs to exist before macro is evaluated to avoid warning from find.
912$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/src))
erikje78df742012-06-07 20:40:50 -0700913$(eval $(call SetupZipArchive,BUILD_SRC_ZIP,\
914 SRC:=$(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src,\
915 INCLUDES:=$(SRC_ZIP_INCLUDES) launcher,\
ohairb71409c2012-10-26 14:23:29 -0700916 EXCLUDES:=javax/swing/beaninfo,\
erikje78df742012-06-07 20:40:50 -0700917 SUFFIXES:=.java .c .h,\
918 ZIP:=$(IMAGES_OUTPUTDIR)/src.zip,\
919 EXTRA_DEPS:=$(LAUNCHER_ZIP_SRC)))
920
921JARS+=$(IMAGES_OUTPUTDIR)/src.zip
922
923##########################################################################################
924
ohair46fcac92012-09-18 11:29:24 -0700925-include $(CUSTOM_MAKE_DIR)/CreateJars.gmk
926
927##########################################################################################
928
erikje78df742012-06-07 20:40:50 -0700929all: $(JARS)
930
931.PHONY: default all