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