annotate make/common/Release.gmk @ 4969:718bca4e685f

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