1 #
   2 # Copyright (c) 1997, 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 $(JDK_TOPDIR)/make/docs/CORE_PKGS.gmk
  27 include $(JDK_TOPDIR)/make/docs/NON_CORE_PKGS.gmk
  28 
  29 # What jdk version are we building
  30 THIS_JDK_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
  31 
  32 #
  33 # Perform release engineering tasks.
  34 #
  35 # images    An image is what the product looks like when it is
  36 #           installed.
  37 #
  38 
  39 IMAGE_BINDIR = bin
  40 
  41 # The compiler should not issue a "Proprietary" warning when compiling
  42 # classes in the com.sun.java.swing.plaf packages, since we've always
  43 # allowed, and even advocated, extending them (see bug 6476749).
  44 #
  45 # This approach is NOT to be used as a general purpose way to avoid such
  46 # compiler warnings for non-core packages. The correct way is to document
  47 # the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
  48 # definition.
  49 #
  50 # Swing has taken this approach only as a temporary measure to avoid
  51 # the compiler warnings until we can properly document these packages.
  52 # This is covered under 6491853.
  53 EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows  \
  54                         com.sun.java.swing.plaf.motif    \
  55                         com.sun.java.swing.plaf.gtk
  56 
  57 #
  58 # Include the exported private packages in ct.sym.
  59 # This is an interim solution until the ct.sym is replaced
  60 # with a new module system (being discussed for JDK 8).
  61 #
  62 EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
  63                         com.oracle.net \
  64                         com.oracle.nio
  65 
  66 # 64-bit solaris has a few special cases. We define the variable
  67 # SOLARIS64 for use in this Makefile to easily test those cases
  68 ifeq ($(PLATFORM), solaris)
  69   ifeq ($(ARCH_DATA_MODEL), 64)
  70     SOLARIS64 = true
  71     IMAGE_BINDIR = bin/$(ARCH)
  72   endif
  73 endif
  74 
  75 JTG_DOCS            = $(JDK_TOPDIR)/src/solaris/doc
  76 
  77 ifeq ($(PLATFORM), macosx)
  78   include $(JDK_TOPDIR)/make/common/Release-$(PLATFORM).gmk
  79 endif
  80 
  81 # The base names of all the license and document files for the jdk and jre
  82 #   (These files get placed in the jdk and jre install images)
  83 ifdef OPENJDK
  84   # Where to find these files
  85   SHARE_JDK_DOC_SRC = $(JDK_TOPDIR)
  86   SHARE_JRE_DOC_SRC = $(JDK_TOPDIR)
  87   # Same files for jdk and jre, no name changes
  88   IMAGE_DOCLIST_JDK = LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
  89   IMAGE_DOCLIST_JDK_DEMOS_AND_SAMPLES =
  90   IMAGE_DOCLIST_JRE = LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
  91 else
  92   # make/closed/common/Defs.gmk for closed location of SHARE_JDK_DOC_SRC
  93 
  94   IMAGE_DOCLIST_JDK = COPYRIGHT README.html  LICENSE THIRDPARTYLICENSEREADME.txt
  95   IMAGE_DOCLIST_JDK_DEMOS_AND_SAMPLES = demo/DEMOS_LICENSE sample/SAMPLES_LICENSE
  96   IMAGE_DOCLIST_JRE = COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
  97   ifeq ($(PLATFORM), windows)
  98     IMAGE_DOCLIST_JRE += README.txt
  99   else
 100     IMAGE_DOCLIST_JRE += README
 101   endif
 102 endif
 103 
 104 # Paths to these files we need
 105 JDK_DOCFILES   = $(IMAGE_DOCLIST_JDK:%=$(JDK_IMAGE_DIR)/%)
 106 JRE_DOCFILES   = $(IMAGE_DOCLIST_JRE:%=$(JRE_IMAGE_DIR)/%)
 107 JDK_DEMOS_AND_SAMPLES_DOCFILES = $(IMAGE_DOCLIST_JDK_DEMOS_AND_SAMPLES:%=$(JDK_IMAGE_DIR)/%)
 108 
 109 # absolute directory names: note, these must exist prior to build
 110 # time - they are created in the main Makefile.
 111 JRE_IMAGE_BINDIR   = $(JRE_IMAGE_DIR)/bin
 112 
 113 MAINMANIFEST  = $(JDK_TOPDIR)/make/tools/manifest.mf
 114 BEANMANIFEST  = $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest
 115 
 116 #
 117 # Man pages
 118 #
 119 
 120 JRE_MAN_PAGES =         \
 121         java.1          \
 122         keytool.1       \
 123         orbd.1          \
 124         pack200.1       \
 125         policytool.1    \
 126         rmid.1          \
 127         rmiregistry.1   \
 128         servertool.1    \
 129         tnameserv.1     \
 130         unpack200.1
 131 
 132 ifndef OPENJDK
 133   JRE_MAN_PAGES += javaws.1
 134 endif
 135 
 136 JDK_MAN_PAGES =            \
 137         $(JRE_MAN_PAGES)   \
 138         appletviewer.1     \
 139         extcheck.1         \
 140         idlj.1             \
 141         jar.1              \
 142         jarsigner.1        \
 143         javac.1            \
 144         javadoc.1          \
 145         javah.1            \
 146         javap.1            \
 147         jcmd.1             \
 148         jconsole.1         \
 149         jdb.1              \
 150         jhat.1             \
 151         jinfo.1            \
 152         jmap.1             \
 153         jps.1              \
 154         jrunscript.1       \
 155         jsadebugd.1        \
 156         jstack.1           \
 157         jstat.1            \
 158         jstatd.1           \
 159         native2ascii.1     \
 160         rmic.1             \
 161         schemagen.1        \
 162         serialver.1        \
 163         wsgen.1            \
 164         wsimport.1         \
 165         xjc.1
 166 
 167 ifndef OPENJDK
 168   JDK_MAN_PAGES += jvisualvm.1
 169 endif
 170 
 171 ifeq ($(PLATFORM), solaris)
 172   MANBASEDIRS=$(JDK_TOPDIR)/src/solaris/doc $(IMPORTDOCDIR)
 173   MAN1SUBDIR=sun/man/man1
 174 endif # solaris
 175 
 176 ifeq ($(PLATFORM), linux)
 177   MANBASEDIRS=$(JDK_TOPDIR)/src/linux/doc $(IMPORTDOCDIR)
 178   MAN1SUBDIR=man
 179   JA_DIRNAME=ja_JP.UTF-8
 180 endif # linux
 181 
 182 define copy-man-pages
 183 $(MKDIR) -p $1/man/man1
 184 for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \
 185   for manpage in $2; do \
 186     if [ -f $${manbase}/$${manpage} ] ; then \
 187       $(CP) $${manbase}/$${manpage} $1/man/man1 ; \
 188       for ja_encoding in $(JA_TARGET_ENCODINGS); do \
 189         ja_dir="ja"; \
 190         if [ "$${ja_encoding}" != "$(JA_SOURCE_ENCODING)" ]; then \
 191           ja_dir="ja_JP.$${ja_encoding}"; \
 192         fi; \
 193         $(MKDIR) -p $1/man/$${ja_dir}/man1; \
 194         $(CAT) $${manbase}/ja/$${manpage} \
 195           | $(NATIVE2ASCII) -encoding $(JA_SOURCE_ENCODING) \
 196           | $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
 197           | $(NATIVE2ASCII) -reverse -encoding $${ja_encoding} \
 198             > $1/man/$${ja_dir}/man1/$${manpage}; \
 199       done; \
 200     fi; \
 201   done; \
 202 done
 203 $(java-vm-cleanup)
 204 if [ "$(JA_DIRNAME)" != "" ] ; then \
 205   $(CD) $1/man && $(RM) ja && $(LN) -s $(JA_DIRNAME) ja; \
 206 fi
 207 endef
 208 
 209 
 210 # no compression unless requested
 211 ifndef COMPRESS_JARS
 212   CREATE_JAR_OPTS = c0mf
 213   CREATE_JAR_OPTS_NOMANIFEST = c0f
 214 else
 215   CREATE_JAR_OPTS = cmf
 216   CREATE_JAR_OPTS_NOMANIFEST = cf
 217 endif
 218 
 219 #
 220 # Targets.
 221 #
 222 INITIAL_IMAGE_JRE=initial-image-jre
 223 INITIAL_IMAGE_JDK=initial-image-jdk
 224 ifeq ($(PLATFORM), solaris)
 225   ifeq ($(ARCH_DATA_MODEL), 64)
 226     INITIAL_IMAGE_JRE=initial-image-jre-sol64
 227     INITIAL_IMAGE_JDK=initial-image-jdk-sol64
 228   endif
 229 endif
 230 
 231 images images-clobber \
 232 initial-image-jre initial-image-jdk \
 233 initial-image-jre-sol64 initial-image-jdk-sol64 \
 234 trim-image-jre trim-image-jdk \
 235 identify-image-jre identify-image-jdk \
 236 process-image-jre process-image-jdk \
 237 compare-image \
 238 sec-files sec-files-win jgss-files ::
 239         @$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
 240 
 241 # Order is important here, trim jre after jdk image is created
 242 ifeq ($(PLATFORM), macosx)
 243 
 244 images:: sanity-images post-sanity-images  \
 245          $(INITIAL_IMAGE_JRE) $(EXTRA_JRE_TARGETS) $(INITIAL_IMAGE_JDK) \
 246          trim-image-jre trim-image-jdk \
 247      identify-image-jre identify-image-jdk \
 248          process-image-jre process-image-jdk sec-files sec-files-win jgss-files \
 249          $(EXTRA_IMAGE_TARGETS)
 250 else
 251 
 252 images:: sanity-images post-sanity-images  \
 253          $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \
 254          trim-image-jre trim-image-jdk \
 255          identify-image-jre identify-image-jdk \
 256          process-image-jre process-image-jdk sec-files sec-files-win jgss-files 
 257 endif
 258 
 259 # Don't use these
 260 image-jre:: initial-image-jre trim-image-jre identify-image-jre process-image-jre
 261 image-jdk:: initial-image-jdk trim-image-jdk identify-image-jdk process-image-jdk
 262 
 263 #
 264 # Sources we ship in the SDK.
 265 #
 266 SOURCES = \
 267         java/applet                     \
 268         java/awt                        \
 269         java/beans                      \
 270         java/io                         \
 271         java/lang                       \
 272         java/math                       \
 273         java/net                        \
 274         java/nio                        \
 275         java/rmi                        \
 276         java/security                   \
 277         java/sql                        \
 278         java/text                       \
 279         java/util                       \
 280         com/sun/corba                   \
 281         com/sun/image/codec/jpeg        \
 282         com/sun/imageio                 \
 283         com/sun/java/swing              \
 284         com/sun/javadoc                 \
 285         com/sun/jmx                     \
 286         com/sun/source                  \
 287         com/sun/naming                  \
 288         com/sun/security/auth           \
 289         com/sun/security/jgss           \
 290         javax/accessibility             \
 291         javax/annotation                \
 292         javax/script                    \
 293         javax/imageio                   \
 294         javax/lang                      \
 295         javax/management                \
 296         javax/naming                    \
 297         javax/print                     \
 298         javax/rmi                       \
 299         javax/security                  \
 300         javax/sound                     \
 301         javax/sql                       \
 302         javax/swing                     \
 303         javax/tools                     \
 304         javax/xml                       \
 305         com/sun/org/apache              \
 306         com/sun/java_cup                \
 307         com/sun/jlex                    \
 308         org/ietf                        \
 309         org/omg                         \
 310         org/w3c/dom                     \
 311         org/xml/sax
 312 #
 313 # Directories where sources may be found.  If a file with the same path
 314 # name exists in more than one of these places, the one found last on this
 315 # list wins.
 316 #
 317 SOURCE_DIRS = $(SHARE_SRC)/classes $(PLATFORM_SRC)/classes
 318 SOURCE_DIRS += $(GENSRCDIR)
 319 SOURCE_DIRS += $(IMPORTSRCDIR)
 320 ifndef OPENJDK
 321   SOURCE_DIRS += $(CLOSED_SRC)/share/classes
 322 endif
 323 
 324 
 325 #
 326 # Specific files and directories that will be filtered out from above areas.
 327 #
 328 SOURCE_FILTERs = $(SCM_DIRs) ',*'
 329 SOURCE_FILES_filter = $(SOURCE_FILTERs:%=-name % -prune -o)
 330 
 331 #
 332 # Bug 4249883 - excluding some unnecessary packages from com.sun.tools
 333 #
 334 # Bug 5008685 - exclude jconsole from sun/tools
 335 #
 336 TOOLS = \
 337         META-INF/services/com.sun.jdi.connect.Connector \
 338         META-INF/services/com.sun.jdi.connect.spi.TransportService \
 339         sun/tools/asm           \
 340         sun/tools/jar           \
 341         sun/tools/java          \
 342         sun/tools/javac         \
 343         sun/tools/jcmd          \
 344         sun/tools/jps           \
 345         sun/tools/jstat         \
 346         sun/tools/jstatd        \
 347         sun/tools/native2ascii  \
 348         sun/tools/serialver     \
 349         sun/tools/tree          \
 350         sun/tools/util          \
 351         sun/security/tools/jarsigner/JarBASE64Encoder.class \
 352         sun/security/tools/jarsigner/Main.class \
 353         sun/security/tools/jarsigner/JarSignerParameters.class \
 354         sun/security/tools/jarsigner/Resources.class \
 355         sun/security/tools/jarsigner/Resources_ja.class \
 356         sun/security/tools/jarsigner/Resources_zh_CN.class \
 357         sun/security/tools/jarsigner/SignatureFile\$$Block.class \
 358         sun/security/tools/jarsigner/SignatureFile.class \
 359         sun/security/tools/jarsigner/TimestampedSigner.class \
 360         sun/rmi/rmic            \
 361         sun/applet              \
 362         sun/jvmstat             \
 363         com/sun/javadoc         \
 364         com/sun/jdi             \
 365         com/sun/jarsigner       \
 366         com/sun/source          \
 367         com/sun/tools/classfile \
 368         com/sun/tools/doclets   \
 369         com/sun/tools/doclint   \
 370         com/sun/tools/example/debug/expr \
 371         com/sun/tools/example/debug/tty  \
 372         com/sun/tools/extcheck  \
 373         com/sun/tools/hat       \
 374         com/sun/tools/javac     \
 375         com/sun/tools/javadoc   \
 376         com/sun/tools/javah     \
 377         com/sun/tools/javap     \
 378         com/sun/tools/jdeps     \
 379         com/sun/tools/corba     \
 380         com/sun/tools/internal/xjc       \
 381         com/sun/tools/internal/ws       \
 382         META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
 383         META-INF/services/com.sun.tools.internal.xjc.Plugin \
 384         com/sun/istack/internal/tools       \
 385         com/sun/tools/internal/jxc/ap   \
 386         com/sun/tools/internal/ws/wscompile/plugin/at_generated \
 387         com/sun/codemodel       \
 388         com/sun/tools/internal/jxc             \
 389         com/sun/xml/internal/rngom       \
 390         com/sun/xml/internal/xsom       \
 391         org/relaxng/datatype   \
 392         com/sun/xml/internal/dtdparser \
 393         com/sun/tools/jdi       \
 394         com/sun/tools/script/shell      \
 395         META-INF/services/com.sun.tools.attach.spi.AttachProvider \
 396         com/sun/tools/attach    \
 397         sun/tools/attach        \
 398         sun/tools/jstack        \
 399         sun/tools/jinfo         \
 400         sun/tools/jmap
 401 
 402 # classes that go into jfr.jar
 403 JFR_CLASSES_DIRS= \
 404         com/oracle/jrockit/jfr \
 405         oracle/jrockit/jfr
 406 
 407 # classes that go into jsse.jar
 408 JSSE_CLASSES_DIRS = \
 409         sun/security/provider/Sun.class \
 410         sun/security/rsa/SunRsaSign.class \
 411         sun/security/ssl \
 412         com/sun/net/ssl/internal/ssl
 413 
 414 # files under $(OUTPUTDIR) that need to go into sec-bin.zip for builds
 415 # where the corresponding sources are not available
 416 SEC_FILES_DIRS = \
 417         classes/javax/net \
 418         classes/javax/security/cert \
 419         classes/com/sun/net/ssl \
 420         classes/com/sun/security/cert \
 421         classes/sun/net/www/protocol/https \
 422         classes/sun/security/pkcs12 \
 423         classes/sun/security/ssl \
 424         classes/sun/security/krb5/*.class \
 425         classes/sun/security/krb5/internal/*.class \
 426         classes/sun/security/krb5/internal/ccache \
 427         classes/sun/security/krb5/internal/crypto \
 428         classes/sun/security/krb5/internal/ktab \
 429         classes/sun/security/krb5/internal/rcache \
 430         classes/sun/security/krb5/internal/util \
 431         classes/sun/security/jgss/spi/GSSContextSpi.class
 432 
 433 # files under $(OUTPUTDIR) that need to go into sec-windows-win.zip for builds
 434 # where the corresponding sources are not available
 435 SEC_FILES_WIN_DIRS = \
 436         classes/sun/security/krb5/internal/tools
 437 
 438 # files under $(BINDIR) that need to go into jgss_files.zip for builds
 439 # where the corresponding sources are not available
 440 JGSS_FILES_DIRS = \
 441         bin/w2k_lsa_auth.dll \
 442         bin/w2k_lsa_auth.map \
 443         bin/w2k_lsa_auth.pdb
 444 
 445 # The following get removed from the SDK image.
 446 NOTJDKTOOLS = \
 447         java_vm
 448 
 449 # The following get removed from the JRE after the bulk-copy of BINDIR...
 450 NOTJRETOOLS = \
 451         appletviewer$(EXE_SUFFIX) \
 452         extcheck$(EXE_SUFFIX) \
 453         idlj$(EXE_SUFFIX) \
 454         jar$(EXE_SUFFIX) \
 455         jarsigner$(EXE_SUFFIX) \
 456         java-rmi.cgi \
 457         javac$(EXE_SUFFIX) \
 458         javadoc$(EXE_SUFFIX) \
 459         javah$(EXE_SUFFIX) \
 460         javap$(EXE_SUFFIX) \
 461         jdeps$(EXE_SUFFIX) \
 462         jcmd$(EXE_SUFFIX) \
 463         jdb$(EXE_SUFFIX) \
 464         jps$(EXE_SUFFIX) \
 465         jrunscript$(EXE_SUFFIX) \
 466         jstat$(EXE_SUFFIX) \
 467         jstatd$(EXE_SUFFIX) \
 468         jstack$(EXE_SUFFIX) \
 469         packagebean$(SCRIPT_SUFFIX) \
 470         rmic$(EXE_SUFFIX) \
 471         serialver$(EXE_SUFFIX) \
 472         unregbean$(EXE_SUFFIX) \
 473         jconsole$(EXE_SUFFIX) \
 474         jinfo$(EXE_SUFFIX) \
 475         jmap$(EXE_SUFFIX) \
 476         native2ascii$(EXE_SUFFIX) \
 477         xjc$(EXE_SUFFIX) \
 478         wsgen$(EXE_SUFFIX) \
 479         wsimport$(EXE_SUFFIX) \
 480         schemagen$(EXE_SUFFIX) \
 481         jsadebugd$(EXE_SUFFIX) \
 482         jhat$(EXE_SUFFIX)
 483 
 484 # The following get removed from the JRE after the bulk-copy of LIBDIR...
 485 NOTJRELIBS = tools.jar \
 486         jconsole.jar
 487 
 488 ifeq ($(INCLUDE_SA), true)
 489   NOTJRELIBS += sa-jdi.jar
 490 
 491   # The following get removed from the JRE after the bulk-copy of LIBDIR...
 492   NOTJRE_SHARED_LIBS = $(SALIB_NAME)
 493 else
 494   NOTJRE_SHARED_LIBS =
 495 endif
 496 
 497 # Attach library is JDK only
 498 NOTJRE_SHARED_LIBS += $(LIB_PREFIX)attach.$(LIBRARY_SUFFIX)
 499 
 500 #
 501 ###### RULES
 502 
 503 # Processing license files from source area to image area
 504 #    These will be modified to have the platform specific EOL chars.
 505 define process-doc-file
 506 $(prep-target)
 507 $(SED) 's/$$//g' $< > $@
 508 $(CHMOD) 444 $@
 509 endef
 510 
 511 # JDK files
 512 $(JDK_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%
 513         $(process-doc-file)
 514 
 515 $(JDK_IMAGE_DIR)/demo/DEMOS_LICENSE: $(SHARE_JDK_DOC_SRC)/DEMOS_LICENSE
 516         $(process-doc-file)
 517 
 518 $(JDK_IMAGE_DIR)/sample/SAMPLES_LICENSE: $(SHARE_JDK_DOC_SRC)/SAMPLES_LICENSE
 519         $(process-doc-file)
 520 
 521 # JRE files
 522 $(JRE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%
 523         $(process-doc-file)
 524 ifeq ($(PLATFORM), windows)
 525 $(JRE_IMAGE_DIR)/README.txt: $(SHARE_JRE_DOC_SRC)/README
 526         $(process-doc-file)
 527 endif
 528 
 529 # Differences tool
 530 DIRDIFF_JARFILE = $(BUILDTOOLJARDIR)/dirdiff.jar
 531 
 532 ######################################################
 533 # List of directories in classes directory that should NOT be in rt.jar
 534 ######################################################
 535 
 536 NOT_RT_JAR_LIST = $(ABS_TEMPDIR)/not_rt_jar.list
 537 
 538 $(NOT_RT_JAR_LIST): FRC
 539         $(prep-target)
 540         $(ECHO) "#\n" >> $@
 541         $(ECHO) "# List of subdirectories not in include in rt.jar" >> $@
 542         $(ECHO) "# Directories must contain trailing '/'." >> $@
 543         $(ECHO) "com/sun/javadoc/" >> $@
 544         $(ECHO) "com/sun/jdi/" >> $@
 545         $(ECHO) "com/sun/jarsigner/" >> $@
 546         $(ECHO) "com/sun/source/" >> $@
 547         $(ECHO) "com/sun/istack/internal/tools/" >> $@
 548         $(ECHO) "META-INF/services/com.sun.jdi.connect.Connector" >> $@
 549         $(ECHO) "META-INF/services/com.sun.jdi.connect.spi.TransportService" >> $@
 550         $(ECHO) "META-INF/services/com.sun.tools.xjc.Plugin" >> $@
 551         $(ECHO) "com/sun/tools/" >> $@
 552         $(ECHO) "sun/jvmstat/" >> $@
 553         $(ECHO) "sun/nio/cs/ext/" >> $@
 554         $(ECHO) "sun/awt/HKSCS.class" >> $@
 555         $(ECHO) "sun/awt/motif/X11GB2312\$$Decoder.class" >> $@
 556         $(ECHO) "sun/awt/motif/X11GB2312\$$Encoder.class" >> $@
 557         $(ECHO) "sun/awt/motif/X11GB2312.class" >> $@
 558         $(ECHO) "sun/awt/motif/X11GBK\$$Encoder.class" >> $@
 559         $(ECHO) "sun/awt/motif/X11GBK.class" >> $@
 560         $(ECHO) "sun/awt/motif/X11KSC5601\$$Decoder.class" >> $@
 561         $(ECHO) "sun/awt/motif/X11KSC5601\$$Encoder.class" >> $@
 562         $(ECHO) "sun/awt/motif/X11KSC5601.class" >> $@
 563         $(ECHO) "sun/rmi/rmic/" >> $@
 564         $(ECHO) "sun/tools/asm/" >> $@
 565         $(ECHO) "sun/tools/java/" >> $@
 566         $(ECHO) "sun/tools/javac/" >> $@
 567         $(ECHO) "com/sun/tools/classfile/" >> $@
 568         $(ECHO) "com/sun/tools/javap/" >> $@
 569         $(ECHO) "com/sun/tools/jdeps/" >> $@
 570         $(ECHO) "sun/tools/jcmd/" >> $@
 571         $(ECHO) "sun/tools/jconsole/" >> $@
 572         $(ECHO) "sun/tools/jps/" >> $@
 573         $(ECHO) "sun/tools/jstat/" >> $@
 574         $(ECHO) "sun/tools/jstatd/" >> $@
 575         $(ECHO) "sun/tools/native2ascii/" >> $@
 576         $(ECHO) "sun/tools/serialver/" >> $@
 577         $(ECHO) "sun/tools/tree/" >> $@
 578         $(ECHO) "sun/tools/util/" >> $@
 579         $(ECHO) "sun/security/tools/jarsigner/JarBASE64Encoder.class" >> $@
 580         $(ECHO) "sun/security/tools/jarsigner/Main.class" >> $@
 581         $(ECHO) "sun/security/tools/jarsigner/JarSignerParameters.class" >> $@
 582         $(ECHO) "sun/security/tools/jarsigner/Resources.class" >> $@
 583         $(ECHO) "sun/security/tools/jarsigner/Resources_ja.class" >> $@
 584         $(ECHO) "sun/security/tools/jarsigner/Resources_zh_CN.class" >> $@
 585         $(ECHO) "sun/security/tools/jarsigner/SignatureFile\$$Block.class" >> $@
 586         $(ECHO) "sun/security/tools/jarsigner/SignatureFile.class" >> $@
 587         $(ECHO) "sun/security/tools/jarsigner/TimestampedSigner.class" >> $@
 588         $(ECHO) "sun/security/provider/Sun.class" >> $@
 589         $(ECHO) "sun/security/rsa/SunRsaSign.class" >> $@
 590         $(ECHO) "sun/security/ssl/" >> $@
 591         $(ECHO) "com/sun/net/ssl/internal/ssl/" >> $@
 592         $(ECHO) "javax/crypto/" >> $@
 593         $(ECHO) "sun/security/internal/" >> $@
 594         $(ECHO) "com/sun/crypto/provider/" >> $@
 595         $(ECHO) "META-INF/services/com.sun.tools.attach.spi.AttachProvider" >> $@
 596         $(ECHO) "com/sun/tools/attach/" >> $@
 597         $(ECHO) "org/relaxng/datatype/" >> $@
 598         $(ECHO) "com/sun/codemodel/" >> $@
 599         $(ECHO) "com/sun/xml/internal/dtdparser/" >> $@
 600         $(ECHO) "com/sun/xml/internal/rngom/" >> $@
 601         $(ECHO) "com/sun/xml/internal/xsom/" >> $@
 602         $(ECHO) "com/sun/tools/script/shell/" >> $@
 603         $(ECHO) "sun/tools/attach/" >> $@
 604         $(ECHO) "sun/tools/jstack/" >> $@
 605         $(ECHO) "sun/tools/jinfo/" >> $@
 606         $(ECHO) "sun/tools/jmap/" >> $@
 607 ifndef OPENJDK
 608 ifndef JAVASE_EMBEDDED
 609         $(ECHO) "com/oracle/jrockit/jfr/" >> $@
 610         $(ECHO) "com/oracle/jrockit/jfr/client/" >> $@
 611         $(ECHO) "com/oracle/jrockit/jfr/management/" >> $@
 612         $(ECHO) "oracle/jrockit/jfr/" >> $@
 613         $(ECHO) "oracle/jrockit/jfr/events/" >> $@
 614         $(ECHO) "oracle/jrockit/jfr/openmbean/" >> $@
 615         $(ECHO) "oracle/jrockit/jfr/parser/" >> $@
 616         $(ECHO) "oracle/jrockit/jfr/settings/" >> $@
 617         $(ECHO) "oracle/jrockit/jfr/tools/" >> $@
 618 endif
 619 endif
 620 
 621 
 622 # File order list for rt.jar
 623 #     - sun.applet is included, till hotjava stops relying on it.
 624 #     - sun.tools.jar is included, needs cleanup.
 625 #
 626 REORDER_TEMPDIR=$(ABS_TEMPDIR)/reorder
 627 TOTAL_JAR_FILELIST=$(REORDER_TEMPDIR)/file_list
 628 
 629 JARFILELISTS_TEMPDIR=$(ABS_TEMPDIR)/jarfilelists
 630 RT_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/rt_jar_list
 631 RES_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/resources_jar_list
 632 
 633 JARREORDER_JARFILE = $(ABS_BUILDTOOLJARDIR)/jarreorder.jar
 634 
 635 $(TOTAL_JAR_FILELIST): $(JARREORDER_JARFILE) $(NOT_RT_JAR_LIST)
 636         $(prep-target)
 637         $(RM) $@.temp
 638         ($(CD) $(CLASSBINDIR) && \
 639             $(BOOT_JAVA_CMD) -jar $(JARREORDER_JARFILE) \
 640                 -o  $@.temp $(ABS_LIBDIR)/classlist $(NOT_RT_JAR_LIST) . )
 641         $(MV) $@.temp $@
 642         @($(CD) $(CLASSBINDIR) && $(java-vm-cleanup))
 643 
 644 # Create jfr.jar
 645 JFR_JAR=
 646 ifndef OPENJDK
 647 ifndef JAVASE_EMBEDDED
 648 JFR_JAR=$(ABS_TEMPDIR)/jfr-orig.jar
 649 $(JFR_JAR): $(OTHER_JAR_MANIFEST_FILE)
 650         $(prep-target)
 651         $(CD) $(CLASSBINDIR) && \
 652             $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
 653                 $(JFR_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
 654         @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
 655 endif
 656 endif
 657 
 658 # Create the rt.jar file list & non-class files list
 659 
 660 JARSPLIT_JARFILE = $(BUILDTOOLJARDIR)/jarsplit.jar
 661 
 662 $(RT_JAR_FILELIST) + $(RES_JAR_FILELIST): \
 663     $(TOTAL_JAR_FILELIST) $(JARSPLIT_JARFILE)
 664         @$(RM) $(RT_JAR_FILELIST) $(RES_JAR_FILELIST)
 665         $(MKDIR) -p $(JARFILELISTS_TEMPDIR)
 666         $(BOOT_JAVA_CMD) -jar $(JARSPLIT_JARFILE) \
 667                 $(TOTAL_JAR_FILELIST) \
 668                 -o  $(RT_JAR_FILELIST) $(RES_JAR_FILELIST)
 669         @$(java-vm-cleanup)
 670 
 671 # Create the manifest file.
 672 RT_JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/rt_manifest.tmp
 673 $(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
 674         $(prep-target)
 675         $(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
 676                -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
 677                $(MAINMANIFEST) >> $@
 678         $(ECHO) >> $@
 679         $(CAT) $(BEANMANIFEST) >> $@
 680 
 681 OTHER_JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/other_manifest.tmp
 682 $(OTHER_JAR_MANIFEST_FILE): $(MAINMANIFEST)
 683         $(prep-target)
 684         $(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
 685                -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
 686                $(MAINMANIFEST) >> $@
 687 
 688 # Create resources.jar containing non-class files
 689 RESOURCES_JAR=$(ABS_TEMPDIR)/resources-orig.jar
 690 $(RESOURCES_JAR): $(RES_JAR_FILELIST) $(OTHER_JAR_MANIFEST_FILE)
 691         $(prep-target)
 692         $(CD) $(CLASSBINDIR) && \
 693             $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
 694                 @$(RES_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
 695         @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
 696 
 697 # Create jsse.jar containing SunJSSE implementation classes
 698 JSSE_JAR=$(ABS_TEMPDIR)/jsse-orig.jar
 699 $(JSSE_JAR): $(OTHER_JAR_MANIFEST_FILE)
 700         $(prep-target)
 701         $(CD) $(CLASSBINDIR) && \
 702             $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
 703                 $(JSSE_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
 704         @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
 705 
 706 # Create sec-bin.zip
 707 SEC_FILES_ZIP=$(ABS_TEMPDIR)/sec-bin.zip
 708 sec-files::
 709         $(prep-target)
 710         $(RM) $(SEC_FILES_ZIP)
 711         $(CD) $(OUTPUTDIR) && \
 712                 $(ZIPEXE) -rq9 $(SEC_FILES_ZIP) $(SEC_FILES_DIRS)
 713         @$(java-vm-cleanup)
 714 
 715 # Create sec-windows-bin.zip
 716 SEC_FILES_WIN_ZIP=$(ABS_TEMPDIR)/sec-windows-bin.zip
 717 sec-files-win::
 718 ifeq ($(PLATFORM), windows)
 719         $(prep-target)
 720         $(RM) $(SEC_FILES_WIN_ZIP)
 721         $(CD) $(OUTPUTDIR) && \
 722                 $(ZIPEXE) -rq9 $(SEC_FILES_WIN_ZIP) $(SEC_FILES_WIN_DIRS)
 723         @$(java-vm-cleanup)
 724 endif
 725 
 726 # Create JGSS files that contains the native Kerberos library
 727 JGSS_WIN32_FILES_ZIP=$(ABS_TEMPDIR)/jgss-windows-i586-bin.zip
 728 JGSS_WIN64_FILES_ZIP=$(ABS_TEMPDIR)/jgss-windows-x64-bin.zip
 729 jgss-files::
 730 ifeq ($(PLATFORM), windows)
 731         $(prep-target)
 732   ifeq ($(ARCH_DATA_MODEL), 32)
 733         $(RM) $(JGSS_WIN32_FILES_ZIP)
 734         $(CD) $(OUTPUTDIR) && \
 735                 $(ZIPEXE) -rq9 $(JGSS_WIN32_FILES_ZIP) $(JGSS_FILES_DIRS)
 736   else
 737         $(RM) $(JGSS_WIN64_FILES_ZIP)
 738         $(CD) $(OUTPUTDIR) && \
 739                 $(ZIPEXE) -rq9 $(JGSS_WIN64_FILES_ZIP) $(JGSS_FILES_DIRS)
 740   endif
 741         @$(java-vm-cleanup)
 742 endif
 743 
 744 # Create rt.jar
 745 RT_JAR=$(ABS_TEMPDIR)/rt-orig.jar
 746 $(RT_JAR): $(RT_JAR_FILELIST) $(RT_JAR_MANIFEST_FILE)
 747         $(prep-target)
 748         $(CD) $(CLASSBINDIR) && \
 749             $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(RT_JAR_MANIFEST_FILE) $@ \
 750                 @$(RT_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
 751         @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
 752 
 753 # Meta-index construction to make core class loaders lazier
 754 
 755 BUILDMETAINDEX_JARFILE = $(ABS_BUILDTOOLJARDIR)/buildmetaindex.jar
 756 
 757 ######################################################
 758 # JRE Image
 759 ######################################################
 760 
 761 initial-image-jre-setup:
 762         $(RM) -r $(JRE_IMAGE_DIR)
 763         $(MKDIR) -p $(JRE_IMAGE_DIR)
 764 
 765 # 64-bit solaris jre image contains only the 64-bit add-on files.
 766 initial-image-jre-sol64:: initial-image-jre-setup
 767         @# Use tar instead of cp to preserve the symbolic links
 768         for dir in bin lib ; do \
 769           ( $(CD) $(OUTPUTDIR) && \
 770                 $(TAR) cf - `$(FIND) $$dir -name '$(ARCH)' -print` | \
 771                 ($(CD) $(JRE_IMAGE_DIR) && $(TAR) xf -) ) ; \
 772         done
 773         @# Remove some files from the jre area
 774         for t in $(NOTJRETOOLS) ; do \
 775             $(RM) $(JRE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
 776         done
 777         for l in $(NOTJRELIBS) ; do \
 778             $(RM) $(JRE_IMAGE_DIR)/lib/$$l ; \
 779         done
 780         $(RM) `$(FIND) $(JRE_IMAGE_DIR)/lib -name 'orb.idl'`
 781         $(RM) `$(FIND) $(JRE_IMAGE_DIR)/lib -name 'ir.idl'`
 782 
 783 # Construct an initial jre image (initial jdk jre) no trimming or stripping
 784 # See "initial-image-jdk-setup" for an explanation of the rm of
 785 # drive names like C:
 786 initial-image-jre:: initial-image-jre-setup \
 787                     $(JRE_DOCFILES) \
 788                     $(RT_JAR) $(RESOURCES_JAR) $(JSSE_JAR) $(JFR_JAR) \
 789                     $(BUILDMETAINDEX_JARFILE)
 790         @# Copy in bin directory
 791 ifeq ($(USING_MSYS),true)
 792         # No cpio in MinGW/MSYS
 793         $(CD) $(OUTPUTDIR) && $(TAR) -cf - bin | ($(CD) $(JRE_IMAGE_DIR) && $(TAR) -xpf -)
 794 else
 795         $(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
 796 endif
 797         @# CTE plugin security change require new empty directory lib/applet
 798         $(MKDIR) -p $(JRE_IMAGE_DIR)/lib/applet
 799         @# Copy in lib directory
 800 ifeq ($(USING_MSYS),true)
 801         # No cpio in MinGW/MSYS
 802         $(CD) $(OUTPUTDIR) && $(TAR) -cf - lib | ($(CD) $(JRE_IMAGE_DIR) && $(TAR) -xpf -)
 803 else
 804         $(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
 805 endif
 806 
 807   ifeq ($(USING_CYGWIN),true)
 808           $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
 809           $(RM) -rf $(OUTPUTDIR)/[A-Za-z]:
 810   endif
 811         @# Make sure all directories are read/execute for everyone
 812         $(CHMOD) a+rx `$(FIND) $(JRE_IMAGE_DIR) -type d`
 813         @# Remove some files from the jre area
 814         for t in $(NOTJRETOOLS) ; do \
 815             $(RM) $(JRE_IMAGE_DIR)/bin$(ISA_DIR)/$$t ; \
 816         done
 817         for l in $(NOTJRELIBS) ; do \
 818             $(RM) $(JRE_IMAGE_DIR)/lib/$$l ; \
 819         done
 820         @# Remove orb.idl and ir.idl from jre
 821         $(FIND) $(JRE_IMAGE_DIR)/lib -name 'orb.idl' -exec $(RM) \{} \;
 822         $(FIND) $(JRE_IMAGE_DIR)/lib -name 'ir.idl' -exec $(RM) \{} \;
 823         @# Copy in rt.jar & resources.jar file
 824         $(CP) $(RT_JAR) $(JRE_IMAGE_DIR)/lib/rt.jar
 825         $(CP) $(RESOURCES_JAR) $(JRE_IMAGE_DIR)/lib/resources.jar
 826         $(CP) $(JSSE_JAR) $(JRE_IMAGE_DIR)/lib/jsse.jar
 827 ifneq ($(JFR_JAR),)
 828         $(CP) $(JFR_JAR) $(JRE_IMAGE_DIR)/lib/jfr.jar
 829 endif
 830         @# Generate meta-index to make boot and extension class loaders lazier
 831         $(CD) $(JRE_IMAGE_DIR)/lib && \
 832             $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
 833                 -o meta-index *.jar
 834         @$(CD) $(JRE_IMAGE_DIR)/lib && $(java-vm-cleanup)
 835         $(CD) $(JRE_IMAGE_DIR)/lib/ext && \
 836             $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
 837                 -o meta-index *.jar
 838         @$(CD) $(JRE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup)
 839 ifeq ($(PLATFORM), macosx)
 840         @#install jobjc, apple mac only
 841         $(CP) $(OUTPUTDIR)/JObjC.build/JObjC.jar $(JRE_IMAGE_DIR)/lib/JObjC.jar
 842 endif
 843 ifeq ($(PLATFORM), windows)
 844         @# Remove certain *.lib files
 845         $(CD) $(JRE_IMAGE_DIR)/lib && \
 846             $(RM) java.$(LIB_SUFFIX) jvm.$(LIB_SUFFIX) \
 847                   awt.$(LIB_SUFFIX) jawt.$(LIB_SUFFIX)
 848   ifeq ($(ARCH_DATA_MODEL), 32)
 849         @# The Java Kernel JRE image ships with a special VM.  It is not included
 850         @# in the full JRE image, so remove it.  Also, is it only for 32-bit windows.
 851         $(CD) $(JRE_IMAGE_DIR)/bin && $(RM) -r kernel
 852   endif
 853 endif # Windows
 854 ifneq ($(PLATFORM), windows)
 855         $(call copy-man-pages,$(JRE_IMAGE_DIR),$(JRE_MAN_PAGES))
 856 endif # !windows
 857 
 858 # Trim out any extra files not for the jre shipment but wanted in the jdk jre.
 859 #   (Note the jdk WILL want the jre image before this trimming)
 860 #   Removes server VM on Windows 32bit.
 861 #   Remove certain shared libraries that should not be in the jre image
 862 #      but should be in the jdk jre image.
 863 trim-image-jre::
 864 ifeq ($(PLATFORM), windows)
 865   ifeq ($(ARCH_DATA_MODEL), 32)
 866         $(RM) -r $(JRE_IMAGE_DIR)/bin/server
 867   endif
 868   ifdef NOTJRE_SHARED_LIBS
 869         for l in $(NOTJRE_SHARED_LIBS) ; do \
 870             $(RM) $(JRE_IMAGE_DIR)/bin/$$l ; \
 871         done ;
 872   endif
 873 else # PLATFORM
 874   ifdef NOTJRE_SHARED_LIBS
 875         for l in $(NOTJRE_SHARED_LIBS) ; do \
 876             $(RM) $(JRE_IMAGE_DIR)/lib/$(LIBARCH)/$$l ; \
 877         done ;
 878   endif
 879 endif # PLATFORM
 880 
 881 # Get list of all binary (COFF or Elf) files in the jre
 882 JRE_BIN_LIST=$(TEMPDIR)/jre-bin-files.list
 883 $(JRE_BIN_LIST):
 884         $(RM) $@
 885 ifeq ($(PLATFORM), windows)
 886         $(FIND) $(JRE_IMAGE_DIR)/bin -type f -name \*.exe \
 887            -o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)" > $@
 888 else
 889         $(FIND) $(JRE_IMAGE_DIR)/lib -type f -name \*.$(LIB_SUFFIX) >> $@
 890 # The FILE command reports .debuginfo files as "ELF", but we don't want
 891 # those files in the JRE_BIN_LIST file. EXE_SUFFIX is empty on non-Windows.
 892         $(FILE) `$(FIND) $(JRE_IMAGE_DIR)/bin -type f ! -name '*.debuginfo' -name \*$(EXE_SUFFIX)` \
 893             | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
 894 endif
 895 
 896 # Post process the image (strips and mcs on Elf files we are shipping)
 897 #   (Note the jdk WILL want the jre image before this processing)
 898 process-image-jre:: $(JRE_BIN_LIST)
 899 ifneq ($(POST_STRIP_PROCESS), )
 900         @for f in `$(CAT) $(JRE_BIN_LIST)`; do \
 901           $(CHMOD) u+w $${f}; \
 902           $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
 903           $(POST_STRIP_PROCESS) $${f}; \
 904           $(CHMOD) go-w $${f}; \
 905         done
 906 endif
 907 ifneq ($(POST_MCS_PROCESS), )
 908         @for f in `$(CAT) $(JRE_BIN_LIST)`; do \
 909           $(CHMOD) u+w $${f}; \
 910           $(ECHO) $(POST_MCS_PROCESS) $${f}; \
 911           $(POST_MCS_PROCESS) $${f}; \
 912           $(CHMOD) go-w $${f}; \
 913         done
 914 endif
 915         @for f in `$(CAT) $(JRE_BIN_LIST)`; do \
 916           $(call binary_file_verification,$${f}); \
 917         done
 918         $(RM) $(JRE_BIN_LIST)
 919 
 920 ######################################################
 921 # JDK Image
 922 ######################################################
 923 # Note: cpio ($(CPIO)) sometimes leaves directories without rx access.
 924 
 925 # REMIND: the $(RM) calls for patterns like c:, d: following $(CPIO)
 926 # are because the 1.7.x versions of cygwin's cpio command drops these
 927 # in the working directory if the output path begins with that pattern
 928 # The one for the output jre subdirectory gets there because cpio sees its
 929 # own dropping in the input jre subdirectory. Need to remove both of these.
 930 # We can remove these RM's if someone figures out how to stop cpio from
 931 # leaving these there.
 932 # Note that its a real problem not because this directory can end up in the
 933 # bundle (I think it won't since it not in bin or lib and those are the
 934 # only places from which we copy everything), but because the presence
 935 # of this file causes cygwin's find to bomb out, thus breaking the build
 936 # in "install".
 937 
 938 initial-image-jdk-setup:
 939         $(RM) -r $(JDK_IMAGE_DIR)
 940         $(MKDIR) -p $(JDK_IMAGE_DIR)/jre
 941 ifeq ($(USING_MSYS),true)
 942         ($(CD) $(JRE_IMAGE_DIR) && $(TAR) -cf - . \
 943               | ($(CD) $(JDK_IMAGE_DIR)/jre && $(TAR) -xpf -))
 944 else
 945         ($(CD) $(JRE_IMAGE_DIR) && $(FIND) . -depth -print \
 946               | $(CPIO) -pdum $(JDK_IMAGE_DIR)/jre )
 947 endif
 948   ifeq ($(USING_CYGWIN),true)
 949           $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
 950           $(RM) -rf $(JDK_IMAGE_DIR)/jre/[A-Za-z]:
 951   endif
 952         $(RM) -rf $(JDK_IMAGE_DIR)/jre/man
 953         $(CHMOD) a+rx `$(FIND) $(JDK_IMAGE_DIR) -type d`
 954 
 955 initial-image-jdk64-bindemos:
 956         for dir in bin demo ; do \
 957           ( $(CD) $(OUTPUTDIR) && \
 958                 $(TAR) cf - `$(FIND) $$dir -name '$(LIBARCH)' -print` | \
 959                 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) xf -) ) ; \
 960         done
 961 
 962 # Solaris 64 bit image is special
 963 initial-image-jdk-sol64:: initial-image-jdk-setup \
 964                           initial-image-jdk64-bindemos
 965 
 966 # DB files to add
 967 ifdef OPENJDK
 968 
 969 initial-image-jdk-db:
 970 
 971 else
 972 
 973 # Create the list of db *.zip files to bundle with jdk
 974 ABS_DB_PATH  :=$(call FullPath,$(CLOSED_SHARE_SRC)/db)
 975 DB_ZIP_LIST = $(shell $(LS) $(ABS_DB_PATH)/*.zip 2>/dev/null)
 976 
 977 # Java DB image. Move the Java DB demo directory into the JDK's demo
 978 # dir and in the process, rename it to db.  Also remove index.html,
 979 # since it presumes docs are co-located. Also remove register.html (no
 980 # longer relevant).
 981 initial-image-jdk-db: $(DB_ZIP_LIST)
 982         $(MKDIR) -p $(JDK_IMAGE_DIR)/db
 983         for d in $(DB_ZIP_LIST); do \
 984           ($(CD) $(JDK_IMAGE_DIR)/db && $(UNZIP) -o $$d); \
 985         done
 986         $(CP) $(ABS_DB_PATH)/README-JDK.html $(JDK_IMAGE_DIR)/db
 987 ifndef NO_DEMOS
 988         $(RM) -rf $(DEMODIR)/db
 989         $(MV) $(JDK_IMAGE_DIR)/db/demo $(DEMODIR)/db
 990         $(CP) $(ABS_DB_PATH)/README-JDK-DEMOS.html $(DEMODIR)/db/
 991 else
 992         $(RM) -rf $(JDK_IMAGE_DIR)/db/demo
 993 endif
 994         $(RM) $(JDK_IMAGE_DIR)/db/index.html $(JDK_IMAGE_DIR)/db/register.html
 995 endif
 996 
 997 # The launcher source files we need for src.zip
 998 FILES_launcher = $(wildcard $(SHARE_SRC)/bin/*) \
 999                  $(wildcard $(PLATFORM_SRC)/bin/java_md*)
1000 
1001 # Standard jdk image
1002 initial-image-jdk:: initial-image-jdk-setup \
1003                     initial-image-jdk-db \
1004                     $(JDK_DOCFILES) \
1005                     $(JDK_DEMOS_AND_SAMPLES_DOCFILES)
1006         $(MKDIR) $(JDK_IMAGE_DIR)/lib
1007         @#
1008         @# Copy in the jars in lib that only belong in the JDK
1009         @#
1010         for l in $(NOTJRELIBS); do \
1011             if [ -r $(LIBDIR)/$$l ]; then \
1012                 $(CP) $(LIBDIR)/$$l $(JDK_IMAGE_DIR)/lib; \
1013             fi; \
1014         done
1015   ifeq ($(PLATFORM), windows)
1016         @#
1017         @# lib/
1018         @#
1019         $(CP) $(LIBDIR)/$(LIB_PREFIX)jvm.$(LIB_SUFFIX) $(JDK_IMAGE_DIR)/lib
1020         $(CP) $(LIBDIR)/$(LIB_PREFIX)jawt.$(LIB_SUFFIX) $(JDK_IMAGE_DIR)/lib
1021         @#
1022         @# bin/
1023         @#
1024         @# copy all EXE files and only certain DLL files from BINDIR
1025         $(MKDIR) -p $(JDK_IMAGE_DIR)/bin
1026         $(CP) $(BINDIR)/*$(EXE_SUFFIX) $(JDK_IMAGE_DIR)/bin
1027         $(CP) $(BINDIR)/jli.$(LIBRARY_SUFFIX) $(JDK_IMAGE_DIR)/bin
1028     ifeq ($(COMPILER_VERSION), VS2010)
1029         $(CP) $(BINDIR)/msvc*100.$(LIBRARY_SUFFIX) $(JDK_IMAGE_DIR)/bin
1030     endif
1031   else # PLATFORM
1032         @#
1033         @# bin/
1034         @#
1035         ($(CD) $(BINDIR)/.. && $(TAR) cf - \
1036             `$(FIND) bin \( -type f -o -type l \) -print `) | \
1037             ($(CD) $(JDK_IMAGE_DIR) && $(TAR) xf -)
1038   endif # PLATFORM
1039         @#
1040         @# files that might not exist need to be touched.
1041         @#
1042         $(TOUCH) $(CLASSBINDIR)/META-INF/services/com.sun.tools.internal.xjc.Plugin
1043         @#
1044         @# lib/tools.jar
1045         @#
1046         $(CD) $(CLASSBINDIR) && \
1047             $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(ABS_LIBDIR)/tools.jar \
1048                 $(TOOLS) $(BOOT_JAR_JFLAGS)
1049         @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
1050         $(CP) $(LIBDIR)/tools.jar $(JDK_IMAGE_DIR)/lib/tools.jar
1051         @#
1052         @# lib/ct.sym
1053         @#
1054         $(MKDIR) -p $(OUTPUTDIR)/symbols/META-INF/sym
1055         $(JAVAC_CMD) -XDprocess.packages -proc:only \
1056             -processor com.sun.tools.javac.sym.CreateSymbols \
1057             -Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \
1058             -Acom.sun.tools.javac.sym.Dest=$(OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
1059             $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
1060         $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(LIBDIR)/ct.sym \
1061             -C $(OUTPUTDIR)/symbols META-INF $(BOOT_JAR_JFLAGS)
1062         @$(java-vm-cleanup)
1063         $(CP) $(LIBDIR)/ct.sym $(JDK_IMAGE_DIR)/lib/ct.sym
1064         @#
1065         @# CORBA supported orb.idl and ir.idl should be copied to lib
1066         @#
1067         $(CP) $(LIBDIR)/orb.idl $(JDK_IMAGE_DIR)/lib/orb.idl
1068         $(CP) $(LIBDIR)/ir.idl $(JDK_IMAGE_DIR)/lib/ir.idl
1069   ifeq ($(PLATFORM), linux)
1070         @#
1071         @# on Linux copy jexec from jre/lib to /lib
1072         @#
1073         $(CP) $(LIBDIR)/jexec $(JDK_IMAGE_DIR)/lib/jexec
1074   endif # PLATFORM
1075         @#
1076         @# src.zip
1077         @#
1078         $(MKDIR) -p $(JDK_IMAGE_DIR)/src
1079         @#
1080         @# The '*-*' pattern in the find command excludes files named with dashes,
1081         @# such as the java.nio templates for generated classes
1082         @#
1083         @# The Linux 'tar' command cannot handle the huge command line argument
1084         @# generated by the more efficient solaris/windows method of copying files.
1085         @# So for Linux, make use of the -T option (like Solaris' -I option) of
1086         @# obtaining the list of files from a file. MKS tar has no such option.
1087 
1088   ifneq (,$(findstring $(PLATFORM), linux macosx))
1089         for d in $(SOURCE_DIRS); do \
1090           $(RM) $(ABS_TEMPDIR)/src-files.list; \
1091           ($(CD) $$d &&  \
1092             for sd in $(SOURCES) ; do \
1093               if [ -d $$sd ] ; then \
1094                 $(FIND) $$sd $(SOURCE_FILES_filter) \
1095                         -name '*.java' -print \
1096                         >> $(ABS_TEMPDIR)/src-files.list ; \
1097               fi; \
1098             done ; \
1099           ) ; \
1100           if [ -f  $(ABS_TEMPDIR)/src-files.list ] ; then \
1101             ($(CD) $$d && $(TAR) cf - -T $(ABS_TEMPDIR)/src-files.list ) \
1102                | ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \
1103           fi; \
1104         done
1105   else
1106         for d in $(SOURCE_DIRS); do \
1107           $(RM) $(ABS_TEMPDIR)/src-files.list; \
1108           ($(CD) $$d && \
1109             for sd in $(SOURCES) ; do \
1110               if [ -d $$sd ] ; then \
1111                 $(FIND) $$sd $(SOURCE_FILES_filter) \
1112                         -name '*.java' -print \
1113                         >> $(ABS_TEMPDIR)/src-files.list ; \
1114               fi; \
1115             done ; \
1116           ) ; \
1117           if [ -f  $(ABS_TEMPDIR)/src-files.list ] ; then \
1118             ($(CD) $$d && $(TAR) cf - `$(CAT) $(ABS_TEMPDIR)/src-files.list`) \
1119               | ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \
1120           fi; \
1121         done
1122   endif
1123         $(RM) $(ABS_TEMPDIR)/src-files.list
1124         $(CHMOD) -R +w $(JDK_IMAGE_DIR)/src
1125         $(MKDIR) -p $(JDK_IMAGE_DIR)/src/launcher
1126         $(CP) $(FILES_launcher) $(JDK_IMAGE_DIR)/src/launcher
1127         $(CD) $(JDK_IMAGE_DIR)/src && $(ZIPEXE) -qr ../src.zip *
1128         $(RM) -r $(JDK_IMAGE_DIR)/src
1129         @#
1130         @# demo, include
1131         @#
1132 ifndef NO_DEMOS
1133         $(CP) -r -f $(DEMODIR) $(JDK_IMAGE_DIR)
1134 endif
1135 ifndef NO_SAMPLES
1136         $(CP) -r -f $(SAMPLEDIR) $(JDK_IMAGE_DIR)
1137 endif
1138         $(CP) -r $(INCLUDEDIR) $(JDK_IMAGE_DIR)
1139         @#
1140         @# Swing BeanInfo generation
1141         @#
1142         $(CD) javax/swing/beaninfo && $(MAKE) swing-1.2-beans
1143 ifneq ($(PLATFORM), windows)
1144         $(call copy-man-pages,$(JDK_IMAGE_DIR),$(JDK_MAN_PAGES))
1145 endif # !windows
1146 
1147 # Trim out files we don't want to ship
1148 trim-image-jdk::
1149         @# Remove tools that should not be part of SDK.
1150         for t in $(NOTJDKTOOLS); do \
1151             $(RM) $(JDK_IMAGE_DIR)/bin/$${t}$(EXE_SUFFIX); \
1152         done
1153 
1154 # Get list of binary (COFF or Elf) files in the jdk
1155 JDK_BIN_LIST=$(TEMPDIR)/jdk-bin-files.list
1156 $(JDK_BIN_LIST):
1157 ifeq ($(PLATFORM), windows)
1158         $(FIND) $(JDK_IMAGE_DIR)/jre/bin -type f -name \*.exe \
1159            -o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)" > $@
1160         $(FIND) $(JDK_IMAGE_DIR)/bin -type f -name \*.exe \
1161            -o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)" >> $@
1162 else
1163         $(RM) $@
1164         $(FIND) $(JDK_IMAGE_DIR)/jre/lib -type f -name \*.$(LIB_SUFFIX) >> $@
1165 # The FILE command reports .debuginfo files as "ELF", but we don't want
1166 # those files in the JDK_BIN_LIST file. EXE_SUFFIX is empty on non-Windows.
1167         $(FILE) `$(FIND) $(JDK_IMAGE_DIR)/jre/bin -type f ! -name '*.debuginfo' -name \*$(EXE_SUFFIX)` \
1168             | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
1169         file `$(FIND) $(JDK_IMAGE_DIR)/bin -type f ! -name '*.debuginfo' -name \*$(EXE_SUFFIX)` \
1170             | $(EGREP) 'ELF' | $(CUT) -d':' -f1 >> $@
1171 endif
1172 
1173 # Post process the image (strips and mcs on files we are shipping)
1174 process-image-jdk:: $(JDK_BIN_LIST)
1175 ifneq ($(POST_STRIP_PROCESS), )
1176         @for f in `$(CAT) $(JDK_BIN_LIST)`; do \
1177           $(CHMOD) u+w $${f}; \
1178           $(ECHO) $(POST_STRIP_PROCESS) $${f}; \
1179           $(POST_STRIP_PROCESS) $${f}; \
1180           $(CHMOD) go-w $${f}; \
1181         done
1182 endif
1183 ifneq ($(POST_MCS_PROCESS), )
1184         @for f in `$(CAT) $(JDK_BIN_LIST)`; do \
1185           $(CHMOD) u+w $${f}; \
1186           $(ECHO) $(POST_MCS_PROCESS) $${f}; \
1187           $(POST_MCS_PROCESS) $${f}; \
1188           $(CHMOD) go-w $${f}; \
1189         done
1190 endif
1191         @for f in `$(CAT) $(JDK_BIN_LIST)`; do \
1192           $(call binary_file_verification,$${f}); \
1193         done
1194         $(RM) $(JDK_BIN_LIST)
1195 
1196 ###################################################################
1197 # What did we build
1198 ###################################################################
1199 
1200 # The jdk text info file that lives at the root of the install image.
1201 
1202 JDK_INFO_FILE = $(JDK_IMAGE_DIR)/release
1203 JRE_INFO_FILE = $(JRE_IMAGE_DIR)/release
1204 
1205 # Common way to emit a line into the release or info file
1206 define info-file-item # name value
1207 $(PRINTF) '%s="%s"\n' $1 $2 >> $@
1208 endef
1209 
1210 # Values to emit
1211 MINIMUM_OS_NAME    := $(REQUIRED_OS_NAME)
1212 MINIMUM_OS_VERSION := $(REQUIRED_OS_VERSION)
1213 MINIMUM_OS_ARCH    := $(ARCH)
1214 ALL_SOURCE_TIPS     = $(shell \
1215   if [ -f $(SOURCE_TIPS) ] ; then \
1216     $(CAT) $(SOURCE_TIPS) ; \
1217   fi)
1218 
1219 $(JDK_INFO_FILE): FRC
1220         $(prep-target)
1221         $(call info-file-item, "JAVA_VERSION", "$(THIS_JDK_VERSION)")
1222         $(call info-file-item, "OS_NAME",      "$(MINIMUM_OS_NAME)")
1223         $(call info-file-item, "OS_VERSION",   "$(MINIMUM_OS_VERSION)")
1224         $(call info-file-item, "OS_ARCH",      "$(MINIMUM_OS_ARCH)")
1225         $(call info-file-item, "SOURCE",       "$(ALL_SOURCE_TIPS)")
1226 
1227 # Create release file to identify this image
1228 identify-image-jdk:: $(JDK_INFO_FILE)
1229 
1230 $(JRE_INFO_FILE): FRC
1231         $(prep-target)
1232         $(call info-file-item, "JAVA_VERSION", "$(THIS_JDK_VERSION)")
1233         $(call info-file-item, "OS_NAME",      "$(MINIMUM_OS_NAME)")
1234         $(call info-file-item, "OS_VERSION",   "$(MINIMUM_OS_VERSION)")
1235         $(call info-file-item, "OS_ARCH",      "$(MINIMUM_OS_ARCH)")
1236         $(call info-file-item, "SOURCE",       "$(ALL_SOURCE_TIPS)")
1237 
1238 # Create release file to identify this image
1239 identify-image-jre:: $(JRE_INFO_FILE)
1240 
1241 ###################################################################
1242 # What do we compare against
1243 ###################################################################
1244 
1245 # The temporary files and areas created
1246 TEMP_PREV_JRE_BASE_DIR=$(TEMPDIR)/previous_jre
1247 TEMP_PREV_JDK_BASE_DIR=$(TEMPDIR)/previous_jdk
1248 TEMP_PREV_JRE_COMPARISON=$(TEMP_PREV_JRE_BASE_DIR)/previous_jre_comparison.txt
1249 TEMP_PREV_JDK_COMPARISON=$(TEMP_PREV_JDK_BASE_DIR)/previous_jdk_comparison.txt
1250 TEMP_PREV_JRE_IMAGE_DIR=$(TEMP_PREV_JRE_BASE_DIR)/jre$(PREVIOUS_JDK_VERSION)
1251 TEMP_PREV_JDK_IMAGE_DIR=$(TEMP_PREV_JDK_BASE_DIR)/jdk$(PREVIOUS_JDK_VERSION)
1252 
1253 # unbundle(sourcedir,bundlename,destdir)
1254 #    logic is slightly different if a .tar.gz file (linux)
1255 define unbundle
1256 $(RM) -r $3
1257 $(MKDIR) -p $3
1258 $(CP) $1 $3
1259 if [ "`$(BASENAME) $2 .gz`" != "$2" ] ; then \
1260   ( $(CD) $3 && ( $(GUNZIP) -dc $2 | $(TAR) xf - ) && $(RM) $2 ); \
1261 else \
1262   ( $(CD) $3 && $(TAR) xf $2 && $(RM) $2 ); \
1263 fi
1264 ( $(CD) $3 && $(RM) $2 )
1265 endef
1266 
1267 # In general, ignore the fastdebug tree, and changes in the demo and sample area
1268 COMPARE_FILTER = | $(EGREP) -v /fastdebug/ | $(EGREP) -v /demo/ | $(EGREP) -v /sample/
1269 
1270 # If a previuous image is provided, no need to install it.
1271 ifdef PREVIOUS_RELEASE_IMAGE
1272 
1273   # Just use the pre-installed images
1274   PREV_JRE_IMAGE_DIR=$(PREVIOUS_RELEASE_IMAGE)/jre
1275   PREV_JDK_IMAGE_DIR=$(PREVIOUS_RELEASE_IMAGE)
1276 
1277 else
1278 
1279   # Use the temp images we will create
1280   PREV_JRE_IMAGE_DIR=$(TEMP_PREV_JRE_IMAGE_DIR)
1281   PREV_JDK_IMAGE_DIR=$(TEMP_PREV_JDK_IMAGE_DIR)
1282 
1283 # Force the installation in this case
1284 compare-image:: install-previous-sanity install-previous-jre install-previous-jdk
1285 
1286 # Unbundle the jre
1287 $(TEMP_PREV_JRE_IMAGE_DIR)/bin/java$(EXE_SUFFIX): $(PREVIOUS_JRE_BUNDLE)
1288         $(call unbundle,$(PREVIOUS_JRE_BUNDLE),$(PREVIOUS_JRE_FILE),$(TEMP_PREV_JRE_BASE_DIR))
1289         $(TOUCH) $@
1290 
1291 # Unbundle the jdk
1292 $(TEMP_PREV_JDK_IMAGE_DIR)/bin/java$(EXE_SUFFIX): $(PREVIOUS_JDK_BUNDLE)
1293         $(call unbundle,$(PREVIOUS_JDK_BUNDLE),$(PREVIOUS_JDK_FILE),$(TEMP_PREV_JDK_BASE_DIR))
1294         $(TOUCH) $@
1295 
1296 endif
1297 
1298 # Make sure all images have a java in them (used as the touch file)
1299 install-previous-sanity:
1300         @if [ ! -f $(PREVIOUS_JRE_BUNDLE) ]; then \
1301           $(ECHO) "ERROR: You do not have access to the previous java release jre bundles. \n" \
1302             "      Please check your access to \n" \
1303             "          $(PREVIOUS_JRE_BUNDLE) \n" \
1304             "      and/or check your value of ALT_PREVIOUS_RELEASE_PATH or ALT_PREVIOUS_JRE_FILE \n" \
1305             "      This will affect you if you build the images target. \n" \
1306             "" >> $(ERROR_FILE) ; \
1307         fi
1308         @if [ ! -f $(PREVIOUS_JDK_BUNDLE) ]; then \
1309           $(ECHO) "ERROR: You do not have access to the previous java release sdk bundles. \n" \
1310           "      Please check your access to \n" \
1311           "          $(PREVIOUS_sdk_BUNDLE) \n" \
1312           "      and/or check your value of ALT_PREVIOUS_RELEASE_PATH or ALT_PREVIOUS_JDK_FILE. \n" \
1313           "      This will affect you if you build the images target. \n" \
1314           "" >> $(ERROR_FILE) ; \
1315         fi
1316 install-previous-jre: $(PREV_JRE_IMAGE_DIR)/bin/java$(EXE_SUFFIX)
1317 install-previous-jdk: $(PREV_JDK_IMAGE_DIR)/bin/java$(EXE_SUFFIX)
1318 
1319 # Create the jre comparison report
1320 $(TEMP_PREV_JRE_COMPARISON): install-previous-jre $(DIRDIFF_JARFILE)
1321         $(prep-target)
1322         $(BOOT_JAVA_CMD) -jar $(DIRDIFF_JARFILE) \
1323            $(PREV_JRE_IMAGE_DIR) $(JRE_IMAGE_DIR) | $(SORT) > $@
1324         @$(java-vm-cleanup)
1325 
1326 # Create the jdk comparison report
1327 $(TEMP_PREV_JDK_COMPARISON): install-previous-jdk $(DIRDIFF_JARFILE)
1328         $(prep-target)
1329         $(BOOT_JAVA_CMD) -jar $(DIRDIFF_JARFILE) \
1330            $(PREV_JDK_IMAGE_DIR) $(JDK_IMAGE_DIR) | $(SORT) > $@
1331         @$(java-vm-cleanup)
1332 
1333 # Clean up names in the messages printed out
1334 CAT_FILTER = $(SED) -e "s|$(JDK_IMAGE_DIR)|JDK_IMAGE|g" \
1335                     -e "s|$(JRE_IMAGE_DIR)|JRE_IMAGE|g"
1336 
1337 # Report on the jre image comparison
1338 compare-image-jre: $(TEMP_PREV_JRE_COMPARISON)
1339         @$(ECHO) "JRE Image Comparison to version $(PREVIOUS_JDK_VERSION)"
1340         @$(ECHO) "  Previous: $(PREV_JRE_IMAGE_DIR)"
1341         @$(ECHO) "  Current:  $(JRE_IMAGE_DIR)"
1342         @$(CAT) $< $(COMPARE_FILTER) | $(CAT_FILTER)
1343         ( $(ECHO) " " ; $(CAT) $< | $(CAT_FILTER) ; $(ECHO) " " ) >> $(WARNING_FILE)
1344 
1345 # Report on the jdk image comparison
1346 compare-image-jdk: $(TEMP_PREV_JDK_COMPARISON)
1347         @$(ECHO) "JDK Image Comparison to version $(PREVIOUS_JDK_VERSION)"
1348         @$(ECHO) "  Previous: $(PREV_JDK_IMAGE_DIR)"
1349         @$(ECHO) "  Current:  $(JDK_IMAGE_DIR)"
1350         $(CAT) $< $(COMPARE_FILTER) | $(CAT_FILTER)
1351         ( $(ECHO) " " ; $(CAT) $< | $(CAT_FILTER) ; $(ECHO) " " ) >> $(WARNING_FILE)
1352 
1353 # Do both image comparisons
1354 compare-image:: compare-image-jre compare-image-jdk
1355 
1356 # Clean up any temp images and reports
1357 compare-image-clobber:
1358         $(RM) -r $(TEMP_PREV_JRE_BASE_DIR)
1359         $(RM) -r $(TEMP_PREV_JDK_BASE_DIR)
1360 
1361 ######################################################
1362 # clobber
1363 ######################################################
1364 images-clobber::
1365         $(RM) -r $(REORDER_TEMPDIR)
1366         $(RM) -r $(JARFILELISTS_TEMPDIR)
1367 ifeq ($(ARCH_DATA_MODEL), 32)
1368         $(CD) javax/swing/beaninfo && $(MAKE) swingbeans.clobber
1369         $(RM) -r $(CLASSBINDIR)/META-INF
1370         $(RM) $(TEMPDIR)/tmp.jar
1371 endif
1372 ifeq ($(PLATFORM), linux)
1373         $(RM) -r $(OUTPUTDIR)/$(ARCH)
1374 endif
1375 ifeq ($(PLATFORM), windows)
1376         $(RM) $(TEMPDIR)/rebase.input
1377 endif
1378         $(RM) -r $(JDK_IMAGE_DIR)
1379         $(RM) -r $(JRE_IMAGE_DIR)
1380 
1381 images images-clobber::
1382         @$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
1383         @$(java-vm-cleanup)
1384 
1385 .PHONY: images image-jre image-jdk \
1386         initial-image-jre initial-image-jdk \
1387         initial-image-jre-sol64 initial-image-jdk-sol64 \
1388         initial-image-jdk-setup \
1389         initial-image-jdk-db \
1390         initial-image-jdk64-bindemos \
1391         initial-image-jre-setup \
1392         trim-image-jre trim-image-jdk \
1393         process-image-jre process-image-jdk \
1394         identify-image-jre identify-image-jdk \
1395         install-previous-jre install-previous-jdk \
1396         compare-image-jre compare-image-jdk \
1397         compare-image compare-image-clobber \
1398         images-clobber
1399 
1400 # Force rule
1401 FRC: