annotate make/common/Release.gmk @ 4934:e5dacb9278b5

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