make/common/Release.gmk

Print this page

        

@@ -24,10 +24,13 @@
 #
 
 include $(JDK_TOPDIR)/make/docs/CORE_PKGS.gmk
 include $(JDK_TOPDIR)/make/docs/NON_CORE_PKGS.gmk
 
+# What jdk version are we building
+THIS_JDK_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
+
 #
 # Perform release engineering tasks.
 #
 # images    An image is what the product looks like when it is
 #           installed.

@@ -70,13 +73,10 @@
   endif
 endif
 
 JTG_DOCS            = $(JDK_TOPDIR)/src/solaris/doc
 
-#We use this for man page header
-jdkversion := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
-
 # Text documents on windows use this suffix
 ifeq ($(PLATFORM), windows)
   TEXT_SUFFIX = .txt
 endif
 

@@ -212,11 +212,11 @@
           ja_dir="ja_JP.$${ja_encoding}"; \
         fi; \
         $(MKDIR) -p $1/man/$${ja_dir}/man1; \
         $(CAT) $${manbase}/ja/$${manpage} \
           | $(NATIVE2ASCII) -encoding $(JA_SOURCE_ENCODING) \
-          | $(SED) 's/@@VERSION@@/$(jdkversion)/g' \
+          | $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
           | $(NATIVE2ASCII) -reverse -encoding $${ja_encoding} \
             > $1/man/$${ja_dir}/man1/$${manpage}; \
       done; \
     fi; \
   done; \

@@ -498,10 +498,34 @@
 endif
 
 # Attach library is JDK only
 NOTJRE_SHARED_LIBS += $(LIB_PREFIX)attach.$(LIBRARY_SUFFIX)
 
+###############
+# The jdk text info file that lives at the root of the jdk installation.
+
+JDK_INFO_FILE = $(JDK_IMAGE_DIR)/jdk.release
+
+# Common way to emit a line into $(JDK_INFO_FILE)
+define jdk-info-file # name value
+$(PRINTF) "jdk.%s = %s\n" $1 $2 >> $@
+endef
+
+# Values to emit
+MINIMUM_OS_NAME    := $(REQUIRED_OS_NAME)
+MINIMUM_OS_VERSION := $(REQUIRED_OS_VERSION)
+MINIMUM_OS_ARCH    := $(ARCH)
+ALL_VM_CFG_FILES   := $(patsubst $(JDK_IMAGE_DIR)/%,%,$(wildcard $(JDK_IMAGE_DIR)/jre/lib/*/jvm.cfg))
+
+$(JDK_INFO_FILE): FRC
+        $(prep-target)
+        $(call jdk-info-file, "version",      "$(THIS_JDK_VERSION)")
+        $(call jdk-info-file, "os.name",      "$(MINIMUM_OS_NAME)")
+        $(call jdk-info-file, "os.version",   "$(MINIMUM_OS_VERSION)")
+        $(call jdk-info-file, "os.arch",      "$(MINIMUM_OS_ARCH)")
+        $(call jdk-info-file, "vm.cfg.files", "$(ALL_VM_CFG_FILES)")
+
 #
 ###### RULES
 
 # Processing license files from source area to image area
 #    These will be modified to have the platform specific EOL chars.

@@ -938,10 +962,11 @@
 endif
 
 # Standard jdk image
 initial-image-jdk:: initial-image-jdk-setup \
                     initial-image-jdk-db \
+                    $(JDK_INFO_FILE) \
                     $(JDK_LICENSES) $(JDK_DOCFILES)
         $(MKDIR) $(JDK_IMAGE_DIR)/lib
         @#
         @# Copy in the jars in lib that only belong in the JDK
         @#