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