blob: 65b506a03963ee8660a8e99362e8737b5b31a71a [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##########################################################################################
423
ohairb71409c2012-10-26 14:23:29 -0700424SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
erikje78df742012-06-07 20:40:50 -0700425
ohair46fcac92012-09-18 11:29:24 -0700426ifndef OPENJDK
erikje78df742012-06-07 20:40:50 -0700427
ohair46fcac92012-09-18 11:29:24 -0700428 SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
erikje78df742012-06-07 20:40:50 -0700429
ohair46fcac92012-09-18 11:29:24 -0700430 $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700431 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
ohair46fcac92012-09-18 11:29:24 -0700432 $(MKDIR) -p $(@D)
433 $(RM) $@
434 $(CP) $< $@
erikje78df742012-06-07 20:40:50 -0700435
ohair46fcac92012-09-18 11:29:24 -0700436else
erikje78df742012-06-07 20:40:50 -0700437
ohairb71409c2012-10-26 14:23:29 -0700438 $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,,\
ohair46fcac92012-09-18 11:29:24 -0700439 SRCS:=$(JDK_OUTPUTDIR)/classes, \
440 SUFFIXES:=.class,\
441 INCLUDES:=sun/security/pkcs11,\
442 JAR:=$(SUNPKCS11_JAR_DST), \
443 SKIP_METAINF := true))
erikje78df742012-06-07 20:40:50 -0700444
erikje78df742012-06-07 20:40:50 -0700445endif
446
ohair46fcac92012-09-18 11:29:24 -0700447JARS += $(SUNPKCS11_JAR_DST)
448
erikje78df742012-06-07 20:40:50 -0700449##########################################################################################
450
ohairb71409c2012-10-26 14:23:29 -0700451SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar
erikje78df742012-06-07 20:40:50 -0700452
453ifndef OPENJDK
454
455SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
456
457$(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700458 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
ohair46fcac92012-09-18 11:29:24 -0700459 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700460 $(RM) $@
461 $(CP) $< $@
462
463else
464
465$(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
466 SRCS:=$(JDK_OUTPUTDIR)/classes, \
467 SUFFIXES:=.class,\
468 INCLUDES:=sun/security/ec,\
erikje78df742012-06-07 20:40:50 -0700469 JAR:=$(SUNEC_JAR_DST), \
470 SKIP_METAINF := true))
471
472endif
473
474JARS += $(SUNEC_JAR_DST)
475
476##########################################################################################
477
478$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,,\
479 SRCS:=$(JDK_OUTPUTDIR)/classes,\
480 SUFFIXES:=BeanInfo.class .gif,\
481 INCLUDES:=javax/swing sun/swing,\
482 EXCLUDES:=javax/swing/plaf,\
483 EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
ohairb71409c2012-10-26 14:23:29 -0700484 JAR:=$(IMAGES_OUTPUTDIR)/lib/dt.jar,\
erikje78df742012-06-07 20:40:50 -0700485 SKIP_METAINF:=true))
486
ohairb71409c2012-10-26 14:23:29 -0700487JARS+=$(IMAGES_OUTPUTDIR)/lib/dt.jar
erikje78df742012-06-07 20:40:50 -0700488
489##########################################################################################
490
ohairb71409c2012-10-26 14:23:29 -0700491SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
erikje78df742012-06-07 20:40:50 -0700492
493ifndef OPENJDK
494 SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
495
496 $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700497 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
ohair46fcac92012-09-18 11:29:24 -0700498 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700499 $(RM) $@
500 $(CP) $< $@
501else
502
ohairb71409c2012-10-26 14:23:29 -0700503 $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
erikje78df742012-06-07 20:40:50 -0700504 SRCS:=$(JDK_OUTPUTDIR)/classes, \
505 SUFFIXES:=.class,\
506 INCLUDES:= com/sun/crypto/provider,\
507 JAR:=$(SUNJCE_PROVIDER_JAR_DST), \
508 MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
509 EXTRA_MANIFEST_ATTR := Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
510 SKIP_METAINF := true))
511endif
512
513JARS += $(SUNJCE_PROVIDER_JAR_DST)
514
ohairb71409c2012-10-26 14:23:29 -0700515JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
erikje78df742012-06-07 20:40:50 -0700516
517ifndef OPENJDK
518
519JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
520
521$(JCE_JAR_DST) : $(JCE_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700522 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
ohair46fcac92012-09-18 11:29:24 -0700523 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700524 $(RM) $@
525 $(CP) $< $@
526
527else
528
ohairb71409c2012-10-26 14:23:29 -0700529$(eval $(call SetupArchive,BUILD_JCE_JAR,,\
erikje78df742012-06-07 20:40:50 -0700530 SRCS:=$(JDK_OUTPUTDIR)/classes, \
531 SUFFIXES:=.class,\
532 INCLUDES:= javax/crypto sun/security/internal,\
533 JAR:=$(JCE_JAR_DST), \
534 MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
535 EXTRA_MANIFEST_ATTR := Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
536 SKIP_METAINF := true))
537endif
538
539JARS += $(JCE_JAR_DST)
540
541##########################################################################################
542
543ifdef OPENJDK
544
545#
546# TODO fix so that SetupArchive does not write files into SRCS
547# then we don't need this extra copying
548#
erikjffb0d242012-10-29 13:55:47 -0700549# NOTE: We currently do not place restrictions on our limited export
550# policy. This was not a typo.
551#
ohairb71409c2012-10-26 14:23:29 -0700552US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
erikje78df742012-06-07 20:40:50 -0700553US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
ohairb71409c2012-10-26 14:23:29 -0700554US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
erikje78df742012-06-07 20:40:50 -0700555
556$(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
557 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700558 $(RM) $@
erikje78df742012-06-07 20:40:50 -0700559 $(CP) $< $@
560
561US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
562
563$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
564 SRCS:=$(US_EXPORT_POLICY_JAR_TMP), \
565 SUFFIXES:= .policy,\
566 JAR:=$(US_EXPORT_POLICY_JAR_DST), \
567 EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
568 SKIP_METAINF := true))
569
570JARS += $(US_EXPORT_POLICY_JAR_DST)
571
572endif
573
574##########################################################################################
575
576
577ifdef OPENJDK
578
579#
580# TODO fix so that SetupArchive does not write files into SRCS
581# then we don't need this extra copying
582#
ohairb71409c2012-10-26 14:23:29 -0700583LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
ohairb71409c2012-10-26 14:23:29 -0700584LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
erikje78df742012-06-07 20:40:50 -0700585
erikjffb0d242012-10-29 13:55:47 -0700586ifeq ($(UNLIMITED_CRYPTO), true)
587 LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
588 LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
589 LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
590else
591 LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
592 LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
ohairb71409c2012-10-26 14:23:29 -0700593 $(LOCAL_POLICY_JAR_TMP)/default_local.policy
erikjffb0d242012-10-29 13:55:47 -0700594 LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
595endif
erikje78df742012-06-07 20:40:50 -0700596
597$(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
598 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700599 $(RM) $@
erikje78df742012-06-07 20:40:50 -0700600 $(CP) $< $@
601
602$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
603 SRCS:=$(LOCAL_POLICY_JAR_TMP),\
604 SUFFIXES:= .policy,\
605 JAR:=$(LOCAL_POLICY_JAR_DST), \
erikjffb0d242012-10-29 13:55:47 -0700606 EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
erikje78df742012-06-07 20:40:50 -0700607 SKIP_METAINF := true))
608
609JARS += $(LOCAL_POLICY_JAR_DST)
610
611endif
612
613##########################################################################################
614
erikjaf85fc42012-07-03 16:10:44 -0700615ifeq ($(OPENJDK_TARGET_OS),windows)
erikje78df742012-06-07 20:40:50 -0700616
ohairb71409c2012-10-26 14:23:29 -0700617SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
erikje78df742012-06-07 20:40:50 -0700618
619ifndef OPENJDK
620SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
621
622$(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700623 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
ohair46fcac92012-09-18 11:29:24 -0700624 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700625 $(RM) $@
626 $(CP) $< $@
627
628else
629
ohairb71409c2012-10-26 14:23:29 -0700630$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,,\
erikje78df742012-06-07 20:40:50 -0700631 SRCS:=$(JDK_OUTPUTDIR)/classes, \
632 SUFFIXES:=.class,\
633 INCLUDES:= sun/security/mscapi,\
634 JAR:=$(SUNMSCAPI_JAR_DST), \
ohair46fcac92012-09-18 11:29:24 -0700635 SKIP_METAINF:=true))
erikje78df742012-06-07 20:40:50 -0700636endif
637
638JARS += $(SUNMSCAPI_JAR_DST)
639
640endif
641
642##########################################################################################
643
erikjaf85fc42012-07-03 16:10:44 -0700644ifeq ($(OPENJDK_TARGET_OS),solaris)
erikje78df742012-06-07 20:40:50 -0700645ifndef OPENJDK
646
ohairb71409c2012-10-26 14:23:29 -0700647UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
erikje78df742012-06-07 20:40:50 -0700648UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
649
650$(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700651 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
ohair46fcac92012-09-18 11:29:24 -0700652 $(MKDIR) -p $(@D)
erikje78df742012-06-07 20:40:50 -0700653 $(RM) $@
654 $(CP) $< $@
655
656JARS += $(UCRYPTO_JAR_DST)
657
658endif
659endif
660
661##########################################################################################
662
naotoc378ffc2012-08-21 11:00:30 -0700663# Get the CLDRVERSION
664include GensrcCLDR.gmk
665
ohairb71409c2012-10-26 14:23:29 -0700666CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
naotoc378ffc2012-08-21 11:00:30 -0700667
ohairb71409c2012-10-26 14:23:29 -0700668$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR,,\
naotoc378ffc2012-08-21 11:00:30 -0700669 SRCS:=$(JDK_OUTPUTDIR)/classes,\
670 SUFFIXES:=.class,\
671 INCLUDES:=sun/text/resources/cldr \
672 sun/util/cldr \
673 sun/util/resources/cldr,\
674 EXCLUDES:=sun/util/cldr/CLDRLocaleProviderAdapter,\
675 JAR:=$(CLDRDATA_JAR_DST),\
676 EXTRA_MANIFEST_ATTR:=CLDR-Version: $(CLDRVERSION),\
677 SKIP_METAINF:=true))
678
679JARS += $(CLDRDATA_JAR_DST)
680
681##########################################################################################
682
erikje78df742012-06-07 20:40:50 -0700683TOOLS_JAR_INCLUDES := \
684 sun/tools/asm \
685 sun/tools/jar \
686 sun/tools/java \
687 sun/tools/javac \
688 sun/tools/jcmd \
689 sun/tools/jps \
690 sun/tools/jstat \
691 sun/tools/jstatd \
692 sun/tools/native2ascii \
693 sun/tools/serialver \
694 sun/tools/tree \
695 sun/tools/util \
erikj4f66f2d2012-11-03 16:27:01 -0700696 sun/security/tools/jarsigner \
erikje78df742012-06-07 20:40:50 -0700697 sun/rmi/rmic \
698 sun/applet \
699 sun/jvmstat \
700 com/sun/javadoc \
701 com/sun/jdi \
702 com/sun/jarsigner \
703 com/sun/source \
704 com/sun/tools/classfile \
705 com/sun/tools/doclets \
706 com/sun/tools/example/debug/expr \
707 com/sun/tools/example/debug/tty \
708 com/sun/tools/extcheck \
709 com/sun/tools/hat \
710 com/sun/tools/javac \
711 com/sun/tools/javadoc \
712 com/sun/tools/javah \
713 com/sun/tools/javap \
714 com/sun/tools/corba \
715 com/sun/tools/internal/xjc \
716 com/sun/tools/internal/ws \
717 com/sun/istack/internal/tools \
718 com/sun/tools/internal/jxc/ap \
719 com/sun/tools/internal/ws/wscompile/plugin/at_generated \
720 com/sun/codemodel \
721 com/sun/tools/internal/jxc \
722 com/sun/xml/internal/rngom \
723 com/sun/xml/internal/xsom \
724 org/relaxng/datatype \
725 com/sun/xml/internal/dtdparser \
726 com/sun/tools/jdi \
727 com/sun/tools/script/shell \
728 com/sun/tools/attach \
729 sun/tools/attach \
730 sun/tools/jstack \
731 sun/tools/jinfo \
732 sun/tools/jmap
733
ohairb71409c2012-10-26 14:23:29 -0700734# The sjavac tools is not ready for public consumption.
735TOOLS_JAR_EXCLUDES=com/sun/tools/sjavac
736
737$(eval $(call SetupArchive,BUILD_TOOLS_JAR,,\
erikje78df742012-06-07 20:40:50 -0700738 SRCS:=$(JDK_OUTPUTDIR)/classes,\
739 SUFFIXES:=.class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
740 Tool aliasmap options,\
741 INCLUDES:=$(TOOLS_JAR_INCLUDES),\
ohairb71409c2012-10-26 14:23:29 -0700742 EXCLUDES:=$(TOOLS_JAR_EXCLUDES),\
erikje78df742012-06-07 20:40:50 -0700743 EXTRA_FILES:=META-INF/services/com.sun.jdi.connect.Connector \
744 META-INF/services/com.sun.jdi.connect.spi.TransportService \
745 META-INF/services/com.sun.tools.attach.spi.AttachProvider \
746 META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
747 META-INF/services/com.sun.tools.internal.xjc.Plugin,\
ohairb71409c2012-10-26 14:23:29 -0700748 JAR:=$(IMAGES_OUTPUTDIR)/lib/tools.jar,\
erikjaf85fc42012-07-03 16:10:44 -0700749 SKIP_METAINF:=true, \
750 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700751
ohairb71409c2012-10-26 14:23:29 -0700752JARS+=$(IMAGES_OUTPUTDIR)/lib/tools.jar
erikje78df742012-06-07 20:40:50 -0700753
754##########################################################################################
755
ohair46fcac92012-09-18 11:29:24 -0700756include javadoc/CORE_PKGS.gmk
757include javadoc/NON_CORE_PKGS.gmk
erikje78df742012-06-07 20:40:50 -0700758
759# The compiler should not issue a "Proprietary" warning when compiling
760# classes in the com.sun.java.swing.plaf packages, since we've always
761# allowed, and even advocated, extending them (see bug 6476749).
762#
763# This approach is NOT to be used as a general purpose way to avoid such
764# compiler warnings for non-core packages. The correct way is to document
765# the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
766# definition.
767#
768# Swing has taken this approach only as a temporary measure to avoid
769# the compiler warnings until we can properly document these packages.
770# This is covered under 6491853.
771EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
772 com.sun.java.swing.plaf.motif \
773 com.sun.java.swing.plaf.gtk
774
775#
776# Include the exported private packages in ct.sym.
777# This is an interim solution until the ct.sym is replaced
778# with a new module system (being discussed for JDK 8).
779#
780EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
781 com.oracle.net \
782 com.oracle.nio
783
ohairb71409c2012-10-26 14:23:29 -0700784$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
ohair46fcac92012-09-18 11:29:24 -0700785 $(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
erikje78df742012-06-07 20:40:50 -0700786 $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
787 $(JAVA) \
788 -Xbootclasspath/a:$(JDK_OUTPUTDIR)/classes \
789 $(JAVAC_JARS) \
790 -XDprocess.packages -proc:only \
791 -processor com.sun.tools.javac.sym.CreateSymbols \
ohairb71409c2012-10-26 14:23:29 -0700792 -Acom.sun.tools.javac.sym.Jar=$(IMAGES_OUTPUTDIR)/lib/rt.jar \
erikje78df742012-06-07 20:40:50 -0700793 -Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
794 $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
795 $(TOUCH) $@
796
ohairb71409c2012-10-26 14:23:29 -0700797$(shell $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols)
erikje78df742012-06-07 20:40:50 -0700798$(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
799 SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
800 INCLUDES:=META-INF/sym,\
ohairb71409c2012-10-26 14:23:29 -0700801 JAR:=$(IMAGES_OUTPUTDIR)/lib/ct.sym, \
erikjaf85fc42012-07-03 16:10:44 -0700802 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700803
ohairb71409c2012-10-26 14:23:29 -0700804JARS+=$(IMAGES_OUTPUTDIR)/lib/ct.sym
erikje78df742012-06-07 20:40:50 -0700805
806##########################################################################################
807
808SRC_ZIP_INCLUDES = \
809 java/applet \
810 java/awt \
811 java/beans \
812 java/io \
813 java/lang \
814 java/math \
815 java/net \
816 java/nio \
817 java/rmi \
818 java/security \
819 java/sql \
820 java/text \
821 java/util \
822 com/sun/corba \
823 com/sun/image/codec/jpeg \
824 com/sun/imageio \
825 com/sun/java/swing \
826 com/sun/javadoc \
827 com/sun/jmx \
828 com/sun/source \
829 com/sun/naming \
830 com/sun/security/auth \
831 com/sun/security/jgss \
832 javax/accessibility \
833 javax/annotation \
834 javax/script \
835 javax/imageio \
836 javax/lang \
837 javax/management \
838 javax/naming \
839 javax/print \
840 javax/rmi \
841 javax/security \
842 javax/sound \
843 javax/sql \
844 javax/swing \
845 javax/tools \
846 javax/xml \
847 com/sun/org/apache \
848 com/sun/java_cup \
849 com/sun/jlex \
850 org/ietf \
851 org/omg \
852 org/w3c/dom \
ohair46fcac92012-09-18 11:29:24 -0700853 org/xml/sax \
854 sunw
erikje78df742012-06-07 20:40:50 -0700855
ohair46fcac92012-09-18 11:29:24 -0700856SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
erikje78df742012-06-07 20:40:50 -0700857SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
858SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/impsrc
859SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
860ifndef OPENJDK
861 SRC_ZIP_SRCS += $(JDK_TOPDIR)/src/closed/share/classes
862endif
863
864# Need to copy launcher src files into desired directory structure
865# before zipping the sources.
866LAUNCHER_SRC_FILES := $(wildcard $(JDK_TOPDIR)/src/share/bin/*) \
ohair46fcac92012-09-18 11:29:24 -0700867 $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/java_md*)
erikje78df742012-06-07 20:40:50 -0700868LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
ohair46fcac92012-09-18 11:29:24 -0700869 $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
erikje78df742012-06-07 20:40:50 -0700870 $(LAUNCHER_SRC_FILES)))
871
872$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
873 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700874 $(RM) $@
erikje78df742012-06-07 20:40:50 -0700875 $(CP) $< $@
876
ohair46fcac92012-09-18 11:29:24 -0700877$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%
erikje78df742012-06-07 20:40:50 -0700878 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700879 $(RM) $@
erikje78df742012-06-07 20:40:50 -0700880 $(CP) $< $@
881
882$(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
883
ohairb71409c2012-10-26 14:23:29 -0700884# This dir needs to exist before macro is evaluated to avoid warning from find.
885$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/src))
erikje78df742012-06-07 20:40:50 -0700886$(eval $(call SetupZipArchive,BUILD_SRC_ZIP,\
887 SRC:=$(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src,\
888 INCLUDES:=$(SRC_ZIP_INCLUDES) launcher,\
ohairb71409c2012-10-26 14:23:29 -0700889 EXCLUDES:=javax/swing/beaninfo,\
erikje78df742012-06-07 20:40:50 -0700890 SUFFIXES:=.java .c .h,\
891 ZIP:=$(IMAGES_OUTPUTDIR)/src.zip,\
892 EXTRA_DEPS:=$(LAUNCHER_ZIP_SRC)))
893
894JARS+=$(IMAGES_OUTPUTDIR)/src.zip
895
896##########################################################################################
897
ohair46fcac92012-09-18 11:29:24 -0700898-include $(CUSTOM_MAKE_DIR)/CreateJars.gmk
899
900##########################################################################################
901
erikje78df742012-06-07 20:40:50 -0700902all: $(JARS)
903
904.PHONY: default all