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