1 #
   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 
  26 include $(SPEC)
  27 include MakeBase.gmk
  28 include JavaCompilation.gmk
  29 include Setup.gmk
  30 
  31 default: all
  32 
  33 # Prepare the find cache. Only used if running on windows.
  34 $(eval $(call FillCacheFind,$(JDK_OUTPUTDIR)/classes))
  35 
  36 include Tools.gmk
  37 
  38 #
  39 # This makefile...so that altering will trigger rebuilding include/exclude-lists => jars
  40 #
  41 MAKEFILE=$(JDK_TOPDIR)/makefiles/CreateJars.gmk
  42 
  43 MAINMANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf
  44 BEANMANIFEST := $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest
  45 
  46 JARS:=
  47 
  48 $(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/lib))
  49 
  50 ##########################################################################################
  51 
  52 $(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,,\
  53                 SRCS:=$(JDK_OUTPUTDIR)/classes,\
  54                 SUFFIXES:=.class .gif .png .properties,\
  55                 INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
  56                 JARMAIN:=sun.tools.jconsole.JConsole,\
  57                 JAR:=$(IMAGES_OUTPUTDIR)/lib/jconsole.jar,\
  58                 SKIP_METAINF:=true))
  59 
  60 JARS+=$(IMAGES_OUTPUTDIR)/lib/jconsole.jar
  61 
  62 ##########################################################################################
  63 
  64 $(eval $(call SetupArchive,BUILD_DNS_JAR,,\
  65                 SRCS:=$(JDK_OUTPUTDIR)/classes,\
  66                 INCLUDES:=sun/net/spi/nameservice/dns,\
  67                 EXTRA_FILES:=META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor,\
  68                 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar,\
  69                 SKIP_METAINF:=true))
  70 
  71 JARS+=$(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar
  72 
  73 ##########################################################################################
  74 
  75 LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
  76                               iw ja ko lt lv mk ms mt nl no pl pt ro ru sk sl sq sr sv \
  77                               th tr uk vi zh
  78 
  79 LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/,$(LOCALEDATA_INCLUDE_LOCALES)) \
  80                        $(addprefix sun/util/resources/,$(LOCALEDATA_INCLUDE_LOCALES))
  81 
  82 # For non-US English locale data
  83 
  84 LOCALEDATA_INCLUDES += \
  85                 sun/text/resources/en/FormatData_en_AU.class \
  86                 sun/text/resources/en/FormatData_en_CA.class \
  87                 sun/text/resources/en/FormatData_en_GB.class \
  88                 sun/text/resources/en/FormatData_en_IE.class \
  89                 sun/text/resources/en/FormatData_en_IN.class \
  90                 sun/text/resources/en/FormatData_en_MT.class \
  91                 sun/text/resources/en/FormatData_en_NZ.class \
  92                 sun/text/resources/en/FormatData_en_PH.class \
  93                 sun/text/resources/en/FormatData_en_SG.class \
  94                 sun/text/resources/en/FormatData_en_ZA.class \
  95                 sun/util/resources/en/CalendarData_en_GB.class \
  96                 sun/util/resources/en/CalendarData_en_IE.class \
  97                 sun/util/resources/en/CalendarData_en_MT.class \
  98                 sun/util/resources/en/CurrencyNames_en_AU.class \
  99                 sun/util/resources/en/CurrencyNames_en_CA.class \
 100                 sun/util/resources/en/CurrencyNames_en_GB.class \
 101                 sun/util/resources/en/CurrencyNames_en_IE.class \
 102                 sun/util/resources/en/CurrencyNames_en_IN.class \
 103                 sun/util/resources/en/CurrencyNames_en_MT.class \
 104                 sun/util/resources/en/CurrencyNames_en_NZ.class \
 105                 sun/util/resources/en/CurrencyNames_en_PH.class \
 106                 sun/util/resources/en/CurrencyNames_en_SG.class \
 107                 sun/util/resources/en/CurrencyNames_en_ZA.class \
 108                 sun/util/resources/en/LocaleNames_en_MT.class \
 109                 sun/util/resources/en/LocaleNames_en_PH.class \
 110                 sun/util/resources/en/LocaleNames_en_SG.class \
 111                 sun/util/resources/en/TimeZoneNames_en_CA.class \
 112                 sun/util/resources/en/TimeZoneNames_en_GB.class \
 113                 sun/util/resources/en/TimeZoneNames_en_IE.class
 114 
 115 $(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\
 116                 SRCS:=$(JDK_OUTPUTDIR)/classes,\
 117                 SUFFIXES:=.class _dict _th,\
 118                 INCLUDES:=$(LOCALEDATA_INCLUDES),\
 119                 EXCLUDES:=sun/text/resources/th/BreakIteratorRules_th.class,\
 120                 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar,\
 121                 SKIP_METAINF:=true))
 122 
 123 JARS+=$(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar
 124 
 125 ##########################################################################################
 126 # rt.jar and resources.jar are being built in the same way as in the old build. They require
 127 # the files to be in a certain order and converting that is not easy and will not be needed
 128 # in jigsaw anyway.
 129 
 130 # Exclude list for rt.jar and resources.jar
 131 RT_JAR_EXCLUDES := \
 132         com/oracle/security \
 133         com/sun/codemodel \
 134         com/sun/crypto/provider \
 135         com/sun/istack/internal/tools \
 136         com/sun/jarsigner \
 137         com/sun/javadoc \
 138         com/sun/jdi \
 139         com/sun/net/ssl/internal/ssl \
 140         com/sun/source \
 141         com/sun/tools \
 142         com/sun/xml/internal/dtdparser \
 143         com/sun/xml/internal/rngom \
 144         com/sun/xml/internal/xsom \
 145         javax/crypto \
 146         javax/swing/AbstractButtonBeanInfo.class \
 147         javax/swing/beaninfo \
 148         javax/swing/BoxBeanInfo.class \
 149         javax/swing/JAppletBeanInfo.class \
 150         javax/swing/JButtonBeanInfo.class \
 151         javax/swing/JCheckBoxBeanInfo.class \
 152         javax/swing/JCheckBoxMenuItemBeanInfo.class \
 153         javax/swing/JColorChooserBeanInfo.class \
 154         javax/swing/JComboBoxBeanInfo.class \
 155         javax/swing/JComponentBeanInfo.class \
 156         javax/swing/JDesktopPaneBeanInfo.class \
 157         javax/swing/JDialogBeanInfo.class \
 158         javax/swing/JEditorPaneBeanInfo.class \
 159         javax/swing/JFileChooserBeanInfo.class \
 160         javax/swing/JFormattedTextFieldBeanInfo.class \
 161         javax/swing/JFrameBeanInfo.class \
 162         javax/swing/JInternalFrameBeanInfo.class \
 163         javax/swing/JLabelBeanInfo.class \
 164         javax/swing/JLayeredPaneBeanInfo.class \
 165         javax/swing/JListBeanInfo.class \
 166         javax/swing/JMenuBarBeanInfo.class \
 167         javax/swing/JMenuBeanInfo.class \
 168         javax/swing/JMenuItemBeanInfo.class \
 169         javax/swing/JOptionPaneBeanInfo.class \
 170         javax/swing/JPanelBeanInfo.class \
 171         javax/swing/JPasswordFieldBeanInfo.class \
 172         javax/swing/JPopupMenuBeanInfo.class \
 173         javax/swing/JProgressBarBeanInfo.class \
 174         javax/swing/JRadioButtonBeanInfo.class \
 175         javax/swing/JRadioButtonMenuItemBeanInfo.class \
 176         javax/swing/JScrollBarBeanInfo.class \
 177         javax/swing/JScrollPaneBeanInfo.class \
 178         javax/swing/JSeparatorBeanInfo.class \
 179         javax/swing/JSliderBeanInfo.class \
 180         javax/swing/JSpinnerBeanInfo.class \
 181         javax/swing/JSplitPaneBeanInfo.class \
 182         javax/swing/JTabbedPaneBeanInfo.class \
 183         javax/swing/JTableBeanInfo.class \
 184         javax/swing/JTextAreaBeanInfo.class \
 185         javax/swing/JTextFieldBeanInfo.class \
 186         javax/swing/JTextPaneBeanInfo.class \
 187         javax/swing/JToggleButtonBeanInfo.class \
 188         javax/swing/JToolBarBeanInfo.class \
 189         javax/swing/JTreeBeanInfo.class \
 190         javax/swing/JWindowBeanInfo.class \
 191         javax/swing/SwingBeanInfoBase.class \
 192         javax/swing/text/JTextComponentBeanInfo.class \
 193         META-INF/services/com.sun.jdi.connect.Connector \
 194         META-INF/services/com.sun.jdi.connect.spi.TransportService \
 195         META-INF/services/com.sun.tools.attach.spi.AttachProvider \
 196         META-INF/services/com.sun.tools.xjc.Plugin \
 197         META-INF/services/java.nio.charset.spi.CharsetProvider \
 198         META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
 199         org/relaxng/datatype \
 200         sun/awt/HKSCS.class \
 201         sun/awt/motif/X11GB2312.class \
 202         sun/awt/motif/X11GB2312\$$$$Decoder.class \
 203         sun/awt/motif/X11GB2312\$$$$Encoder.class \
 204         sun/awt/motif/X11GBK.class \
 205         sun/awt/motif/X11GBK\$$$$Encoder.class \
 206         sun/awt/motif/X11KSC5601.class \
 207         sun/awt/motif/X11KSC5601\$$$$Decoder.class \
 208         sun/awt/motif/X11KSC5601\$$$$Encoder.class \
 209         sun/jvmstat \
 210         sun/net/spi/nameservice/dns \
 211         sun/nio/cs/ext \
 212         sun/rmi/rmic \
 213         sun/security/ec/ECDHKeyAgreement.class \
 214         sun/security/ec/ECDSASignature.class \
 215         sun/security/ec/ECDSASignature\$$$$Raw.class \
 216         sun/security/ec/ECDSASignature\$$$$SHA1.class \
 217         sun/security/ec/ECDSASignature\$$$$SHA224.class \
 218         sun/security/ec/ECDSASignature\$$$$SHA256.class \
 219         sun/security/ec/ECDSASignature\$$$$SHA384.class \
 220         sun/security/ec/ECDSASignature\$$$$SHA512.class \
 221         sun/security/ec/ECKeyFactory.class \
 222         sun/security/ec/ECKeyPairGenerator.class \
 223         sun/security/ec/SunEC\$$$$1.class \
 224         sun/security/ec/SunEC.class \
 225         sun/security/ec/SunECEntries.class \
 226         sun/security/internal \
 227         sun/security/mscapi \
 228         sun/security/pkcs11 \
 229         sun/security/provider/Sun.class \
 230         sun/security/rsa/SunRsaSign.class \
 231         sun/security/ssl \
 232         sun/security/tools/jarsigner \
 233         sun/swing/BeanInfoUtils.class \
 234         sun/text/resources/cldr \
 235         sun/tools/asm \
 236         sun/tools/attach \
 237         sun/tools/java \
 238         sun/tools/javac \
 239         sun/tools/jcmd \
 240         sun/tools/jconsole \
 241         sun/tools/jinfo \
 242         sun/tools/jmap \
 243         sun/tools/jps \
 244         sun/tools/jstack \
 245         sun/tools/jstat \
 246         sun/tools/jstatd \
 247         sun/tools/native2ascii \
 248         sun/tools/serialver \
 249         sun/tools/tree \
 250         sun/tools/util \
 251         sun/util/cldr/CLDRLocaleDataMetaInfo.class \
 252         sun/util/resources/cldr \
 253         $(LOCALEDATA_INCLUDES)
 254 
 255 # These files should never be put into rt.jar
 256 # but due to a misstake...some are put there if embedded
 257 #
 258 ifneq ($(JAVASE_EMBEDDED), true)
 259 # normal (correct) case
 260 RT_JAR_EXCLUDES += \
 261         com/oracle/jrockit/jfr \
 262         oracle/jrockit/jfr
 263 else
 264 # embedded (broken) case
 265 RT_JAR_EXCLUDES += \
 266   oracle/jrockit/jfr/parser \
 267   oracle/jrockit/jfr/tools \
 268   oracle/jrockit/jfr/NativeOptions.class \
 269   oracle/jrockit/jfr/RepositoryChunkHandler.class
 270 endif
 271 
 272 ifeq ($(OPENJDK_TARGET_OS), macosx)
 273         RT_JAR_EXCLUDES += com/sun/nio/sctp \
 274                            sun/nio/ch/sctp
 275 endif
 276 
 277 # Find all files in the classes dir to use as dependencies. This could be more fine granular.
 278 ALL_FILES_IN_CLASSES := $(call not-containing,_the.,$(filter-out %javac_state,\
 279                         $(call CacheFind,$(JDK_OUTPUTDIR)/classes)))
 280 
 281 RT_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib/_the.rt.jar_manifest
 282 RESOURCE_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib/_the.resources.jar_manifest
 283 
 284 $(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
 285         $(MKDIR) -p $(@D)
 286         $(RM) $@ $@.tmp
 287         $(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
 288                -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
 289                $(MAINMANIFEST) >> $@.tmp
 290         $(ECHO) >> $@.tmp
 291         $(CAT) $(BEANMANIFEST) >> $@.tmp
 292         $(MV) $@.tmp $@
 293 
 294 $(RESOURCE_JAR_MANIFEST_FILE): $(MAINMANIFEST)
 295         $(MKDIR) -p $(@D)
 296         $(RM) $@ $@.tmp
 297         $(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
 298                -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
 299                $(MAINMANIFEST) >> $@.tmp
 300         $(MV) $@.tmp $@
 301 
 302 $(IMAGES_OUTPUTDIR)/lib/_the.jars.exclude: $(MAKEFILE)
 303         $(MKDIR) -p $(@D)
 304         $(RM) $@ $@.tmp
 305         $(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@.tmp)
 306         $(MV) $@.tmp $@
 307 
 308 $(IMAGES_OUTPUTDIR)/lib/classlist : $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
 309   $(MAKEFILE)
 310         $(MKDIR) -p $(@D)
 311         $(RM) $@ $@.tmp
 312         $(TOOL_ADDJSUM) $< $@.tmp
 313         $(MV) $@.tmp $@
 314 
 315 $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents: $(BUILD_TOOLS) $(IMAGES_OUTPUTDIR)/lib/_the.jars.exclude \
 316                                          $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
 317         $(MKDIR) -p $(@D)
 318         $(RM) $@ $@.tmp
 319         ($(CD) $(JDK_OUTPUTDIR)/classes && \
 320             $(TOOL_JARREORDER) \
 321                 -o  $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib/_the.jars.exclude . )
 322         $(MV) $@.tmp $@
 323 
 324 $(IMAGES_OUTPUTDIR)/lib/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents
 325         $(MKDIR) -p $(@D)
 326         $(RM) $@ $@.tmp
 327         $(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents > $@.tmp
 328         $(MV) $@.tmp $@
 329 
 330 $(IMAGES_OUTPUTDIR)/lib/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents
 331         $(MKDIR) -p $(@D)
 332         $(RM) $@ $@.tmp
 333         $(GREP) -v -e '\.class$$' \
 334             -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
 335             $(IMAGES_OUTPUTDIR)/lib/_the.jars.contents > $@.tmp
 336         $(MV) $@.tmp $@
 337 
 338 RT_JAR_CREATE_OPTIONS := c0fm
 339 ifeq ($(COMPRESS_JARS), true)
 340     RT_JAR_CREATE_OPTIONS := cfm
 341 endif
 342 
 343 $(IMAGES_OUTPUTDIR)/lib/rt.jar: $(IMAGES_OUTPUTDIR)/lib/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE)
 344         $(ECHO) Creating rt.jar
 345         $(MKDIR) -p $(@D)
 346         $(RM) $@ $@.tmp
 347         $(CD) $(JDK_OUTPUTDIR)/classes && \
 348             $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
 349                 @$(IMAGES_OUTPUTDIR)/lib/_the.rt.jar.contents
 350         $(MV) $@.tmp $@
 351 
 352 $(IMAGES_OUTPUTDIR)/lib/resources.jar: $(IMAGES_OUTPUTDIR)/lib/_the.resources.jar.contents \
 353                                     $(RESOURCE_JAR_MANIFEST_FILE)
 354         $(ECHO) Creating resources.jar
 355         $(MKDIR) -p $(@D)
 356         $(RM) $@ $@.tmp
 357         $(CD) $(JDK_OUTPUTDIR)/classes && \
 358             $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
 359                 @$(IMAGES_OUTPUTDIR)/lib/_the.resources.jar.contents
 360         $(MV) $@.tmp $@
 361 
 362 JARS+=$(IMAGES_OUTPUTDIR)/lib/rt.jar $(IMAGES_OUTPUTDIR)/lib/resources.jar
 363 
 364 ##########################################################################################
 365 
 366 ifneq ($(OPENJDK_TARGET_OS), windows)
 367     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
 375 endif
 376 
 377 $(eval $(call SetupArchive,BUILD_CHARSETS_JAR,,\
 378                 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, \
 384                 JAR:=$(IMAGES_OUTPUTDIR)/lib/charsets.jar, \
 385                 SKIP_METAINF := true, \
 386                 CHECK_COMPRESS_JAR:=true))
 387 
 388 JARS+=$(IMAGES_OUTPUTDIR)/lib/charsets.jar
 389 
 390 ##########################################################################################
 391 
 392 ifndef OPENJDK
 393 ifeq ($(ENABLE_JFR), true)
 394     $(eval $(call SetupArchive,BUILD_JFR_JAR,,\
 395                 SRCS:=$(JDK_OUTPUTDIR)/classes,\
 396                 INCLUDES:=com/oracle/jrockit/jfr \
 397                           oracle/jrockit/jfr,\
 398                 JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\
 399                 SKIP_METAINF:=true,\
 400                 MANIFEST:=$(MAINMANIFEST), \
 401                 CHECK_COMPRESS_JAR:=true))
 402 
 403     JARS+=$(IMAGES_OUTPUTDIR)/lib/jfr.jar
 404 endif
 405 endif
 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,\
 415                 JAR:=$(IMAGES_OUTPUTDIR)/lib/jsse.jar,\
 416                 SKIP_METAINF:=true,\
 417                 MANIFEST:=$(MAINMANIFEST), \
 418                 CHECK_COMPRESS_JAR:=true))
 419 
 420 JARS+=$(IMAGES_OUTPUTDIR)/lib/jsse.jar
 421 
 422 ##########################################################################################
 423 # Create manifest for security jars
 424 
 425 #
 426 # Include these extra attributes for now, should probably take out.
 427 #
 428 JCE_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 ##########################################################################################
 440 # For all security jars, always build the jar, but for closed, install the prebuilt signed
 441 # version instead of the newly built jar. For open, signing is not needed. See SignJars.gmk
 442 # for more information.
 443 
 444 SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
 445 SUNPKCS11_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunpkcs11.jar
 446 
 447 $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,,\
 448         SRCS:=$(JDK_OUTPUTDIR)/classes, \
 449         SUFFIXES:=.class,\
 450         INCLUDES:=sun/security/pkcs11,\
 451         JAR:=$(SUNPKCS11_JAR_UNSIGNED), \
 452         MANIFEST:=$(JCE_MANIFEST), \
 453         SKIP_METAINF := true))
 454 
 455 $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
 456 
 457 ifndef OPENJDK
 458     SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
 459     $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
 460         @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
 461         $(install-file)
 462 else
 463     $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_UNSIGNED)
 464         $(install-file)
 465 endif
 466 
 467 JARS += $(SUNPKCS11_JAR_DST) $(SUNPKCS11_JAR_UNSIGNED)
 468 
 469 ##########################################################################################
 470 
 471 SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar
 472 SUNEC_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunec.jar
 473 
 474 $(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
 475                 SRCS:=$(JDK_OUTPUTDIR)/classes, \
 476                 SUFFIXES:=.class,\
 477                 INCLUDES:=sun/security/ec,\
 478                 JAR:=$(SUNEC_JAR_UNSIGNED), \
 479                 MANIFEST:=$(JCE_MANIFEST), \
 480                 SKIP_METAINF := true))
 481 
 482 $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
 483 
 484 ifndef OPENJDK
 485     SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
 486     $(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
 487         @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
 488         $(install-file)
 489 else
 490     $(SUNEC_JAR_DST) : $(SUNEC_JAR_UNSIGNED)
 491         $(install-file)
 492 endif
 493 
 494 JARS += $(SUNEC_JAR_DST) $(SUNEC_JAR_UNSIGNED)
 495 
 496 ##########################################################################################
 497 
 498 $(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,,\
 499                 SRCS:=$(JDK_OUTPUTDIR)/classes,\
 500                 SUFFIXES:=BeanInfo.class .gif,\
 501                 INCLUDES:=javax/swing sun/swing,\
 502                 EXCLUDES:=javax/swing/plaf,\
 503                 EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
 504                 JAR:=$(IMAGES_OUTPUTDIR)/lib/dt.jar,\
 505                 SKIP_METAINF:=true))
 506 
 507 JARS+=$(IMAGES_OUTPUTDIR)/lib/dt.jar
 508 
 509 ##########################################################################################
 510 
 511 SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
 512 SUNJCE_PROVIDER_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunjce_provider.jar
 513 
 514 $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
 515                 SRCS:=$(JDK_OUTPUTDIR)/classes, \
 516                 SUFFIXES:=.class,\
 517                 INCLUDES:= com/sun/crypto/provider,\
 518                 JAR:=$(SUNJCE_PROVIDER_JAR_UNSIGNED), \
 519                 MANIFEST:=$(JCE_MANIFEST), \
 520                 SKIP_METAINF := true))
 521 
 522 $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
 523 
 524 ifndef OPENJDK
 525     SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
 526     $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_SRC)
 527         @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
 528         $(install-file)
 529 else
 530     $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_UNSIGNED)
 531         $(install-file)
 532 endif
 533 
 534 JARS += $(SUNJCE_PROVIDER_JAR_DST) $(SUNJCE_PROVIDER_JAR_UNSIGNED)
 535 
 536 ##########################################################################################
 537 
 538 JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
 539 JCE_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/jce.jar
 540 
 541 $(eval $(call SetupArchive,BUILD_JCE_JAR,,\
 542                 SRCS:=$(JDK_OUTPUTDIR)/classes, \
 543                 SUFFIXES:=.class,\
 544                 INCLUDES:= javax/crypto sun/security/internal,\
 545                 JAR:=$(JCE_JAR_UNSIGNED), \
 546                 MANIFEST:=$(JCE_MANIFEST), \
 547                 SKIP_METAINF := true))
 548 
 549 $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
 550 
 551 ifndef OPENJDK
 552     JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
 553     $(JCE_JAR_DST) : $(JCE_JAR_SRC)
 554         @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
 555         $(install-file)
 556 else
 557     $(JCE_JAR_DST) : $(JCE_JAR_UNSIGNED)
 558         $(install-file)
 559 endif
 560 
 561 JARS += $(JCE_JAR_DST) $(JCE_JAR_UNSIGNED)
 562 
 563 ##########################################################################################
 564 
 565 US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
 566 US_EXPORT_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/US_export_policy.jar
 567 
 568 #
 569 # TODO fix so that SetupArchive does not write files into SRCS
 570 #   then we don't need this extra copying
 571 #
 572 # NOTE:  We currently do not place restrictions on our limited export
 573 # policy.  This was not a typo.
 574 #
 575 US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
 576 US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
 577 
 578 $(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
 579         $(install-file)
 580 
 581 US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
 582 
 583 $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
 584                 SRCS:=$(US_EXPORT_POLICY_JAR_TMP), \
 585                 SUFFIXES:= .policy,\
 586                 JAR:=$(US_EXPORT_POLICY_JAR_UNSIGNED), \
 587                 EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
 588                 SKIP_METAINF := true))
 589 
 590 ifndef OPENJDK
 591     $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
 592         $(ECHO) $(LOG_INFO) Copying $(@F)
 593         $(install-file)
 594 else
 595     $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED)
 596         $(install-file)
 597 endif
 598 
 599 JARS += $(US_EXPORT_POLICY_JAR_DST) $(US_EXPORT_POLICY_JAR_UNSIGNED)
 600 
 601 ##########################################################################################
 602 
 603 LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
 604 LOCAL_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/local_policy.jar
 605 
 606 #
 607 # TODO fix so that SetupArchive does not write files into SRCS
 608 #   then we don't need this extra copying
 609 #
 610 LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
 611 
 612 ifeq ($(UNLIMITED_CRYPTO), true)
 613     LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
 614     LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
 615     LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
 616 else
 617     LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
 618     LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
 619                              $(LOCAL_POLICY_JAR_TMP)/default_local.policy
 620     LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
 621 endif
 622 
 623 $(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
 624         $(install-file)
 625 
 626 $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
 627                 SRCS:=$(LOCAL_POLICY_JAR_TMP),\
 628                 SUFFIXES:= .policy,\
 629                 JAR:=$(LOCAL_POLICY_JAR_UNSIGNED), \
 630                 EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
 631                 SKIP_METAINF := true))
 632 
 633 ifndef OPENJDK
 634     $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
 635         $(ECHO) $(LOG_INFO) Copying $(@F)
 636         $(install-file)
 637 else
 638     $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED)
 639         $(install-file)
 640 endif
 641 
 642 JARS += $(LOCAL_POLICY_JAR_DST) $(LOCAL_POLICY_JAR_UNSIGNED)
 643 
 644 ##########################################################################################
 645 
 646 ifeq ($(OPENJDK_TARGET_OS),windows)
 647 
 648 SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
 649 SUNMSCAPI_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunmscapi.jar
 650 
 651 $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,,\
 652                 SRCS:=$(JDK_OUTPUTDIR)/classes, \
 653                 SUFFIXES:=.class,\
 654                 INCLUDES:= sun/security/mscapi,\
 655                 JAR:=$(SUNMSCAPI_JAR_UNSIGNED), \
 656                 SKIP_METAINF:=true))
 657 
 658 ifndef OPENJDK
 659     SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
 660     $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_SRC)
 661         @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
 662         $(install-file)
 663 else
 664     $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_UNSIGNED)
 665         $(install-file)
 666 endif
 667 
 668 JARS += $(SUNMSCAPI_JAR_DST) $(SUNMSCAPI_JAR_UNSIGNED)
 669 
 670 endif
 671 
 672 ##########################################################################################
 673 
 674 ifeq ($(OPENJDK_TARGET_OS),solaris)
 675 ifndef OPENJDK
 676 
 677 UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
 678 UCRYPTO_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/ucrypto.jar
 679 UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
 680 
 681 $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR,,\
 682                 SRCS:=$(JDK_OUTPUTDIR)/classes, \
 683                 SUFFIXES:=.class,\
 684                 INCLUDES:=com/oracle/security/ucrypto,\
 685                 JAR:=$(UCRYPTO_JAR_UNSIGNED), \
 686                 MANIFEST:=$(JCE_MANIFEST), \
 687                 SKIP_METAINF:=true))
 688 
 689 $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
 690 
 691 $(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC)
 692         @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
 693         $(install-file)
 694 
 695 JARS += $(UCRYPTO_JAR_DST) $(UCRYPTO_JAR_UNSIGNED)
 696 
 697 endif
 698 endif
 699 
 700 ##########################################################################################
 701 
 702 # Get the CLDRVERSION
 703 include GensrcCLDR.gmk
 704 
 705 CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
 706 
 707 $(eval $(call SetupArchive,BUILD_CLDRDATA_JAR,,\
 708                 SRCS:=$(JDK_OUTPUTDIR)/classes,\
 709                 SUFFIXES:=.class,\
 710                 INCLUDES:=sun/text/resources/cldr \
 711                           sun/util/cldr \
 712                           sun/util/resources/cldr,\
 713                 EXCLUDES:=sun/util/cldr/CLDRLocaleProviderAdapter,\
 714                 JAR:=$(CLDRDATA_JAR_DST),\
 715                 EXTRA_MANIFEST_ATTR:=CLDR-Version: $(CLDRVERSION),\
 716                 SKIP_METAINF:=true))
 717 
 718 JARS += $(CLDRDATA_JAR_DST)
 719 
 720 ##########################################################################################
 721 
 722 TOOLS_JAR_INCLUDES := \
 723         com/sun/codemodel       \
 724         com/sun/istack/internal/tools       \
 725         com/sun/jarsigner       \
 726         com/sun/javadoc         \
 727         com/sun/jdi             \
 728         com/sun/source          \
 729         com/sun/tools/attach    \
 730         com/sun/tools/classfile \
 731         com/sun/tools/corba     \
 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/internal/jxc             \
 738         com/sun/tools/internal/jxc/ap   \
 739         com/sun/tools/internal/ws       \
 740         com/sun/tools/internal/ws/wscompile/plugin/at_generated \
 741         com/sun/tools/internal/xjc       \
 742         com/sun/tools/javac     \
 743         com/sun/tools/javadoc   \
 744         com/sun/tools/javah     \
 745         com/sun/tools/javap     \
 746         com/sun/tools/jdi       \
 747         com/sun/tools/script/shell      \
 748         com/sun/xml/internal/dtdparser \
 749         com/sun/xml/internal/rngom       \
 750         com/sun/xml/internal/xsom       \
 751         org/relaxng/datatype   \
 752         sun/applet              \
 753         sun/jvmstat             \
 754         sun/rmi/rmic            \
 755         sun/security/tools/jarsigner \
 756         sun/tools/asm           \
 757         sun/tools/attach        \
 758         sun/tools/jar           \
 759         sun/tools/java          \
 760         sun/tools/javac         \
 761         sun/tools/jcmd          \
 762         sun/tools/jinfo         \
 763         sun/tools/jmap          \
 764         sun/tools/jps           \
 765         sun/tools/jstack        \
 766         sun/tools/jstat         \
 767         sun/tools/jstatd        \
 768         sun/tools/native2ascii  \
 769         sun/tools/serialver     \
 770         sun/tools/tree          \
 771         sun/tools/util
 772 
 773 # The sjavac tools is not ready for public consumption.
 774 TOOLS_JAR_EXCLUDES=com/sun/tools/sjavac
 775 
 776 $(eval $(call SetupArchive,BUILD_TOOLS_JAR,,\
 777                 SRCS:=$(JDK_OUTPUTDIR)/classes,\
 778                 SUFFIXES:=.class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
 779                           Tool aliasmap options,\
 780                 INCLUDES:=$(TOOLS_JAR_INCLUDES),\
 781                 EXCLUDES:=$(TOOLS_JAR_EXCLUDES),\
 782                 EXTRA_FILES:=META-INF/services/com.sun.jdi.connect.Connector \
 783                              META-INF/services/com.sun.jdi.connect.spi.TransportService \
 784                              META-INF/services/com.sun.tools.attach.spi.AttachProvider \
 785                              META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
 786                              META-INF/services/com.sun.tools.internal.xjc.Plugin,\
 787                 JAR:=$(IMAGES_OUTPUTDIR)/lib/tools.jar,\
 788                 SKIP_METAINF:=true, \
 789                 CHECK_COMPRESS_JAR:=true))
 790 
 791 JARS+=$(IMAGES_OUTPUTDIR)/lib/tools.jar
 792 
 793 ##########################################################################################
 794 
 795 include javadoc/CORE_PKGS.gmk
 796 include javadoc/NON_CORE_PKGS.gmk
 797 
 798 # The compiler should not issue a "Proprietary" warning when compiling
 799 # classes in the com.sun.java.swing.plaf packages, since we've always
 800 # allowed, and even advocated, extending them (see bug 6476749).
 801 #
 802 # This approach is NOT to be used as a general purpose way to avoid such
 803 # compiler warnings for non-core packages. The correct way is to document
 804 # the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
 805 # definition.
 806 #
 807 # Swing has taken this approach only as a temporary measure to avoid
 808 # the compiler warnings until we can properly document these packages.
 809 # This is covered under 6491853.
 810 EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows  \
 811                         com.sun.java.swing.plaf.motif    \
 812                         com.sun.java.swing.plaf.gtk
 813 
 814 #
 815 # Include the exported private packages in ct.sym.
 816 # This is an interim solution until the ct.sym is replaced
 817 # with a new module system (being discussed for JDK 8).
 818 #
 819 EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
 820                         com.oracle.net \
 821                         com.oracle.nio
 822 
 823 $(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
 824         $(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
 825         $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
 826         $(JAVA) $(JAVAC_JARS) \
 827             -bootclasspath $(JDK_OUTPUTDIR)/classes \
 828             -XDprocess.packages -proc:only \
 829             -processor com.sun.tools.javac.sym.CreateSymbols \
 830             -Acom.sun.tools.javac.sym.Jar=$(IMAGES_OUTPUTDIR)/lib/rt.jar \
 831             -Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
 832             $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
 833         $(TOUCH) $@
 834 
 835 $(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/symbols))
 836 $(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
 837                 SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
 838                 INCLUDES:=META-INF/sym,\
 839                 JAR:=$(IMAGES_OUTPUTDIR)/lib/ct.sym, \
 840                 CHECK_COMPRESS_JAR:=true))
 841 
 842 JARS+=$(IMAGES_OUTPUTDIR)/lib/ct.sym
 843 
 844 ##########################################################################################
 845 
 846 SRC_ZIP_INCLUDES = \
 847         com/sun/corba                   \
 848         com/sun/image/codec/jpeg        \
 849         com/sun/imageio                 \
 850         com/sun/java_cup                \
 851         com/sun/javadoc                 \
 852         com/sun/java/swing              \
 853         com/sun/jlex                    \
 854         com/sun/jmx                     \
 855         com/sun/naming                  \
 856         com/sun/org/apache              \
 857         com/sun/security/auth           \
 858         com/sun/security/jgss           \
 859         com/sun/source                  \
 860         java/applet                     \
 861         java/awt                        \
 862         java/beans                      \
 863         java/io                         \
 864         java/lang                       \
 865         java/math                       \
 866         java/net                        \
 867         java/nio                        \
 868         java/rmi                        \
 869         java/security                   \
 870         java/sql                        \
 871         java/text                       \
 872         java/util                       \
 873         javax/accessibility             \
 874         javax/annotation                \
 875         javax/imageio                   \
 876         javax/lang                      \
 877         javax/management                \
 878         javax/naming                    \
 879         javax/print                     \
 880         javax/rmi                       \
 881         javax/script                    \
 882         javax/security                  \
 883         javax/sound                     \
 884         javax/sql                       \
 885         javax/swing                     \
 886         javax/tools                     \
 887         javax/xml                       \
 888         org/ietf                        \
 889         org/omg                         \
 890         org/w3c/dom                     \
 891         org/xml/sax                     \
 892         sunw
 893 
 894 SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
 895 SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
 896 SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/impsrc
 897 SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
 898 ifndef OPENJDK
 899   SRC_ZIP_SRCS += $(JDK_TOPDIR)/src/closed/share/classes
 900 endif
 901 
 902 # Need to copy launcher src files into desired directory structure
 903 # before zipping the sources.
 904 LAUNCHER_SRC_FILES := $(wildcard $(JDK_TOPDIR)/src/share/bin/*) \
 905                       $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/java_md*)
 906 LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
 907                     $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
 908                         $(LAUNCHER_SRC_FILES)))
 909 
 910 $(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
 911         $(install-file)
 912 
 913 $(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%
 914         $(install-file)
 915 
 916 $(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
 917 
 918 # This dir needs to exist before macro is evaluated to avoid warning from find.
 919 $(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/src))
 920 $(eval $(call SetupZipArchive,BUILD_SRC_ZIP,\
 921                 SRC:=$(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src,\
 922                 INCLUDES:=$(SRC_ZIP_INCLUDES) launcher,\
 923                 EXCLUDES:=javax/swing/beaninfo,\
 924                 SUFFIXES:=.java .c .h,\
 925                 ZIP:=$(IMAGES_OUTPUTDIR)/src.zip,\
 926                 EXTRA_DEPS:=$(LAUNCHER_ZIP_SRC)))
 927 
 928 JARS+=$(IMAGES_OUTPUTDIR)/src.zip
 929 
 930 ##########################################################################################
 931 
 932 #
 933 # This is an empty jar (only contains manifest) and fits poorly into framework...
 934 #   create simple rule instead
 935 #
 936 $(IMAGES_OUTPUTDIR)/lib/management-agent.jar : $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
 937         $(JAR) cfm $@ $<
 938 
 939 JARS += $(IMAGES_OUTPUTDIR)/lib/management-agent.jar
 940 
 941 ##########################################################################################
 942 
 943 $(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar : $(JDK_OUTPUTDIR)/demo/nio/zipfs/zipfs.jar
 944         $(install-file)
 945 
 946 JARS += $(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar
 947 
 948 ##########################################################################################
 949 
 950 ifeq ($(OPENJDK_TARGET_OS),macosx)
 951     $(eval $(call SetupArchive,BUILD_JOBJC_JAR,,\
 952                 SRCS:=$(JDK_OUTPUTDIR)/jobjc_classes,\
 953                 JAR:=$(IMAGES_OUTPUTDIR)/lib/JObjC.jar, \
 954                 JARINDEX:=true))
 955 
 956     JARS += $(IMAGES_OUTPUTDIR)/lib/JObjC.jar
 957 endif
 958 
 959 ##########################################################################################
 960 
 961 ifndef OPENJDK
 962     $(eval $(call SetupArchive,BUILD_ALT_RT_JAR,,\
 963                 SRCS:=$(JDK_OUTPUTDIR)/altclasses_classes,\
 964                 JAR:=$(IMAGES_OUTPUTDIR)/lib/alt-rt.jar))
 965 
 966     JARS += $(IMAGES_OUTPUTDIR)/lib/alt-rt.jar
 967 endif
 968 
 969 ##########################################################################################
 970 
 971 # This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
 972 # all jars can be found in one place when creating images in Images.gmk. It needs to be
 973 # done here so that clean targets can be simple and accurate.
 974 $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar: $(JDK_OUTPUTDIR)/lib/sa-jdi.jar
 975         $(install-file)
 976 
 977 JARS += $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar
 978 
 979 ##########################################################################################
 980 #
 981 # files under $(JDK_OUTPUTDIR) that need to go into sec-bin.zip for builds
 982 # where the corresponding sources are not available
 983 
 984 $(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP,\
 985                 SRC:=$(JDK_OUTPUTDIR),\
 986                 INCLUDES:=classes/javax/net \
 987                           classes/javax/security/cert \
 988                           classes/com/sun/net/ssl \
 989                           classes/com/sun/security/cert \
 990                           classes/sun/net/www/protocol/https \
 991                           classes/sun/security/pkcs12 \
 992                           classes/sun/security/ssl \
 993                           classes/sun/security/krb5 \
 994                           classes/sun/security/krb5/internal \
 995                           classes/sun/security/krb5/internal/ccache \
 996                           classes/sun/security/krb5/internal/crypto \
 997                           classes/sun/security/krb5/internal/ktab \
 998                           classes/sun/security/krb5/internal/rcache \
 999                           classes/sun/security/krb5/internal/util,\
1000                 INCLUDE_FILES:=classes/sun/security/jgss/spi/GSSContextSpi.class,\
1001                 ZIP:=$(IMAGES_OUTPUTDIR)/sec-bin.zip))
1002 
1003 JARS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
1004 
1005 ##########################################################################################
1006 
1007 -include $(CUSTOM_MAKE_DIR)/CreateJars.gmk
1008 
1009 ##########################################################################################
1010 
1011 all: $(JARS)
1012 
1013 .PHONY: default all