< prev index next >

common/autoconf/generated-configure.sh

Print this page

        

@@ -823,27 +823,29 @@
 JAVAC
 JAVA
 BOOT_JDK
 JAVA_CHECK
 JAVAC_CHECK
-COOKED_BUILD_NUMBER
-JDK_VERSION
-COPYRIGHT_YEAR
+VERSION_SHORT
+VERSION_STRING
+VERSION_NUMBER_FOUR_POSITIONS
+VERSION_NUMBER
+VERSION_OPT
+VERSION_BUILD
+VERSION_PRE
+VERSION_PATCH
+VERSION_SECURITY
+VERSION_MINOR
+VERSION_MAJOR
 MACOSX_BUNDLE_ID_BASE
 MACOSX_BUNDLE_NAME_BASE
 COMPANY_NAME
 JDK_RC_PLATFORM_NAME
 PRODUCT_SUFFIX
 PRODUCT_NAME
 LAUNCHER_NAME
-MILESTONE
-JDK_BUILD_NUMBER
-JDK_UPDATE_VERSION
-JDK_MICRO_VERSION
-JDK_MINOR_VERSION
-JDK_MAJOR_VERSION
-USER_RELEASE_SUFFIX
+COPYRIGHT_YEAR
 COMPRESS_JARS
 RMICONNECTOR_IIOP
 UNLIMITED_CRYPTO
 CACERTS_FILE
 TEST_IN_BUILD

@@ -1061,15 +1063,24 @@
 enable_headful
 enable_hotspot_test_in_build
 with_cacerts_file
 enable_unlimited_crypto
 enable_rmiconnector_iiop
+with_copyright_year
 with_milestone
 with_update_version
 with_user_release_suffix
 with_build_number
-with_copyright_year
+with_version_string
+with_version_pre_base
+with_version_pre_debuglevel
+with_version_opt
+with_version_build
+with_version_major
+with_version_minor
+with_version_security
+with_version_patch
 with_boot_jdk
 with_add_source_root
 with_override_source_root
 with_adds_and_overrides
 with_override_langtools

@@ -1907,17 +1918,38 @@
   --with-builddeps-dir    store downloaded build dependencies here
                           [/localhome/builddeps]
   --with-builddeps-group  chgrp the downloaded build dependencies to this
                           group
   --with-cacerts-file     specify alternative cacerts file
-  --with-milestone        Set milestone value for build [internal]
-  --with-update-version   Set update version value for build [b00]
-  --with-user-release-suffix
-                          Add a custom string to the version string if build
-                          number is not set.[username_builddateb00]
-  --with-build-number     Set build number value for build [b00]
   --with-copyright-year   Set copyright year value for build [current year]
+  --with-milestone        Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-update-version   Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-user-release-suffix
+                          Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-build-number     Deprecated. Option is kept for backwards
+                          compatibility and is ignored
+  --with-version-string   Set version string [calculated]
+  --with-version-pre-base Set the base part of the version 'PRE' field
+                          (pre-release identifier) ['internal']
+  --with-version-pre-debuglevel
+                          Set the debug level part of the version 'PRE' field
+                          (pre-release identifier) [current debug level]
+  --with-version-opt      Set version 'OPT' field (build metadata)
+                          [<timestamp>.<user>.<dirname>]
+  --with-version-build    Set version 'BUILD' field (build number) [not
+                          specified]
+  --with-version-major    Set version 'MAJOR' field (first number) [current
+                          source value]
+  --with-version-minor    Set version 'MINOR' field (second number) [current
+                          source value]
+  --with-version-security Set version 'SECURITY' field (third number) [current
+                          source value]
+  --with-version-patch    Set version 'PATCH' field (fourth number) [not
+                          specified]
   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
   --with-add-source-root  for each and every source directory, look in this
                           additional source root for the same directory; if it
                           exists and have files in it, include it in the build
   --with-override-source-root

@@ -3823,11 +3855,11 @@
 
 
 
 
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 only, as
 # published by the Free Software Foundation.  Oracle designates this

@@ -3992,27 +4024,66 @@
 #
 
 
 
 
+
+
 ###############################################################################
 #
-# Setup version numbers
+# Enable or disable the elliptic curve crypto implementation
 #
 
 
 
 
 
-
 ################################################################################
 #
 # Gcov coverage data for hotspot
 #
 
 
 #
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+###############################################################################
+#
+# Setup version numbers
+#
+
+# Verify that a given string represent a valid version number, and assing it to
+# a variable.
+# Argument 1: the variable to assign to
+# Argument 2: the value given by the user
+
+
+
+
+#
 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 only, as

@@ -4364,11 +4435,11 @@
 # definitions. It is replaced with custom functionality when building
 # custom sources.
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1432629750
+DATE_WHEN_GENERATED=1433492710
 
 ###############################################################################
 #
 # Initialization / Boot-strapping
 #

@@ -20086,16 +20157,10 @@
   fi
 
 
   ###############################################################################
   #
-  # Enable or disable the elliptic curve crypto implementation
-  #
-
-
-  ###############################################################################
-  #
   # --enable-rmiconnector-iiop
   #
   # Check whether --enable-rmiconnector-iiop was given.
 if test "${enable_rmiconnector_iiop+set}" = set; then :
   enableval=$enable_rmiconnector_iiop;

@@ -20114,121 +20179,495 @@
   #
   COMPRESS_JARS=false
 
 
 
+  # Setup default copyright year. Mostly overridden when building close to a new year.
 
-  # Source the version numbers
-  . $AUTOCONF_DIR/version-numbers
+# Check whether --with-copyright-year was given.
+if test "${with_copyright_year+set}" = set; then :
+  withval=$with_copyright_year;
+fi
+
+  if test "x$with_copyright_year" = xyes; then
+    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
+  elif test "x$with_copyright_year" != x; then
+    COPYRIGHT_YEAR="$with_copyright_year"
+  else
+    COPYRIGHT_YEAR=`date +'%Y'`
+  fi
+
+
+
+  # Warn user that old version arguments are deprecated.
 
-  # Get the settings from parameters
 
 # Check whether --with-milestone was given.
 if test "${with_milestone+set}" = set; then :
-  withval=$with_milestone;
+  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
 fi
 
-  if test "x$with_milestone" = xyes; then
-    as_fn_error $? "Milestone must have a value" "$LINENO" 5
-  elif test "x$with_milestone" != x; then
-    MILESTONE="$with_milestone"
-  fi
-  if test "x$MILESTONE" = x; then
-    MILESTONE=internal
-  fi
+
 
 
 # Check whether --with-update-version was given.
 if test "${with_update_version+set}" = set; then :
-  withval=$with_update_version;
+  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
 fi
 
-  if test "x$with_update_version" = xyes; then
-    as_fn_error $? "Update version must have a value" "$LINENO" 5
-  elif test "x$with_update_version" != x; then
-    JDK_UPDATE_VERSION="$with_update_version"
-    # On macosx 10.7, it's not possible to set --with-update-version=0X due
-    # to a bug in expr (which reduces it to just X). To work around this, we
-    # always add a 0 to one digit update versions.
-    if test "${#JDK_UPDATE_VERSION}" = "1"; then
-      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
-    fi
-  fi
+
 
 
 # Check whether --with-user-release-suffix was given.
 if test "${with_user_release_suffix+set}" = set; then :
-  withval=$with_user_release_suffix;
+  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
 fi
 
-  if test "x$with_user_release_suffix" = xyes; then
-    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
-  elif test "x$with_user_release_suffix" != x; then
-    USER_RELEASE_SUFFIX="$with_user_release_suffix"
-  fi
+
 
 
 # Check whether --with-build-number was given.
 if test "${with_build_number+set}" = set; then :
-  withval=$with_build_number;
+  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
+$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
+fi
+
+
+
+  # Source the version numbers file
+  . $AUTOCONF_DIR/version-numbers
+
+  # Some non-version number information is set in that file
+
+
+
+
+
+
+
+
+  # Override version from arguments
+
+  # If --with-version-string is set, process it first. It is possible to
+  # override parts with more specific flags, since these are processed later.
+
+# Check whether --with-version-string was given.
+if test "${with_version_string+set}" = set; then :
+  withval=$with_version_string;
+fi
+
+  if test "x$with_version_string" = xyes; then
+    as_fn_error $? "--with--version-string must have a value" "$LINENO" 5
+  elif test "x$with_version_string" != x; then
+    # Additional [] needed to keep m4 from mangling shell constructs.
+    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?(\.([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
+      VERSION_MAJOR=${BASH_REMATCH[1]}
+      VERSION_MINOR=${BASH_REMATCH[3]}
+      VERSION_SECURITY=${BASH_REMATCH[5]}
+      VERSION_PATCH=${BASH_REMATCH[7]}
+      VERSION_PRE_BASE=${BASH_REMATCH[9]}
+      VERSION_PRE_DEBUGLEVEL=${BASH_REMATCH[11]}
+      version_plus_separator=${BASH_REMATCH[13]}
+      VERSION_BUILD=${BASH_REMATCH[14]}
+      VERSION_OPT=${BASH_REMATCH[16]}
+      # Unspecified numerical fields is interpreted as 0.
+      if test "x$VERSION_MINOR" = x; then
+        VERSION_MINOR=0
+      fi
+      if test "x$VERSION_SECURITY" = x; then
+        VERSION_SECURITY=0
+      fi
+      if test "x$VERSION_PATCH" = x; then
+        VERSION_PATCH=0
+      fi
+      if test "x$version_plus_separator" != x && test "x$VERSION_BUILD$VERSION_OPT" = x; then
+        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' is missing" "$LINENO" 5
+      fi
+      # Stop the version part process from setting default values.
+      # We still allow them to explicitely override though.
+      NO_DEFAULT_VERSION_PARTS=true
+    else
+      as_fn_error $? "--with--version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
+    fi
+  fi
+
+
+# Check whether --with-version-pre-base was given.
+if test "${with_version_pre_base+set}" = set; then :
+  withval=$with_version_pre_base; with_version_pre_base_present=true
+else
+  with_version_pre_base_present=false
+fi
+
+
+  if test "x$with_version_pre_base_present" = xtrue; then
+    if test "x$with_version_pre_base" = xyes; then
+      as_fn_error $? "--with--version-pre-base must have a value" "$LINENO" 5
+    elif test "x$with_version_pre_base" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_PRE_BASE=
+    else
+      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
+       VERSION_PRE_BASE=`$ECHO "$with_version_pre_base" | $TR -c -d '[a-z][A-Z]'`
+      if test "x$VERSION_PRE_BASE" != "x$with_version_pre_base"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with--version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&5
+$as_echo "$as_me: WARNING: --with--version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&2;}
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to use "internal" as pre
+      VERSION_PRE_BASE="internal"
+    fi
+  fi
+
+
+# Check whether --with-version-pre-debuglevel was given.
+if test "${with_version_pre_debuglevel+set}" = set; then :
+  withval=$with_version_pre_debuglevel; with_version_pre_debuglevel_present=true
+else
+  with_version_pre_debuglevel_present=false
 fi
 
-  if test "x$with_build_number" = xyes; then
-    as_fn_error $? "Build number must have a value" "$LINENO" 5
-  elif test "x$with_build_number" != x; then
-    JDK_BUILD_NUMBER="$with_build_number"
+
+  if test "x$with_version_pre_debuglevel_present" = xtrue; then
+    if test "x$with_version_pre_debuglevel" = xyes; then
+      as_fn_error $? "--with--version-pre-debuglevel must have a value" "$LINENO" 5
+    elif test "x$with_version_pre_debuglevel" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_PRE_DEBUGLEVEL=
+    else
+      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
+       VERSION_PRE_DEBUGLEVEL=`$ECHO "$with_version_pre_debuglevel" | $TR -c -d '[a-z][A-Z]'`
+      if test "x$VERSION_PRE_DEBUGLEVEL" != "x$with_version_pre_debuglevel"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with--version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_DEBUGLEVEL'" >&5
+$as_echo "$as_me: WARNING: --with--version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_DEBUGLEVEL'" >&2;}
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to use the debug level name, except for release which is empty.
+      if test "x$DEBUG_LEVEL" != "xrelease"; then
+        VERSION_PRE_DEBUGLEVEL="$DEBUG_LEVEL"
+      else
+        VERSION_PRE_DEBUGLEVEL=""
   fi
-  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
-  if test "x$JDK_BUILD_NUMBER" = x; then
-    JDK_BUILD_NUMBER=b00
-    if test "x$USER_RELEASE_SUFFIX" = x; then
-      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
-      # Avoid [:alnum:] since it depends on the locale.
-      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
-      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     fi
   fi
 
-  # Now set the JDK version, milestone, build number etc.
 
+# Check whether --with-version-opt was given.
+if test "${with_version_opt+set}" = set; then :
+  withval=$with_version_opt; with_version_opt_present=true
+else
+  with_version_opt_present=false
+fi
 
 
+  if test "x$with_version_opt_present" = xtrue; then
+    if test "x$with_version_opt" = xyes; then
+      as_fn_error $? "--with--version-opt must have a value" "$LINENO" 5
+    elif test "x$with_version_opt" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_OPT=
+    else
+      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
+       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
+      if test "x$VERSION_OPT" != "x$with_version_opt"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with--version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
+$as_echo "$as_me: WARNING: --with--version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
+      fi
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
+      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
+      # Outer [ ] to quote m4.
+       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
+       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
+      VERSION_OPT="$timestamp.$username.$basedirname"
+    fi
+  fi
+
+
+# Check whether --with-version-build was given.
+if test "${with_version_build+set}" = set; then :
+  withval=$with_version_build; with_version_build_present=true
+else
+  with_version_build_present=false
+fi
+
 
+  if test "x$with_version_build_present" = xtrue; then
+    if test "x$with_version_build" = xyes; then
+      as_fn_error $? "--with--version-build must have a value" "$LINENO" 5
+    elif test "x$with_version_build" = xno; then
+      # Interpret --without-* as empty string instead of the literal "no"
+      VERSION_BUILD=
+    elif test "x$with_version_build" = x; then
+      VERSION_BUILD=
+    else
 
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
 
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_build"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_BUILD=$cleaned_value
 
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to not have a build number.
+      VERSION_BUILD=""
+      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
+      VERSION_BUILD=0
+    fi
+  fi
 
 
+# Check whether --with-version-major was given.
+if test "${with_version_major+set}" = set; then :
+  withval=$with_version_major; with_version_major_present=true
+else
+  with_version_major_present=false
+fi
 
 
+  if test "x$with_version_major_present" = xtrue; then
+    if test "x$with_version_major" = xyes; then
+      as_fn_error $? "--with--version-major must have a value" "$LINENO" 5
+    else
 
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
 
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_major"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_MAJOR=$cleaned_value
 
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is to get value from version-numbers
+      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
+    fi
+  fi
 
 
-# Check whether --with-copyright-year was given.
-if test "${with_copyright_year+set}" = set; then :
-  withval=$with_copyright_year;
+# Check whether --with-version-minor was given.
+if test "${with_version_minor+set}" = set; then :
+  withval=$with_version_minor; with_version_minor_present=true
+else
+  with_version_minor_present=false
 fi
 
-  if test "x$with_copyright_year" = xyes; then
-    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
-  elif test "x$with_copyright_year" != x; then
-    COPYRIGHT_YEAR="$with_copyright_year"
+
+  if test "x$with_version_minor_present" = xtrue; then
+    if test "x$with_version_minor" = xyes; then
+      as_fn_error $? "--with--version-minor must have a value" "$LINENO" 5
+    elif test "x$with_version_minor" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_MINOR=0
+    elif test "x$with_version_minor" = x; then
+      VERSION_MINOR=0
   else
-    COPYRIGHT_YEAR=`date +'%Y'`
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
   fi
 
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_minor"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_MINOR=$cleaned_value
 
-  if test "x$JDK_UPDATE_VERSION" != x; then
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
+    fi
   else
-    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_MINOR=0
+    fi
   fi
 
 
-  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
+# Check whether --with-version-security was given.
+if test "${with_version_security+set}" = set; then :
+  withval=$with_version_security; with_version_security_present=true
+else
+  with_version_security_present=false
+fi
+
+
+  if test "x$with_version_security_present" = xtrue; then
+    if test "x$with_version_security" = xyes; then
+      as_fn_error $? "--with--version-security must have a value" "$LINENO" 5
+    elif test "x$with_version_security" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_SECURITY=0
+    elif test "x$with_version_security" = x; then
+      VERSION_SECURITY=0
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_security"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_SECURITY=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_SECURITY=0
+    fi
+  fi
+
+
+# Check whether --with-version-patch was given.
+if test "${with_version_patch+set}" = set; then :
+  withval=$with_version_patch; with_version_patch_present=true
+else
+  with_version_patch_present=false
+fi
+
+
+  if test "x$with_version_patch_present" = xtrue; then
+    if test "x$with_version_patch" = xyes; then
+      as_fn_error $? "--with--version-patch must have a value" "$LINENO" 5
+    elif test "x$with_version_patch" = xno; then
+      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
+      VERSION_PATCH=0
+    elif test "x$with_version_patch" = x; then
+      VERSION_PATCH=0
+    else
+
+  # Additional [] needed to keep m4 from mangling shell constructs.
+  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
+    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
+  fi
+  # Extract the version number without leading zeros.
+  cleaned_value=${BASH_REMATCH[1]}
+  if test "x$cleaned_value" = x; then
+    # Special case for zero
+    cleaned_value=${BASH_REMATCH[2]}
+  fi
+
+  if test $cleaned_value -gt 255; then
+    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
+  fi
+  if test "x$cleaned_value" != "x$with_version_patch"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
+$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
+  fi
+  VERSION_PATCH=$cleaned_value
+
+    fi
+  else
+    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
+      # Default is 0, if unspecified
+      VERSION_PATCH=0
+    fi
+  fi
+
+  # Calculate derived version properties
+
+  # Set pre to "pre-base" if debug level is empty (i.e. release), or
+  # "pre-base.debug-level" otherwise.
+  if test "x$VERSION_PRE_BASE" = x && test "x$VERSION_PRE_DEBUGLEVEL" != x; then
+    as_fn_error $? "Cannot set version-pre-debuglevel when version-pre-base is empty" "$LINENO" 5
+  fi
+  VERSION_PRE=$VERSION_PRE_BASE${VERSION_PRE_DEBUGLEVEL:+.$VERSION_PRE_DEBUGLEVEL}
+
+  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
+  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
+
+  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
+  # Strip trailing zeroes from stripped_version_number
+  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
+  VERSION_NUMBER=$stripped_version_number
+
+  # The complete version string, with additional build information
+  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
+    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
+  else
+    # If either build or opt is set, we need a + separator
+    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
+  fi
+
+  # The short version string, just VERSION_NUMBER and PRE, if present.
+  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
+$as_echo_n "checking for version string... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
+$as_echo "$VERSION_STRING" >&6; }
+
+
+
+
+
+
+
+
+
+
+
 
 
 
 ###############################################################################
 #

@@ -41063,17 +41502,17 @@
     # in a custom configure script, or possibly the command line.
     # Let those variables be expanded at make time in spec.gmk.
     # The \$ are escaped to the shell, and the $(...) variables
     # are evaluated by make.
     RC_FLAGS="$RC_FLAGS \
-        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
+        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
+        -D\"JDK_VER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
+        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
+        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
   fi
 
 
   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
     # silence copyright notice and other headers.

@@ -42146,14 +42585,10 @@
     fi
   else
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
   fi
 
-  # Setup release name
-  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
-
-
   # Set some additional per-OS defines.
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
   elif test "x$OPENJDK_TARGET_OS" = xaix; then
     # FIXME: PPC64 should not be here.

@@ -54271,10 +54706,11 @@
   printf "* Debug level:    $DEBUG_LEVEL\n"
   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
   printf "* JDK variant:    $JDK_VARIANT\n"
   printf "* JVM variants:   $with_jvm_variants\n"
   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
 
   printf "\n"
   printf "Tools summary:\n"
   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
< prev index next >