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