make/common/Release.gmk

Print this page




   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 #
  30 # Perform release engineering tasks.
  31 #
  32 # images    An image is what the product looks like when it is
  33 #           installed.
  34 #
  35 
  36 IMAGE_BINDIR = bin
  37 
  38 # The compiler should not issue a "Sun Propietary" warning when compiling
  39 # classes in the com.sun.java.swing.plaf packages, since we've always
  40 # allowed, and even advocated, extending them (see bug 6476749).
  41 #
  42 # This approach is NOT to be used as a general purpose way to avoid such
  43 # compiler warnings for non-core packages. The correct way is to document
  44 # the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
  45 # definition.
  46 #
  47 # Swing has taken this approach only as a temporary measure to avoid
  48 # the compiler warnings until we can properly document these packages.


  55 EXCLUDE_PROPWARN_PKGS += sun.dyn
  56 
  57 #
  58 # Include the exported private packages in ct.sym.
  59 # This is an interim solution until the ct.sym is replaced
  60 # with a new module system (being discussed for JDK 7).
  61 #
  62 EXPORTED_PRIVATE_PKGS = com.sun.servicetag
  63 
  64 # 64-bit solaris has a few special cases. We define the variable
  65 # SOLARIS64 for use in this Makefile to easily test those cases
  66 ifeq ($(PLATFORM), solaris)
  67   ifeq ($(ARCH_DATA_MODEL), 64)
  68     SOLARIS64 = true
  69     IMAGE_BINDIR = bin/$(ARCH)
  70   endif
  71 endif
  72 
  73 JTG_DOCS            = $(JDK_TOPDIR)/src/solaris/doc
  74 
  75 #We use this for man page header
  76 jdkversion := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
  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


 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@@/$(jdkversion)/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)


 483         schemagen$(EXE_SUFFIX) \
 484         jsadebugd$(EXE_SUFFIX) \
 485         jhat$(EXE_SUFFIX)
 486 
 487 # The following get removed from the JRE after the bulk-copy of LIBDIR...
 488 NOTJRELIBS = tools.jar \
 489         jconsole.jar
 490 
 491 ifeq ($(INCLUDE_SA), true)
 492   NOTJRELIBS += sa-jdi.jar
 493 
 494   # The following get removed from the JRE after the bulk-copy of LIBDIR...
 495   NOTJRE_SHARED_LIBS = $(SALIB_NAME)
 496 else
 497   NOTJRE_SHARED_LIBS =
 498 endif
 499 
 500 # Attach library is JDK only
 501 NOTJRE_SHARED_LIBS += $(LIB_PREFIX)attach.$(LIBRARY_SUFFIX)
 502 
























 503 #
 504 ###### RULES
 505 
 506 # Processing license files from source area to image area
 507 #    These will be modified to have the platform specific EOL chars.
 508 define process-doc-file
 509 $(prep-target)
 510 $(SED) 's/$$//g' $< > $@
 511 $(CHMOD) 444 $@
 512 endef
 513 
 514 # JDK files
 515 $(JDK_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%
 516         $(process-doc-file)
 517 # Removes LICENSE_VERSION or not
 518 ifdef LICENSE_VERSION
 519 $(JDK_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%$(LICENSE_VERSION)
 520         $(process-doc-file)
 521 $(JDK_IMAGE_DIR)/%64: $(SHARE_JDK_DOC_SRC)/%$(LICENSE_VERSION)
 522         $(process-doc-file)


 923 
 924 initial-image-jdk-db:
 925 
 926 else
 927 
 928 # Create the list of db *.zip files to bundle with jdk
 929 ABS_DB_PATH  :=$(call FullPath,$(CLOSED_SHARE_SRC)/db)
 930 DB_ZIP_LIST = $(shell $(LS) $(ABS_DB_PATH)/*.zip 2>/dev/null)
 931 
 932 initial-image-jdk-db: $(DB_ZIP_LIST)
 933         $(MKDIR) -p $(JDK_IMAGE_DIR)/db
 934         for d in $(DB_ZIP_LIST); do \
 935           ($(CD) $(JDK_IMAGE_DIR)/db && $(UNZIP) -o $$d); \
 936         done
 937 
 938 endif
 939 
 940 # Standard jdk image
 941 initial-image-jdk:: initial-image-jdk-setup \
 942                     initial-image-jdk-db \

 943                     $(JDK_LICENSES) $(JDK_DOCFILES)
 944         $(MKDIR) $(JDK_IMAGE_DIR)/lib
 945         @#
 946         @# Copy in the jars in lib that only belong in the JDK
 947         @#
 948         for l in $(NOTJRELIBS); do \
 949             if [ -r $(LIBDIR)/$$l ]; then \
 950                 $(CP) $(LIBDIR)/$$l $(JDK_IMAGE_DIR)/lib; \
 951             fi; \
 952         done
 953   ifeq ($(PLATFORM), windows)
 954         @#
 955         @# lib/
 956         @#
 957         $(CP) $(LIBDIR)/$(LIB_PREFIX)jvm.$(LIB_SUFFIX) $(JDK_IMAGE_DIR)/lib
 958         $(CP) $(LIBDIR)/$(LIB_PREFIX)jawt.$(LIB_SUFFIX) $(JDK_IMAGE_DIR)/lib
 959         @#
 960         @# bin/
 961         @#
 962         @# copy all EXE files and only certain DLL files from BINDIR




   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.


  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


 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)


 483         schemagen$(EXE_SUFFIX) \
 484         jsadebugd$(EXE_SUFFIX) \
 485         jhat$(EXE_SUFFIX)
 486 
 487 # The following get removed from the JRE after the bulk-copy of LIBDIR...
 488 NOTJRELIBS = tools.jar \
 489         jconsole.jar
 490 
 491 ifeq ($(INCLUDE_SA), true)
 492   NOTJRELIBS += sa-jdi.jar
 493 
 494   # The following get removed from the JRE after the bulk-copy of LIBDIR...
 495   NOTJRE_SHARED_LIBS = $(SALIB_NAME)
 496 else
 497   NOTJRE_SHARED_LIBS =
 498 endif
 499 
 500 # Attach library is JDK only
 501 NOTJRE_SHARED_LIBS += $(LIB_PREFIX)attach.$(LIBRARY_SUFFIX)
 502 
 503 ###############
 504 # The jdk text info file that lives at the root of the jdk installation.
 505 
 506 JDK_INFO_FILE = $(JDK_IMAGE_DIR)/jdk.release
 507 
 508 # Common way to emit a line into $(JDK_INFO_FILE)
 509 define jdk-info-file # name value
 510 $(PRINTF) "jdk.%s = %s\n" $1 $2 >> $@
 511 endef
 512 
 513 # Values to emit
 514 MINIMUM_OS_NAME    := $(REQUIRED_OS_NAME)
 515 MINIMUM_OS_VERSION := $(REQUIRED_OS_VERSION)
 516 MINIMUM_OS_ARCH    := $(ARCH)
 517 ALL_VM_CFG_FILES   := $(patsubst $(JDK_IMAGE_DIR)/%,%,$(wildcard $(JDK_IMAGE_DIR)/jre/lib/*/jvm.cfg))
 518 
 519 $(JDK_INFO_FILE): FRC
 520         $(prep-target)
 521         $(call jdk-info-file, "version",      "$(THIS_JDK_VERSION)")
 522         $(call jdk-info-file, "os.name",      "$(MINIMUM_OS_NAME)")
 523         $(call jdk-info-file, "os.version",   "$(MINIMUM_OS_VERSION)")
 524         $(call jdk-info-file, "os.arch",      "$(MINIMUM_OS_ARCH)")
 525         $(call jdk-info-file, "vm.cfg.files", "$(ALL_VM_CFG_FILES)")
 526 
 527 #
 528 ###### RULES
 529 
 530 # Processing license files from source area to image area
 531 #    These will be modified to have the platform specific EOL chars.
 532 define process-doc-file
 533 $(prep-target)
 534 $(SED) 's/$$//g' $< > $@
 535 $(CHMOD) 444 $@
 536 endef
 537 
 538 # JDK files
 539 $(JDK_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%
 540         $(process-doc-file)
 541 # Removes LICENSE_VERSION or not
 542 ifdef LICENSE_VERSION
 543 $(JDK_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%$(LICENSE_VERSION)
 544         $(process-doc-file)
 545 $(JDK_IMAGE_DIR)/%64: $(SHARE_JDK_DOC_SRC)/%$(LICENSE_VERSION)
 546         $(process-doc-file)


 947 
 948 initial-image-jdk-db:
 949 
 950 else
 951 
 952 # Create the list of db *.zip files to bundle with jdk
 953 ABS_DB_PATH  :=$(call FullPath,$(CLOSED_SHARE_SRC)/db)
 954 DB_ZIP_LIST = $(shell $(LS) $(ABS_DB_PATH)/*.zip 2>/dev/null)
 955 
 956 initial-image-jdk-db: $(DB_ZIP_LIST)
 957         $(MKDIR) -p $(JDK_IMAGE_DIR)/db
 958         for d in $(DB_ZIP_LIST); do \
 959           ($(CD) $(JDK_IMAGE_DIR)/db && $(UNZIP) -o $$d); \
 960         done
 961 
 962 endif
 963 
 964 # Standard jdk image
 965 initial-image-jdk:: initial-image-jdk-setup \
 966                     initial-image-jdk-db \
 967                     $(JDK_INFO_FILE) \
 968                     $(JDK_LICENSES) $(JDK_DOCFILES)
 969         $(MKDIR) $(JDK_IMAGE_DIR)/lib
 970         @#
 971         @# Copy in the jars in lib that only belong in the JDK
 972         @#
 973         for l in $(NOTJRELIBS); do \
 974             if [ -r $(LIBDIR)/$$l ]; then \
 975                 $(CP) $(LIBDIR)/$$l $(JDK_IMAGE_DIR)/lib; \
 976             fi; \
 977         done
 978   ifeq ($(PLATFORM), windows)
 979         @#
 980         @# lib/
 981         @#
 982         $(CP) $(LIBDIR)/$(LIB_PREFIX)jvm.$(LIB_SUFFIX) $(JDK_IMAGE_DIR)/lib
 983         $(CP) $(LIBDIR)/$(LIB_PREFIX)jawt.$(LIB_SUFFIX) $(JDK_IMAGE_DIR)/lib
 984         @#
 985         @# bin/
 986         @#
 987         @# copy all EXE files and only certain DLL files from BINDIR