diff --git a/make/common/Release.gmk b/make/common/Release.gmk index 271f74695b3369423744dd543f9bc164ba481070..1dc3a208ccb54308209ae7a115adb0c114c56dd0 100644 --- a/make/common/Release.gmk +++ b/make/common/Release.gmk @@ -26,6 +26,9 @@ 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. # @@ -72,9 +75,6 @@ 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) - # The base names of all the license and document files for the jdk and jre # (These files get placed in the jdk and jre install images) ifdef OPENJDK @@ -185,7 +185,7 @@ for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \ $(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; \ @@ -215,6 +215,7 @@ images images-clobber \ initial-image-jre initial-image-jdk \ initial-image-jre-sol64 initial-image-jdk-sol64 \ trim-image-jre trim-image-jdk \ +identify-image-jre identify-image-jdk \ process-image-jre process-image-jdk \ compare-image \ sec-files sec-files-win jgss-files :: @@ -224,11 +225,12 @@ sec-files sec-files-win jgss-files :: images:: sanity-images post-sanity-images \ $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \ trim-image-jre trim-image-jdk \ + identify-image-jre identify-image-jdk \ process-image-jre process-image-jdk sec-files sec-files-win jgss-files # Don't use these -image-jre:: initial-image-jre trim-image-jre process-image-jre -image-jdk:: initial-image-jdk trim-image-jdk process-image-jdk +image-jre:: initial-image-jre trim-image-jre identify-image-jre process-image-jre +image-jdk:: initial-image-jdk trim-image-jdk identify-image-jdk process-image-jdk # # Sources we ship in the SDK. @@ -1087,6 +1089,45 @@ endif done $(RM) $(JDK_BIN_LIST) +################################################################### +# What did we build +################################################################### + +# The jdk text info file that lives at the root of the install image. + +JDK_INFO_FILE = $(JDK_IMAGE_DIR)/release +JRE_INFO_FILE = $(JRE_IMAGE_DIR)/release + +# Common way to emit a line into the release or info file +define info-file-item # name value +$(PRINTF) "%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) + +$(JDK_INFO_FILE): FRC + $(prep-target) + $(call info-file-item, "JAVA_VERSION", "$(THIS_JDK_VERSION)") + $(call info-file-item, "OS_NAME", "$(MINIMUM_OS_NAME)") + $(call info-file-item, "OS_VERSION", "$(MINIMUM_OS_VERSION)") + $(call info-file-item, "OS_ARCH", "$(MINIMUM_OS_ARCH)") + +# Create release file to identify this image +identify-image-jdk:: $(JDK_INFO_FILE) + +$(JRE_INFO_FILE): FRC + $(prep-target) + $(call info-file-item, "JAVA_VERSION", "$(THIS_JDK_VERSION)") + $(call info-file-item, "OS_NAME", "$(MINIMUM_OS_NAME)") + $(call info-file-item, "OS_VERSION", "$(MINIMUM_OS_VERSION)") + $(call info-file-item, "OS_ARCH", "$(MINIMUM_OS_ARCH)") + +# Create release file to identify this image +identify-image-jre:: $(JRE_INFO_FILE) + ################################################################### # What do we compare against ################################################################### @@ -1240,6 +1281,7 @@ images images-clobber:: initial-image-jre-setup \ trim-image-jre trim-image-jdk \ process-image-jre process-image-jdk \ + identify-image-jre identify-image-jdk \ install-previous-jre install-previous-jdk \ compare-image-jre compare-image-jdk \ compare-image compare-image-clobber \ diff --git a/make/common/shared/Defs-versions.gmk b/make/common/shared/Defs-versions.gmk index 6784be6f04ac4d1da8424bc03ce7747c8026b961..a51cb2b75d578cc6826bb2529d828df497494294 100644 --- a/make/common/shared/Defs-versions.gmk +++ b/make/common/shared/Defs-versions.gmk @@ -127,6 +127,7 @@ endif # Solaris specific ifeq ($(PLATFORM), solaris) + REQUIRED_OS_NAME = SunOS REQUIRED_OS_VERSION = 5.10 REQUIRED_OS_VARIANT_NAME = Solaris REQUIRED_OS_VARIANT_VERSION = $(REQUIRED_OS_VERSION) @@ -148,6 +149,7 @@ endif # Linux specific ifeq ($(PLATFORM), linux) + REQUIRED_OS_NAME = Linux REQUIRED_OS_VERSION = 2.6 REQUIRED_OS_VARIANT_NAME = Fedora REQUIRED_OS_VARIANT_VERSION = 9 @@ -166,6 +168,7 @@ endif # Windows specific ifeq ($(PLATFORM), windows) + REQUIRED_OS_NAME = Windows ifeq ($(ARCH_DATA_MODEL),64) REQUIRED_OS_VERSION = 5.2 REQUIRED_OS_VARIANT_NAME = Windows2003