CreateJars.gmk 39.8 KB
Newer Older
1
#
2
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Setup.gmk

default: all

33 34 35
# Prepare the find cache. Only used if running on windows.
$(eval $(call FillCacheFind,$(JDK_OUTPUTDIR)/classes))

36 37
include Tools.gmk

38 39
include Profiles.gmk

40 41 42 43
#
# This makefile...so that altering will trigger rebuilding include/exclude-lists => jars
#
MAKEFILE=$(JDK_TOPDIR)/makefiles/CreateJars.gmk
44 45 46
#
# And similarly for the Profiles
PROFILE_MAKEFILES=$(JDK_TOPDIR)/makefiles/Profiles.gmk $(JDK_TOPDIR)/makefiles/profile-rtjar-includes.txt
47 48 49 50

MAINMANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf
BEANMANIFEST := $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest

O
ohair 已提交
51
$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/lib))
52

O
ohair 已提交
53
##########################################################################################
54

O
ohair 已提交
55
$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,,\
56
		SRCS:=$(JDK_OUTPUTDIR)/classes,\
57
		SUFFIXES:=.class .gif .png .properties,\
58 59
		INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
		JARMAIN:=sun.tools.jconsole.JConsole,\
O
ohair 已提交
60
		JAR:=$(IMAGES_OUTPUTDIR)/lib/jconsole.jar,\
61 62 63 64 65
		SKIP_METAINF:=true))


##########################################################################################

O
ohair 已提交
66
$(eval $(call SetupArchive,BUILD_DNS_JAR,,\
67 68 69
		SRCS:=$(JDK_OUTPUTDIR)/classes,\
		INCLUDES:=sun/net/spi/nameservice/dns,\
		EXTRA_FILES:=META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor,\
O
ohair 已提交
70
		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar,\
71 72 73 74 75
		SKIP_METAINF:=true))


##########################################################################################

76 77 78 79
LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
                              iw ja ko lt lv mk ms mt nl no pl pt ro ru sk sl sq sr sv \
                              th tr uk vi zh

80 81
LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/,$(LOCALEDATA_INCLUDE_LOCALES)) \
		       $(addprefix sun/util/resources/,$(LOCALEDATA_INCLUDE_LOCALES))
82

83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
# For non-US English locale data

LOCALEDATA_INCLUDES += \
                sun/text/resources/en/FormatData_en_AU.class \
                sun/text/resources/en/FormatData_en_CA.class \
                sun/text/resources/en/FormatData_en_GB.class \
                sun/text/resources/en/FormatData_en_IE.class \
                sun/text/resources/en/FormatData_en_IN.class \
                sun/text/resources/en/FormatData_en_MT.class \
                sun/text/resources/en/FormatData_en_NZ.class \
                sun/text/resources/en/FormatData_en_PH.class \
                sun/text/resources/en/FormatData_en_SG.class \
                sun/text/resources/en/FormatData_en_ZA.class \
                sun/util/resources/en/CalendarData_en_GB.class \
                sun/util/resources/en/CalendarData_en_IE.class \
                sun/util/resources/en/CalendarData_en_MT.class \
                sun/util/resources/en/CurrencyNames_en_AU.class \
                sun/util/resources/en/CurrencyNames_en_CA.class \
                sun/util/resources/en/CurrencyNames_en_GB.class \
                sun/util/resources/en/CurrencyNames_en_IE.class \
                sun/util/resources/en/CurrencyNames_en_IN.class \
                sun/util/resources/en/CurrencyNames_en_MT.class \
                sun/util/resources/en/CurrencyNames_en_NZ.class \
                sun/util/resources/en/CurrencyNames_en_PH.class \
                sun/util/resources/en/CurrencyNames_en_SG.class \
                sun/util/resources/en/CurrencyNames_en_ZA.class \
                sun/util/resources/en/LocaleNames_en_MT.class \
                sun/util/resources/en/LocaleNames_en_PH.class \
                sun/util/resources/en/LocaleNames_en_SG.class \
                sun/util/resources/en/TimeZoneNames_en_CA.class \
                sun/util/resources/en/TimeZoneNames_en_GB.class \
                sun/util/resources/en/TimeZoneNames_en_IE.class

116 117 118 119
$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/classes,\
		SUFFIXES:=.class _dict _th,\
		INCLUDES:=$(LOCALEDATA_INCLUDES),\
120
		EXCLUDES:=sun/text/resources/th/BreakIteratorRules_th.class,\
O
ohair 已提交
121
		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar,\
122 123 124
		SKIP_METAINF:=true))

##########################################################################################
125 126 127 128 129 130 131 132
#
# Different variants of rt.jar are built based on the current profile. The output
# directory is augmented with the profile name so that the final jar file and all the
# intermediary list files will be in directory. This has the form lib$PROFILE rather than
# lib/$PROFILE so that it won't get copied as part of the image generation process.
# Each profile customizes the RT_JAR_EXCLUDES variable.
#
##########################################################################################
133

134 135 136 137
# Full JRE exclude list for rt.jar and resources.jar
# This value should exclude types destined for jars other than rt.jar and resources.jar. 
# When building a Profile this value augments the profile specific exclusions
RT_JAR_EXCLUDES += \
138
	com/oracle/security \
139 140 141 142
	com/sun/codemodel \
	com/sun/crypto/provider \
	com/sun/istack/internal/tools \
	com/sun/jarsigner \
143
	com/sun/java/accessibility \
144 145
	com/sun/javadoc \
	com/sun/jdi \
146
	com/sun/net/ssl/internal/ssl \
147 148 149 150 151
	com/sun/source \
	com/sun/tools \
	com/sun/xml/internal/dtdparser \
	com/sun/xml/internal/rngom \
	com/sun/xml/internal/xsom \
152
	javax/crypto \
153
	javax/swing/AbstractButtonBeanInfo.class \
154
	javax/swing/beaninfo \
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
	javax/swing/BoxBeanInfo.class \
	javax/swing/JAppletBeanInfo.class \
	javax/swing/JButtonBeanInfo.class \
	javax/swing/JCheckBoxBeanInfo.class \
	javax/swing/JCheckBoxMenuItemBeanInfo.class \
	javax/swing/JColorChooserBeanInfo.class \
	javax/swing/JComboBoxBeanInfo.class \
	javax/swing/JComponentBeanInfo.class \
	javax/swing/JDesktopPaneBeanInfo.class \
	javax/swing/JDialogBeanInfo.class \
	javax/swing/JEditorPaneBeanInfo.class \
	javax/swing/JFileChooserBeanInfo.class \
	javax/swing/JFormattedTextFieldBeanInfo.class \
	javax/swing/JFrameBeanInfo.class \
	javax/swing/JInternalFrameBeanInfo.class \
	javax/swing/JLabelBeanInfo.class \
	javax/swing/JLayeredPaneBeanInfo.class \
	javax/swing/JListBeanInfo.class \
	javax/swing/JMenuBarBeanInfo.class \
	javax/swing/JMenuBeanInfo.class \
	javax/swing/JMenuItemBeanInfo.class \
	javax/swing/JOptionPaneBeanInfo.class \
	javax/swing/JPanelBeanInfo.class \
	javax/swing/JPasswordFieldBeanInfo.class \
	javax/swing/JPopupMenuBeanInfo.class \
	javax/swing/JProgressBarBeanInfo.class \
	javax/swing/JRadioButtonBeanInfo.class \
	javax/swing/JRadioButtonMenuItemBeanInfo.class \
	javax/swing/JScrollBarBeanInfo.class \
	javax/swing/JScrollPaneBeanInfo.class \
	javax/swing/JSeparatorBeanInfo.class \
	javax/swing/JSliderBeanInfo.class \
	javax/swing/JSpinnerBeanInfo.class \
	javax/swing/JSplitPaneBeanInfo.class \
	javax/swing/JTabbedPaneBeanInfo.class \
	javax/swing/JTableBeanInfo.class \
	javax/swing/JTextAreaBeanInfo.class \
	javax/swing/JTextFieldBeanInfo.class \
	javax/swing/JTextPaneBeanInfo.class \
	javax/swing/JToggleButtonBeanInfo.class \
	javax/swing/JToolBarBeanInfo.class \
	javax/swing/JTreeBeanInfo.class \
	javax/swing/JWindowBeanInfo.class \
	javax/swing/SwingBeanInfoBase.class \
	javax/swing/text/JTextComponentBeanInfo.class \
200 201 202 203 204 205 206 207 208
	META-INF/services/com.sun.jdi.connect.Connector \
	META-INF/services/com.sun.jdi.connect.spi.TransportService \
	META-INF/services/com.sun.tools.attach.spi.AttachProvider \
	META-INF/services/com.sun.tools.xjc.Plugin \
	META-INF/services/java.nio.charset.spi.CharsetProvider \
	META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
	org/relaxng/datatype \
	sun/awt/HKSCS.class \
	sun/awt/motif/X11GB2312.class \
209 210
	sun/awt/motif/X11GB2312\$$$$Decoder.class \
	sun/awt/motif/X11GB2312\$$$$Encoder.class \
211
	sun/awt/motif/X11GBK.class \
212
	sun/awt/motif/X11GBK\$$$$Encoder.class \
213
	sun/awt/motif/X11KSC5601.class \
214 215
	sun/awt/motif/X11KSC5601\$$$$Decoder.class \
	sun/awt/motif/X11KSC5601\$$$$Encoder.class \
216 217 218 219 220 221
	sun/jvmstat \
	sun/net/spi/nameservice/dns \
	sun/nio/cs/ext \
	sun/rmi/rmic \
	sun/security/ec/ECDHKeyAgreement.class \
	sun/security/ec/ECDSASignature.class \
222 223 224 225 226 227
	sun/security/ec/ECDSASignature\$$$$Raw.class \
	sun/security/ec/ECDSASignature\$$$$SHA1.class \
	sun/security/ec/ECDSASignature\$$$$SHA224.class \
	sun/security/ec/ECDSASignature\$$$$SHA256.class \
	sun/security/ec/ECDSASignature\$$$$SHA384.class \
	sun/security/ec/ECDSASignature\$$$$SHA512.class \
228 229
	sun/security/ec/ECKeyFactory.class \
	sun/security/ec/ECKeyPairGenerator.class \
230
	sun/security/ec/SunEC\$$$$1.class \
231 232 233 234 235 236 237 238 239
	sun/security/ec/SunEC.class \
	sun/security/ec/SunECEntries.class \
	sun/security/internal \
	sun/security/mscapi \
	sun/security/pkcs11 \
	sun/security/provider/Sun.class \
	sun/security/rsa/SunRsaSign.class \
	sun/security/ssl \
	sun/security/tools/jarsigner \
240
	sun/swing/BeanInfoUtils.class \
241
	sun/text/resources/cldr \
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
	sun/tools/asm \
	sun/tools/attach \
	sun/tools/java \
	sun/tools/javac \
	sun/tools/jcmd \
	sun/tools/jconsole \
	sun/tools/jinfo \
	sun/tools/jmap \
	sun/tools/jps \
	sun/tools/jstack \
	sun/tools/jstat \
	sun/tools/jstatd \
	sun/tools/native2ascii \
	sun/tools/serialver \
	sun/tools/tree \
	sun/tools/util \
	sun/util/cldr/CLDRLocaleDataMetaInfo.class \
259
	sun/util/resources/cldr \
260
	$(LOCALEDATA_INCLUDES) \
261 262
	com/oracle/jrockit/jfr \
	oracle/jrockit/jfr
263 264 265

ifeq ($(OPENJDK_TARGET_OS), macosx)
        RT_JAR_EXCLUDES += com/sun/nio/sctp \
266
                           sun/nio/ch/sctp
267 268 269
endif

# Find all files in the classes dir to use as dependencies. This could be more fine granular.
270 271
ALL_FILES_IN_CLASSES := $(call not-containing,_the.,$(filter-out %javac_state,\
                        $(call CacheFind,$(JDK_OUTPUTDIR)/classes)))
272

273 274
RT_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar_manifest
RESOURCE_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar_manifest
275 276 277

$(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
	$(MKDIR) -p $(@D)
278
	$(RM) $@ $@.tmp
279 280
	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
281 282 283 284
	       $(MAINMANIFEST) >> $@.tmp
	$(ECHO) >> $@.tmp
	$(CAT) $(BEANMANIFEST) >> $@.tmp
	$(MV) $@.tmp $@
285 286 287

$(RESOURCE_JAR_MANIFEST_FILE): $(MAINMANIFEST)
	$(MKDIR) -p $(@D)
288
	$(RM) $@ $@.tmp
289 290
	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" 		\
	       -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
291 292
	       $(MAINMANIFEST) >> $@.tmp
	$(MV) $@.tmp $@
293

294
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude: $(MAKEFILE) $(PROFILE_MAKEFILES)
295
	$(MKDIR) -p $(@D)
296 297 298
	$(RM) $@ $@.tmp
	$(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@.tmp)
	$(MV) $@.tmp $@
299

O
ohair 已提交
300
$(IMAGES_OUTPUTDIR)/lib/classlist : $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
301 302
  $(MAKEFILE)
	$(MKDIR) -p $(@D)
303 304 305
	$(RM) $@ $@.tmp
	$(TOOL_ADDJSUM) $< $@.tmp
	$(MV) $@.tmp $@
306

307
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents: $(BUILD_TOOLS) $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude \
O
ohair 已提交
308
					 $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
309
	$(MKDIR) -p $(@D)
310
	$(RM) $@ $@.tmp
311 312
	($(CD) $(JDK_OUTPUTDIR)/classes && \
	    $(TOOL_JARREORDER) \
313
		-o  $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude . )
314
	$(MV) $@.tmp $@
315

316
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
317 318
	$(MKDIR) -p $(@D)
	$(RM) $@ $@.tmp
319 320 321 322 323 324 325
	$(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
ifneq ($(PROFILE),)
#       # Add back classes from excluded packages (fixing the $ substitution in the process)
	for type in  $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
	  $(ECHO) $$type >> $@.tmp ; \
	done
endif
326
	$(MV) $@.tmp $@
327

328
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
329 330 331 332
	$(MKDIR) -p $(@D)
	$(RM) $@ $@.tmp
	$(GREP) -v -e '\.class$$' \
	    -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
333 334 335 336 337 338 339 340 341 342 343 344
	    $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
ifneq ($(PROFILE),)
#       # Strip out all META-INF/services/ entries
	$(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
#       # Add back the required services
#       # FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
#       # we get a syntax error from sh. That doesn't happen on linux
	for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
	  $(ECHO) $$service >> $@.tmp2; \
	done
	$(MV) $@.tmp2 $@.tmp
endif
345
	$(MV) $@.tmp $@
346

347 348 349 350 351 352
# This is a hack but I don't know how to make this fit into the existing scheme
$(PROFILE_VERSION_CLASS_TARGETS) : $(PROFILE_VERSION_JAVA_TARGETS)
	@$(JAVAC) -d $(@D)/../../ $(@D)/$(VERSION_JAVA_FILE)


# Support for removing the addPropertyChangeListener and removePropertyChangeListener
353
# methods from classes that only go into the profile builds. 
354 355
BEANLESS_CLASSES = $(IMAGES_OUTPUTDIR)/beanless

356 357 358
# When there are $ characters in filenames we have some very subtle interactions between
# make expansion and shell expansion. In this particular case $< will contain a single $ while
# $@ will contain \$. So we have to pass $< in single-quotes to avoid shell expansion
359 360
$(BEANLESS_CLASSES)/%: $(JDK_OUTPUTDIR)/classes/%
	$(MKDIR) -p $(@D)
361
	$(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
362 363 364

CLASSES_TO_DEBEAN = \
    java/util/logging/LogManager.class \
365 366
    java/util/jar/Pack200\$$Packer.class \
    java/util/jar/Pack200\$$Unpacker.class \
367
    com/sun/java/util/jar/pack/PackerImpl.class \
368
    com/sun/java/util/jar/pack/UnpackerImpl.class 
369 370

ifneq ($(PROFILE),)
371
    BEANLESS_CLASSES_TARGETS := $(addprefix $(BEANLESS_CLASSES)/, $(CLASSES_TO_DEBEAN))
372 373 374
endif


375
RT_JAR_CREATE_OPTIONS := c0fm
376
RT_JAR_UPDATE_OPTIONS := u0f
377 378
ifeq ($(COMPRESS_JARS), true)
    RT_JAR_CREATE_OPTIONS := cfm
379
    RT_JAR_UPDATE_OPTIONS := uf
380 381
endif

382 383 384 385 386 387 388
# This defines a target-specific variables to make the shell logic easier to see.
# We need to find the Version.class file for the profile currently being built
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: \
  CLASS_FILE = $(if $(PROFILE),$(strip $(foreach class,$(PROFILE_VERSION_CLASS_TARGETS),$(if $(findstring $(PROFILE),$(class)),$(class)))), NO_SUCH_FILE)
# This is the real target
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE) $(PROFILE_VERSION_CLASS_TARGETS) $(BEANLESS_CLASSES_TARGETS)
	$(ECHO) Creating rt.jar $(PROFILE) Compressed=$(COMPRESS_JARS)
389 390
	$(MKDIR) -p $(@D)
	$(RM) $@ $@.tmp
391
	$(CD) $(JDK_OUTPUTDIR)/classes && \
392
	    $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
393 394 395 396 397 398
	        @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents && \
	    if [ -f $(CLASS_FILE) ]; then \
	      $(ECHO)  Updating rt.jar $(PROFILE) && \
	      $(CD) $(patsubst %$(VERSION_CLASS_PATH),%,$(CLASS_FILE)) && \
                $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(VERSION_CLASS_PATH); \
	      $(CD) $(BEANLESS_CLASSES) && \
399
		$(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(CLASSES_TO_DEBEAN); \
400
            fi
401
	$(MV) $@.tmp $@
402

403
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/resources.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents \
404 405
				    $(RESOURCE_JAR_MANIFEST_FILE)
	$(ECHO) Creating resources.jar
406 407
	$(MKDIR) -p $(@D)
	$(RM) $@ $@.tmp
408
	$(CD) $(JDK_OUTPUTDIR)/classes && \
409
	    $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
410
	        @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents
411
	$(MV) $@.tmp $@
412 413 414

##########################################################################################

415
ifneq ($(OPENJDK_TARGET_OS), windows)
416 417 418 419 420 421 422 423 424 425
    CHARSETS_EXTRA_FILES:=sun/awt/motif/X11GBK.class \
                          sun/awt/motif/X11GB2312\$$$$Decoder.class \
                          sun/awt/motif/X11GB2312.class \
                          sun/awt/motif/X11KSC5601\$$$$Decoder.class \
                          sun/awt/motif/X11KSC5601\$$$$Encoder.class \
                          sun/awt/motif/X11GB2312\$$$$Encoder.class \
                          sun/awt/motif/X11GBK\$$$$Encoder.class \
                          sun/awt/motif/X11KSC5601.class
endif

O
ohair 已提交
426
$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,,\
427 428 429 430 431 432
		SRCS:=$(JDK_OUTPUTDIR)/classes, \
		SUFFIXES:=.class .dat,\
		INCLUDES:=sun/nio/cs/ext,\
		EXTRA_FILES := sun/awt/HKSCS.class \
			       $(CHARSETS_EXTRA_FILES) \
                               META-INF/services/java.nio.charset.spi.CharsetProvider, \
O
ohair 已提交
433
		JAR:=$(IMAGES_OUTPUTDIR)/lib/charsets.jar, \
434 435
		SKIP_METAINF := true, \
                CHECK_COMPRESS_JAR:=true))
436 437 438

##########################################################################################

O
ohair 已提交
439
ifndef OPENJDK
440
ifeq ($(ENABLE_JFR), true)
441 442 443 444
    $(eval $(call SetupArchive,BUILD_JFR_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/classes,\
		INCLUDES:=com/oracle/jrockit/jfr \
			  oracle/jrockit/jfr,\
O
ohair 已提交
445
		JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\
446
		SKIP_METAINF:=true,\
447 448
		MANIFEST:=$(MAINMANIFEST), \
                CHECK_COMPRESS_JAR:=true))
449

O
ohair 已提交
450
endif
451 452 453 454 455 456 457 458 459 460
endif

##########################################################################################

$(eval $(call SetupArchive,BUILD_JSSE_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/classes,\
		INCLUDES:=sun/security/provider/Sun.class \
			  sun/security/rsa/SunRsaSign.class \
			  sun/security/ssl \
			  com/sun/net/ssl/internal/ssl,\
O
ohair 已提交
461
		JAR:=$(IMAGES_OUTPUTDIR)/lib/jsse.jar,\
462
		SKIP_METAINF:=true,\
463 464
		MANIFEST:=$(MAINMANIFEST), \
                CHECK_COMPRESS_JAR:=true))
465

466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482
##########################################################################################
# Create manifest for security jars

#
# Include these extra attributes for now, should probably take out.
#
JCE_MANIFEST := $(IMAGES_OUTPUTDIR)/lib/_the.security.manifest.mf
$(JCE_MANIFEST): $(MAINMANIFEST)
	$(MKDIR) -p $(@D)
	$(RM) $@ $@.tmp
	$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#"       \
               -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
               $(MAINMANIFEST) >> $@.tmp
	$(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
	$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
	$(MV) $@.tmp $@

483
##########################################################################################
484
# For all security jars, always build the jar, but for closed, install the prebuilt signed
485 486
# version instead of the newly built jar. Unsigned jars are treated as intermediate targets
# and explicitly added to the JARS list. For open, signing is not needed. See SignJars.gmk
487
# for more information.
488

O
ohair 已提交
489
SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
490
SUNPKCS11_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunpkcs11.jar
491

492
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,,\
493 494 495
	SRCS:=$(JDK_OUTPUTDIR)/classes, \
	SUFFIXES:=.class,\
	INCLUDES:=sun/security/pkcs11,\
496
	JAR:=$(SUNPKCS11_JAR_UNSIGNED), \
497
        MANIFEST:=$(JCE_MANIFEST), \
498
	SKIP_METAINF := true))
499

500
$(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
501

502 503 504 505 506 507 508 509
ifndef OPENJDK
    SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
    $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
	$(install-file)
else
    $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_UNSIGNED)
	$(install-file)
510 511
endif

512
JARS += $(SUNPKCS11_JAR_UNSIGNED)
513

514 515
##########################################################################################

O
ohair 已提交
516
SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar
517
SUNEC_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunec.jar
518

519
$(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
520 521 522
		SRCS:=$(JDK_OUTPUTDIR)/classes, \
		SUFFIXES:=.class,\
		INCLUDES:=sun/security/ec,\
523
		JAR:=$(SUNEC_JAR_UNSIGNED), \
524
                MANIFEST:=$(JCE_MANIFEST), \
525 526
		SKIP_METAINF := true))

527
$(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
528

529 530 531 532 533 534 535 536
ifndef OPENJDK
    SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
    $(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
	$(install-file)
else
    $(SUNEC_JAR_DST) : $(SUNEC_JAR_UNSIGNED)
	$(install-file)
537 538
endif

539
JARS += $(SUNEC_JAR_UNSIGNED)
540 541 542 543 544 545 546 547 548

##########################################################################################

$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/classes,\
		SUFFIXES:=BeanInfo.class .gif,\
		INCLUDES:=javax/swing sun/swing,\
		EXCLUDES:=javax/swing/plaf,\
		EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
O
ohair 已提交
549
		JAR:=$(IMAGES_OUTPUTDIR)/lib/dt.jar,\
550 551 552 553
		SKIP_METAINF:=true))

##########################################################################################

O
ohair 已提交
554
SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
555
SUNJCE_PROVIDER_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunjce_provider.jar
556

557
$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
558 559 560
		SRCS:=$(JDK_OUTPUTDIR)/classes, \
		SUFFIXES:=.class,\
		INCLUDES:= com/sun/crypto/provider,\
561
		JAR:=$(SUNJCE_PROVIDER_JAR_UNSIGNED), \
562
                MANIFEST:=$(JCE_MANIFEST), \
563
		SKIP_METAINF := true))
564

565
$(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
566 567

ifndef OPENJDK
568 569 570 571 572 573 574 575
    SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
    $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_SRC)
	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
	$(install-file)
else
    $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_UNSIGNED)
	$(install-file)
endif
576

577
JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
578

579
##########################################################################################
580

581 582
JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
JCE_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/jce.jar
583

584
$(eval $(call SetupArchive,BUILD_JCE_JAR,,\
585 586 587
		SRCS:=$(JDK_OUTPUTDIR)/classes, \
		SUFFIXES:=.class,\
		INCLUDES:= javax/crypto sun/security/internal,\
588
		JAR:=$(JCE_JAR_UNSIGNED), \
589
                MANIFEST:=$(JCE_MANIFEST), \
590
		SKIP_METAINF := true))
591

592
$(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
593

594 595 596 597 598 599 600 601
ifndef OPENJDK
    JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
    $(JCE_JAR_DST) : $(JCE_JAR_SRC)
	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
	$(install-file)
else
    $(JCE_JAR_DST) : $(JCE_JAR_UNSIGNED)
	$(install-file)
602 603
endif

604
JARS +=  $(JCE_JAR_UNSIGNED)
605 606 607

##########################################################################################

O
ohair 已提交
608
US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
609
US_EXPORT_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/US_export_policy.jar
610

611 612 613 614 615 616 617 618 619
#
# TODO fix so that SetupArchive does not write files into SRCS
#   then we don't need this extra copying
#
# NOTE:  We currently do not place restrictions on our limited export
# policy.  This was not a typo.
#
US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
620

621
$(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
622
	$(install-file)
623

624
US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
625

626
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
627 628
		SRCS:=$(US_EXPORT_POLICY_JAR_TMP), \
		SUFFIXES:= .policy,\
629
		JAR:=$(US_EXPORT_POLICY_JAR_UNSIGNED), \
630 631 632
		EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
		SKIP_METAINF := true))

633 634 635 636 637 638 639
ifndef OPENJDK
    $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
	$(ECHO) $(LOG_INFO) Copying $(@F)
	$(install-file)
else
    $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED)
	$(install-file)
640 641
endif

642
JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED)
643

644 645
##########################################################################################

646
LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
647
LOCAL_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/local_policy.jar
648

649 650 651 652 653
#
# TODO fix so that SetupArchive does not write files into SRCS
#   then we don't need this extra copying
#
LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
654

655 656 657 658
ifeq ($(UNLIMITED_CRYPTO), true)
    LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
    LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
    LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
659
else
660 661 662 663 664
    LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
    LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
                             $(LOCAL_POLICY_JAR_TMP)/default_local.policy
    LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
endif
665

666
$(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
667 668
	$(install-file)

669
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
670 671
		SRCS:=$(LOCAL_POLICY_JAR_TMP),\
		SUFFIXES:= .policy,\
672
		JAR:=$(LOCAL_POLICY_JAR_UNSIGNED), \
673
		EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
674 675
		SKIP_METAINF := true))

676 677 678 679 680 681 682
ifndef OPENJDK
    $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
	$(ECHO) $(LOG_INFO) Copying $(@F)
	$(install-file)
else
    $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED)
	$(install-file)
683 684
endif

685
JARS += $(LOCAL_POLICY_JAR_UNSIGNED)
686

687 688
##########################################################################################

689
ifeq ($(OPENJDK_TARGET_OS),windows)
690

O
ohair 已提交
691
SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
692
SUNMSCAPI_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunmscapi.jar
693

O
ohair 已提交
694
$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,,\
695 696 697
		SRCS:=$(JDK_OUTPUTDIR)/classes, \
		SUFFIXES:=.class,\
		INCLUDES:= sun/security/mscapi,\
698
		JAR:=$(SUNMSCAPI_JAR_UNSIGNED), \
699
		MANIFEST:=$(JCE_MANIFEST), \
700
		SKIP_METAINF:=true))
701

702 703
$(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)

704 705 706 707 708 709 710 711
ifndef OPENJDK
    SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
    $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_SRC)
	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
	$(install-file)
else
    $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_UNSIGNED)
	$(install-file)
712 713
endif

714
JARS += $(SUNMSCAPI_JAR_UNSIGNED)
715 716 717 718 719

endif

##########################################################################################

720
ifeq ($(OPENJDK_TARGET_OS),solaris)
721 722
ifndef OPENJDK

O
ohair 已提交
723
UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
724
UCRYPTO_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/ucrypto.jar
725 726
UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar

727 728 729 730 731 732 733 734 735 736
$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/classes, \
		SUFFIXES:=.class,\
		INCLUDES:=com/oracle/security/ucrypto,\
		JAR:=$(UCRYPTO_JAR_UNSIGNED), \
		MANIFEST:=$(JCE_MANIFEST), \
		SKIP_METAINF:=true))

$(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)

737
$(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC)
O
ohair 已提交
738
	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
739
	$(install-file)
740

741
JARS += $(UCRYPTO_JAR_UNSIGNED) 
742 743 744 745 746 747

endif
endif

##########################################################################################

748 749 750
# Get the CLDRVERSION
include GensrcCLDR.gmk

O
ohair 已提交
751
CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
752

O
ohair 已提交
753
$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR,,\
754 755 756 757 758 759 760 761 762 763 764 765
		SRCS:=$(JDK_OUTPUTDIR)/classes,\
		SUFFIXES:=.class,\
		INCLUDES:=sun/text/resources/cldr \
			  sun/util/cldr \
			  sun/util/resources/cldr,\
		EXCLUDES:=sun/util/cldr/CLDRLocaleProviderAdapter,\
		JAR:=$(CLDRDATA_JAR_DST),\
		EXTRA_MANIFEST_ATTR:=CLDR-Version: $(CLDRVERSION),\
		SKIP_METAINF:=true))

##########################################################################################

766
TOOLS_JAR_INCLUDES := \
767 768 769
        com/sun/codemodel       \
	com/sun/istack/internal/tools       \
	com/sun/jarsigner	\
770 771 772
	com/sun/javadoc		\
	com/sun/jdi		\
	com/sun/source          \
773
	com/sun/tools/attach	\
774
	com/sun/tools/classfile \
775
	com/sun/tools/corba     \
776
	com/sun/tools/doclets   \
J
jjg 已提交
777
	com/sun/tools/doclint   \
778 779 780 781
	com/sun/tools/example/debug/expr \
	com/sun/tools/example/debug/tty  \
	com/sun/tools/extcheck  \
	com/sun/tools/hat       \
782 783 784 785 786
        com/sun/tools/internal/jxc             \
	com/sun/tools/internal/jxc/ap   \
	com/sun/tools/internal/ws       \
	com/sun/tools/internal/ws/wscompile/plugin/at_generated \
	com/sun/tools/internal/xjc       \
787 788 789 790
	com/sun/tools/javac     \
	com/sun/tools/javadoc   \
	com/sun/tools/javah     \
	com/sun/tools/javap     \
791
	com/sun/tools/jdeps	\
792 793 794
	com/sun/tools/jdi	\
	com/sun/tools/script/shell	\
	com/sun/xml/internal/dtdparser \
795 796 797
        com/sun/xml/internal/rngom       \
        com/sun/xml/internal/xsom       \
        org/relaxng/datatype   \
798 799 800 801 802
	sun/applet		\
	sun/jvmstat		\
	sun/rmi/rmic		\
	sun/security/tools/jarsigner \
	sun/tools/asm		\
803
	sun/tools/attach	\
804 805 806 807
	sun/tools/jar		\
	sun/tools/java		\
	sun/tools/javac		\
	sun/tools/jcmd		\
808
	sun/tools/jinfo         \
809 810 811 812 813 814 815 816 817
	sun/tools/jmap		\
	sun/tools/jps		\
	sun/tools/jstack        \
	sun/tools/jstat		\
	sun/tools/jstatd	\
	sun/tools/native2ascii	\
	sun/tools/serialver	\
	sun/tools/tree		\
	sun/tools/util
818

O
ohair 已提交
819 820 821 822
# The sjavac tools is not ready for public consumption.
TOOLS_JAR_EXCLUDES=com/sun/tools/sjavac

$(eval $(call SetupArchive,BUILD_TOOLS_JAR,,\
823 824 825 826
		SRCS:=$(JDK_OUTPUTDIR)/classes,\
		SUFFIXES:=.class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
			  Tool aliasmap options,\
		INCLUDES:=$(TOOLS_JAR_INCLUDES),\
O
ohair 已提交
827
		EXCLUDES:=$(TOOLS_JAR_EXCLUDES),\
828 829 830 831 832
		EXTRA_FILES:=META-INF/services/com.sun.jdi.connect.Connector \
			     META-INF/services/com.sun.jdi.connect.spi.TransportService \
			     META-INF/services/com.sun.tools.attach.spi.AttachProvider \
			     META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
			     META-INF/services/com.sun.tools.internal.xjc.Plugin,\
O
ohair 已提交
833
		JAR:=$(IMAGES_OUTPUTDIR)/lib/tools.jar,\
834 835
		SKIP_METAINF:=true, \
                CHECK_COMPRESS_JAR:=true))
836 837 838 839


##########################################################################################

840 841
include javadoc/CORE_PKGS.gmk
include javadoc/NON_CORE_PKGS.gmk
842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863

# The compiler should not issue a "Proprietary" warning when compiling
# classes in the com.sun.java.swing.plaf packages, since we've always
# allowed, and even advocated, extending them (see bug 6476749).
#
# This approach is NOT to be used as a general purpose way to avoid such
# compiler warnings for non-core packages. The correct way is to document
# the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
# definition.
#
# Swing has taken this approach only as a temporary measure to avoid
# the compiler warnings until we can properly document these packages.
# This is covered under 6491853.
EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows  \
                        com.sun.java.swing.plaf.motif    \
                        com.sun.java.swing.plaf.gtk

#
# Include the exported private packages in ct.sym.
# This is an interim solution until the ct.sym is replaced
# with a new module system (being discussed for JDK 8).
#
M
mchung 已提交
864
EXPORTED_PRIVATE_PKGS = com.oracle.net \
865 866
                        com.oracle.nio

O
ohair 已提交
867
$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
868
	$(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
869
	$(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
870
	$(JAVA) $(NEW_JAVAC) \
871
	    -bootclasspath $(JDK_OUTPUTDIR)/classes \
872 873
	    -XDprocess.packages -proc:only \
	    -processor com.sun.tools.javac.sym.CreateSymbols \
O
ohair 已提交
874
	    -Acom.sun.tools.javac.sym.Jar=$(IMAGES_OUTPUTDIR)/lib/rt.jar \
875
	    -Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
876
	    -Acom.sun.tools.javac.sym.Profiles=profile-rtjar-includes.txt \
877 878 879
	    $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
	$(TOUCH) $@

880
$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/symbols))
881 882 883
$(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
		SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
		INCLUDES:=META-INF/sym,\
O
ohair 已提交
884
		JAR:=$(IMAGES_OUTPUTDIR)/lib/ct.sym, \
885
		CHECK_COMPRESS_JAR:=true))
886 887 888 889 890


##########################################################################################

SRC_ZIP_INCLUDES = \
891 892 893 894 895 896 897 898 899 900 901 902 903
	com/sun/corba			\
	com/sun/image/codec/jpeg	\
	com/sun/imageio                 \
	com/sun/java_cup		\
	com/sun/javadoc			\
	com/sun/java/swing		\
	com/sun/jlex	        	\
	com/sun/jmx			\
	com/sun/naming			\
	com/sun/org/apache		\
	com/sun/security/auth		\
	com/sun/security/jgss		\
	com/sun/source			\
904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924
	java/applet			\
	java/awt			\
	java/beans			\
	java/io				\
	java/lang			\
	java/math			\
	java/net			\
	java/nio			\
	java/rmi			\
	java/security			\
	java/sql			\
	java/text			\
	java/util			\
	javax/accessibility		\
	javax/annotation		\
	javax/imageio			\
	javax/lang			\
	javax/management		\
	javax/naming			\
	javax/print			\
	javax/rmi			\
925
	javax/script			\
926 927 928 929 930 931 932 933 934
	javax/security			\
	javax/sound			\
	javax/sql			\
	javax/swing			\
	javax/tools			\
	javax/xml			\
	org/ietf			\
	org/omg				\
	org/w3c/dom			\
935 936
	org/xml/sax			\
	sunw
937

938
SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
939 940 941 942 943 944 945 946 947 948
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/impsrc
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
ifndef OPENJDK
  SRC_ZIP_SRCS += $(JDK_TOPDIR)/src/closed/share/classes
endif

# Need to copy launcher src files into desired directory structure
# before zipping the sources.
LAUNCHER_SRC_FILES := $(wildcard $(JDK_TOPDIR)/src/share/bin/*) \
949
                      $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/java_md*)
950
LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
951
		    $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
952 953 954
			$(LAUNCHER_SRC_FILES)))

$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
955
	$(install-file)
956

957
$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%
958
	$(install-file)
959 960 961

$(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)

O
ohair 已提交
962 963
# This dir needs to exist before macro is evaluated to avoid warning from find.
$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/src))
964 965 966
$(eval $(call SetupZipArchive,BUILD_SRC_ZIP,\
		SRC:=$(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src,\
		INCLUDES:=$(SRC_ZIP_INCLUDES) launcher,\
O
ohair 已提交
967
		EXCLUDES:=javax/swing/beaninfo,\
968 969 970 971 972 973
		SUFFIXES:=.java .c .h,\
		ZIP:=$(IMAGES_OUTPUTDIR)/src.zip,\
		EXTRA_DEPS:=$(LAUNCHER_ZIP_SRC)))

##########################################################################################

974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)

    $(eval $(call SetupArchive,BUILD_JACCESS_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/classes,\
		INCLUDES:=com/sun/java/accessibility/util,\
		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar,\
		SKIP_METAINF:=true))

    JARS += $(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar

    ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
        $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_32_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/32bit $(JDK_OUTPUTDIR)/classes,\
		INCLUDES:=com/sun/java/accessibility,\
		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar,\
		SKIP_METAINF:=true))

        $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_LEGACY_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/legacy $(JDK_OUTPUTDIR)/classes,\
		INCLUDES:=com/sun/java/accessibility,\
		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar,\
		SKIP_METAINF:=true))

        JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar \
		$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar
    else
        $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_64_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/64bit $(JDK_OUTPUTDIR)/classes,\
		INCLUDES:=com/sun/java/accessibility,\
		EXCLUDES:=com/sun/java/accessibility/util/java,\
		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar,\
		SKIP_METAINF:=true))

        JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar
    endif
endif
endif

##########################################################################################

1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052
#
# This is an empty jar (only contains manifest) and fits poorly into framework...
#   create simple rule instead
#
$(IMAGES_OUTPUTDIR)/lib/management-agent.jar : $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
	$(JAR) cfm $@ $<

##########################################################################################

$(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar : $(JDK_OUTPUTDIR)/demo/nio/zipfs/zipfs.jar
	$(install-file)

##########################################################################################

ifeq ($(OPENJDK_TARGET_OS),macosx)
    $(eval $(call SetupArchive,BUILD_JOBJC_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/jobjc_classes,\
		JAR:=$(IMAGES_OUTPUTDIR)/lib/JObjC.jar, \
		JARINDEX:=true))
endif

##########################################################################################

ifndef OPENJDK
    $(eval $(call SetupArchive,BUILD_ALT_RT_JAR,,\
		SRCS:=$(JDK_OUTPUTDIR)/altclasses_classes,\
		JAR:=$(IMAGES_OUTPUTDIR)/lib/alt-rt.jar))

endif

##########################################################################################

# This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
# all jars can be found in one place when creating images in Images.gmk. It needs to be
# done here so that clean targets can be simple and accurate.
$(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar: $(JDK_OUTPUTDIR)/lib/sa-jdi.jar
	$(install-file)

E
erikj 已提交
1053 1054
##########################################################################################
#
1055 1056
# sec-bin.zip is used by builds where the corresponding sources are not available
#
E
erikj 已提交
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073
$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP,\
		SRC:=$(JDK_OUTPUTDIR),\
		INCLUDES:=classes/javax/net \
			  classes/javax/security/cert \
			  classes/com/sun/net/ssl \
			  classes/com/sun/security/cert \
			  classes/sun/net/www/protocol/https \
			  classes/sun/security/pkcs12 \
			  classes/sun/security/ssl \
			  classes/sun/security/krb5 \
			  classes/sun/security/krb5/internal \
			  classes/sun/security/krb5/internal/ccache \
			  classes/sun/security/krb5/internal/crypto \
			  classes/sun/security/krb5/internal/ktab \
			  classes/sun/security/krb5/internal/rcache \
			  classes/sun/security/krb5/internal/util,\
		INCLUDE_FILES:=classes/sun/security/jgss/spi/GSSContextSpi.class,\
1074
		EXCLUDES:=classes/sun/security/krb5/internal/tools,\
E
erikj 已提交
1075 1076 1077 1078
		ZIP:=$(IMAGES_OUTPUTDIR)/sec-bin.zip))

JARS += $(IMAGES_OUTPUTDIR)/sec-bin.zip

1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108
##########################################################################################
#
# Windows specific binary security packages.
#
ifeq ($(OPENJDK_TARGET_OS),windows)
    # sec-windows-bin.zip is used by builds where the corresponding sources are not available
    $(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP,\
		SRC:=$(JDK_OUTPUTDIR),\
		INCLUDES:=classes/sun/security/krb5/internal/tools,\
		ZIP:=$(IMAGES_OUTPUTDIR)/sec-windows-bin.zip))

    JARS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip

    # JGSS files contain the native Kerberos library
    ifeq ($(OPENJDK_TARGET_CPU),x86_64)
        JGSS_ZIP_NAME=jgss-windows-x64-bin.zip
    else
        JGSS_ZIP_NAME=jgss-windows-i586-bin.zip
    endif

    $(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP,\
		SRC:=$(JDK_OUTPUTDIR),\
		INCLUDE_FILES:=bin/w2k_lsa_auth.dll \
			       bin/w2k_lsa_auth.map \
			       bin/w2k_lsa_auth.pdb,\
		ZIP:=$(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))

    JARS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
endif

1109 1110
##########################################################################################

J
jjg 已提交
1111 1112 1113 1114 1115 1116
# Import nashorn.jar from nashorn dist dir.
$(IMAGES_OUTPUTDIR)/lib/ext/nashorn.jar: $(NASHORN_DIST)/nashorn.jar
	$(install-file)

##########################################################################################

1117 1118 1119 1120
-include $(CUSTOM_MAKE_DIR)/CreateJars.gmk

##########################################################################################

1121 1122 1123
all: $(JARS)

.PHONY: default all