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