author | erikj |
Fri, 26 Jun 2015 10:09:55 +0200 | |
changeset 33929 | b6f2e71b26c5 |
parent 33928 | d2c9fee88260 |
child 33948 | 9dedf718fe33 |
permissions | -rw-r--r-- |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
1 |
# |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
2 |
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
4 |
# |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
10 |
# |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
15 |
# accompanied this code). |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
16 |
# |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
20 |
# |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
23 |
# questions. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
24 |
# |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
25 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
26 |
############################################################################### |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
27 |
# |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
28 |
# Setup version numbers |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
29 |
# |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
30 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
31 |
# Verify that a given string represents a valid version number, and assign it |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
32 |
# to a variable. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
33 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
34 |
# Argument 1: the variable to assign to |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
35 |
# Argument 2: the value given by the user |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
36 |
AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
37 |
[ |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
38 |
# Additional [] needed to keep m4 from mangling shell constructs. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
39 |
if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)|(0)$ ]] ] ; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
40 |
AC_MSG_ERROR(["$2" is not a valid numerical value for $1]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
41 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
42 |
# Extract the version number without leading zeros. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
43 |
cleaned_value=${BASH_REMATCH[[1]]} |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
44 |
if test "x$cleaned_value" = x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
45 |
# Special case for zero |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
46 |
cleaned_value=${BASH_REMATCH[[2]]} |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
47 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
48 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
49 |
if test $cleaned_value -gt 255; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
50 |
AC_MSG_ERROR([$1 is given as $2. This is greater than 255 which is not allowed.]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
51 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
52 |
if test "x$cleaned_value" != "x$2"; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
53 |
AC_MSG_WARN([Value for $1 has been sanitized from '$2' to '$cleaned_value']) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
54 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
55 |
$1=$cleaned_value |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
56 |
]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
57 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
58 |
AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
59 |
[ |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
60 |
# Warn user that old version arguments are deprecated. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
61 |
BASIC_DEPRECATED_ARG_WITH([milestone]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
62 |
BASIC_DEPRECATED_ARG_WITH([update-version]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
63 |
BASIC_DEPRECATED_ARG_WITH([user-release-suffix]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
64 |
BASIC_DEPRECATED_ARG_WITH([build-number]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
65 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
66 |
# Source the version numbers file |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
67 |
. $AUTOCONF_DIR/version-numbers |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
68 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
69 |
# Some non-version number information is set in that file |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
70 |
AC_SUBST(LAUNCHER_NAME) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
71 |
AC_SUBST(PRODUCT_NAME) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
72 |
AC_SUBST(PRODUCT_SUFFIX) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
73 |
AC_SUBST(JDK_RC_PLATFORM_NAME) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
74 |
AC_SUBST(COMPANY_NAME) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
75 |
AC_SUBST(MACOSX_BUNDLE_NAME_BASE) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
76 |
AC_SUBST(MACOSX_BUNDLE_ID_BASE) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
77 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
78 |
# Override version from arguments |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
79 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
80 |
# If --with-version-string is set, process it first. It is possible to |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
81 |
# override parts with more specific flags, since these are processed later. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
82 |
AC_ARG_WITH(version-string, [AS_HELP_STRING([--with-version-string], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
83 |
[Set version string @<:@calculated@:>@])]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
84 |
if test "x$with_version_string" = xyes; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
85 |
AC_MSG_ERROR([--with-version-string must have a value]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
86 |
elif test "x$with_version_string" != x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
87 |
# Additional [] needed to keep m4 from mangling shell constructs. |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
88 |
if [ [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?(_([a-zA-Z]+))?)?$ ]] ]; then |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
89 |
VERSION_MAJOR=${BASH_REMATCH[[1]]} |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
90 |
VERSION_MINOR=${BASH_REMATCH[[3]]} |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
91 |
VERSION_SECURITY=${BASH_REMATCH[[5]]} |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
92 |
VERSION_PATCH=${BASH_REMATCH[[7]]} |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
93 |
VERSION_PRE=${BASH_REMATCH[[9]]} |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
94 |
version_plus_separator=${BASH_REMATCH[[11]]} |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
95 |
VERSION_BUILD=${BASH_REMATCH[[12]]} |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
96 |
VERSION_OPT_BASE=${BASH_REMATCH[[14]]} |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
97 |
VERSION_OPT_DEBUGLEVEL=${BASH_REMATCH[[16]]} |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
98 |
# Unspecified numerical fields are interpreted as 0. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
99 |
if test "x$VERSION_MINOR" = x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
100 |
VERSION_MINOR=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
101 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
102 |
if test "x$VERSION_SECURITY" = x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
103 |
VERSION_SECURITY=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
104 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
105 |
if test "x$VERSION_PATCH" = x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
106 |
VERSION_PATCH=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
107 |
fi |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
108 |
if test "x$version_plus_separator" != x \ |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
109 |
&& test "x$VERSION_BUILD$VERSION_OPT_BASE$VERSION_OPT_DEBUGLEVEL" = x; then |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
110 |
AC_MSG_ERROR([Version string contains + but both 'BUILD' and 'OPT' are missing]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
111 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
112 |
# Stop the version part process from setting default values. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
113 |
# We still allow them to explicitely override though. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
114 |
NO_DEFAULT_VERSION_PARTS=true |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
115 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
116 |
AC_MSG_ERROR([--with-version-string fails to parse as a valid version string: $with_version_string]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
117 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
118 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
119 |
|
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
120 |
AC_ARG_WITH(version-pre, [AS_HELP_STRING([--with-version-pre], |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
121 |
[Set the base part of the version 'PRE' field (pre-release identifier) @<:@'internal'@:>@])], |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
122 |
[with_version_pre_present=true], [with_version_pre_present=false]) |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
123 |
|
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
124 |
if test "x$with_version_pre_present" = xtrue; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
125 |
if test "x$with_version_pre" = xyes; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
126 |
AC_MSG_ERROR([--with-version-pre must have a value]) |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
127 |
elif test "x$with_version_pre" = xno; then |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
128 |
# Interpret --without-* as empty string instead of the literal "no" |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
129 |
VERSION_PRE= |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
130 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
131 |
# Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4. |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
132 |
[ VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'` ] |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
133 |
if test "x$VERSION_PRE" != "x$with_version_pre"; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
134 |
AC_MSG_WARN([--with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE']) |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
135 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
136 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
137 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
138 |
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
139 |
# Default is to use "internal" as pre |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
140 |
VERSION_PRE="internal" |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
141 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
142 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
143 |
|
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
144 |
AC_ARG_WITH(version-opt-base, [AS_HELP_STRING([--with-version-opt-base], |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
145 |
[Set version 'OPT' base field. Debug level will be appended. (build metadata) @<:@<timestamp>.<user>.<dirname>@:>@])], |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
146 |
[with_version_opt_base_present=true], [with_version_opt_base_present=false]) |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
147 |
|
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
148 |
if test "x$with_version_opt_base_present" = xtrue; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
149 |
if test "x$with_version_opt_base" = xyes; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
150 |
AC_MSG_ERROR([--with-version-opt-base must have a value]) |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
151 |
elif test "x$with_version_opt_base" = xno; then |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
152 |
# Interpret --without-* as empty string instead of the literal "no" |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
153 |
VERSION_OPT_BASE= |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
154 |
else |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
155 |
# Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_BASE. Outer [ ] to quote m4. |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
156 |
[ VERSION_OPT_BASE=`$ECHO "$with_version_opt_base" | $TR -c -d '[a-z][A-Z][0-9].-'` ] |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
157 |
if test "x$VERSION_OPT_BASE" != "x$with_version_opt_base"; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
158 |
AC_MSG_WARN([--with-version-opt-base value has been sanitized from '$with_version_opt_base' to '$VERSION_OPT_BASE']) |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
159 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
160 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
161 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
162 |
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
163 |
# Default is to calculate a string like this <timestamp>.<username>.<base dir name> |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
164 |
timestamp=`$DATE '+%Y-%m-%d-%H%M%S'` |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
165 |
# Outer [ ] to quote m4. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
166 |
[ username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ] |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
167 |
[ basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'` ] |
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
168 |
VERSION_OPT_BASE="$timestamp.$username.$basedirname" |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
169 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
170 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
171 |
|
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
172 |
AC_ARG_WITH(version-opt-debuglevel, [AS_HELP_STRING([--with-version-opt-debuglevel], |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
173 |
[Set version 'OPT' field (build metadata) @<:@<timestamp>.<user>.<dirname>@:>@])], |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
174 |
[with_version_opt_debuglevel_present=true], [with_version_opt_debuglevel_present=false]) |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
175 |
|
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
176 |
if test "x$with_version_opt_debuglevel_present" = xtrue; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
177 |
if test "x$with_version_opt_debuglevel" = xyes; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
178 |
AC_MSG_ERROR([--with-version-opt-debuglevel must have a value]) |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
179 |
elif test "x$with_version_opt_debuglevel" = xno; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
180 |
# Interpret --without-* as empty string instead of the literal "no" |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
181 |
VERSION_OPT_DEBUGLEVEL= |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
182 |
else |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
183 |
# Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT_DEBUGLEVEL. Outer [ ] to quote m4. |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
184 |
[ VERSION_OPT_DEBUGLEVEL=`$ECHO "$with_version_opt_debuglevel" | $TR -c -d '[a-z][A-Z][0-9].-'` ] |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
185 |
if test "x$VERSION_OPT_DEBUGLEVEL" != "x$with_version_opt_debuglevel"; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
186 |
AC_MSG_WARN([--with-version-opt-debuglevel value has been sanitized from '$with_version_opt_debuglevel' to '$VERSION_OPT_DEBUGLEVEL']) |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
187 |
fi |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
188 |
fi |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
189 |
else |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
190 |
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
191 |
# Default is to use the debug level name, except for release which is empty. |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
192 |
if test "x$DEBUG_LEVEL" != "xrelease"; then |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
193 |
VERSION_OPT_DEBUGLEVEL="$DEBUG_LEVEL" |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
194 |
else |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
195 |
VERSION_OPT_DEBUGLEVEL="" |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
196 |
fi |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
197 |
fi |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
198 |
fi |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
199 |
AC_ARG_WITH(version-build, [AS_HELP_STRING([--with-version-build], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
200 |
[Set version 'BUILD' field (build number) @<:@not specified@:>@])], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
201 |
[with_version_build_present=true], [with_version_build_present=false]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
202 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
203 |
if test "x$with_version_build_present" = xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
204 |
if test "x$with_version_build" = xyes; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
205 |
AC_MSG_ERROR([--with-version-build must have a value]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
206 |
elif test "x$with_version_build" = xno; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
207 |
# Interpret --without-* as empty string instead of the literal "no" |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
208 |
VERSION_BUILD= |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
209 |
elif test "x$with_version_build" = x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
210 |
VERSION_BUILD= |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
211 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
212 |
JDKVER_CHECK_AND_SET_NUMBER(VERSION_BUILD, $with_version_build) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
213 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
214 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
215 |
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
216 |
# Default is to not have a build number. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
217 |
VERSION_BUILD="" |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
218 |
# FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
219 |
VERSION_BUILD=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
220 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
221 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
222 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
223 |
AC_ARG_WITH(version-major, [AS_HELP_STRING([--with-version-major], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
224 |
[Set version 'MAJOR' field (first number) @<:@current source value@:>@])], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
225 |
[with_version_major_present=true], [with_version_major_present=false]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
226 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
227 |
if test "x$with_version_major_present" = xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
228 |
if test "x$with_version_major" = xyes; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
229 |
AC_MSG_ERROR([--with-version-major must have a value]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
230 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
231 |
JDKVER_CHECK_AND_SET_NUMBER(VERSION_MAJOR, $with_version_major) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
232 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
233 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
234 |
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
235 |
# Default is to get value from version-numbers |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
236 |
VERSION_MAJOR="$DEFAULT_VERSION_MAJOR" |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
237 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
238 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
239 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
240 |
AC_ARG_WITH(version-minor, [AS_HELP_STRING([--with-version-minor], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
241 |
[Set version 'MINOR' field (second number) @<:@current source value@:>@])], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
242 |
[with_version_minor_present=true], [with_version_minor_present=false]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
243 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
244 |
if test "x$with_version_minor_present" = xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
245 |
if test "x$with_version_minor" = xyes; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
246 |
AC_MSG_ERROR([--with-version-minor must have a value]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
247 |
elif test "x$with_version_minor" = xno; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
248 |
# Interpret --without-* as empty string (i.e. 0) instead of the literal "no" |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
249 |
VERSION_MINOR=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
250 |
elif test "x$with_version_minor" = x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
251 |
VERSION_MINOR=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
252 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
253 |
JDKVER_CHECK_AND_SET_NUMBER(VERSION_MINOR, $with_version_minor) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
254 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
255 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
256 |
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
257 |
# Default is 0, if unspecified |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
258 |
VERSION_MINOR=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
259 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
260 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
261 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
262 |
AC_ARG_WITH(version-security, [AS_HELP_STRING([--with-version-security], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
263 |
[Set version 'SECURITY' field (third number) @<:@current source value@:>@])], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
264 |
[with_version_security_present=true], [with_version_security_present=false]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
265 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
266 |
if test "x$with_version_security_present" = xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
267 |
if test "x$with_version_security" = xyes; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
268 |
AC_MSG_ERROR([--with-version-security must have a value]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
269 |
elif test "x$with_version_security" = xno; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
270 |
# Interpret --without-* as empty string (i.e. 0) instead of the literal "no" |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
271 |
VERSION_SECURITY=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
272 |
elif test "x$with_version_security" = x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
273 |
VERSION_SECURITY=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
274 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
275 |
JDKVER_CHECK_AND_SET_NUMBER(VERSION_SECURITY, $with_version_security) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
276 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
277 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
278 |
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
279 |
# Default is 0, if unspecified |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
280 |
VERSION_SECURITY=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
281 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
282 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
283 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
284 |
AC_ARG_WITH(version-patch, [AS_HELP_STRING([--with-version-patch], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
285 |
[Set version 'PATCH' field (fourth number) @<:@not specified@:>@])], |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
286 |
[with_version_patch_present=true], [with_version_patch_present=false]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
287 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
288 |
if test "x$with_version_patch_present" = xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
289 |
if test "x$with_version_patch" = xyes; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
290 |
AC_MSG_ERROR([--with-version-patch must have a value]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
291 |
elif test "x$with_version_patch" = xno; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
292 |
# Interpret --without-* as empty string (i.e. 0) instead of the literal "no" |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
293 |
VERSION_PATCH=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
294 |
elif test "x$with_version_patch" = x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
295 |
VERSION_PATCH=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
296 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
297 |
JDKVER_CHECK_AND_SET_NUMBER(VERSION_PATCH, $with_version_patch) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
298 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
299 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
300 |
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
301 |
# Default is 0, if unspecified |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
302 |
VERSION_PATCH=0 |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
303 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
304 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
305 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
306 |
# Calculate derived version properties |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
307 |
|
33928
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
308 |
# Set opt to "opt-base" if debug level is empty (i.e. release), or |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
309 |
# "opt-base_debug-level" otherwise. |
d2c9fee88260
8087328: Move debuglevel info in version string from PRE to OPT
erikj
parents:
33926
diff
changeset
|
310 |
VERSION_OPT=$VERSION_OPT_BASE${VERSION_OPT_DEBUGLEVEL:+_$VERSION_OPT_DEBUGLEVEL} |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
311 |
|
33929 | 312 |
# Set VERSION_IS_GA based on if VERSION_PRE has a value |
313 |
if test "x$VERSION_PRE" = x; then |
|
314 |
VERSION_IS_GA=true |
|
315 |
else |
|
316 |
VERSION_IS_GA=false |
|
317 |
fi |
|
318 |
||
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
319 |
# VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
320 |
VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
321 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
322 |
stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
323 |
# Strip trailing zeroes from stripped_version_number |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
324 |
for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
325 |
VERSION_NUMBER=$stripped_version_number |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
326 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
327 |
# The complete version string, with additional build information |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
328 |
if test "x$VERSION_BUILD$VERSION_OPT" = x; then |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
329 |
VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE} |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
330 |
else |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
331 |
# If either build or opt is set, we need a + separator |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
332 |
VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT} |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
333 |
fi |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
334 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
335 |
# The short version string, just VERSION_NUMBER and PRE, if present. |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
336 |
VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE} |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
337 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
338 |
AC_MSG_CHECKING([for version string]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
339 |
AC_MSG_RESULT([$VERSION_STRING]) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
340 |
|
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
341 |
AC_SUBST(VERSION_MAJOR) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
342 |
AC_SUBST(VERSION_MINOR) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
343 |
AC_SUBST(VERSION_SECURITY) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
344 |
AC_SUBST(VERSION_PATCH) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
345 |
AC_SUBST(VERSION_PRE) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
346 |
AC_SUBST(VERSION_BUILD) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
347 |
AC_SUBST(VERSION_OPT) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
348 |
AC_SUBST(VERSION_NUMBER) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
349 |
AC_SUBST(VERSION_NUMBER_FOUR_POSITIONS) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
350 |
AC_SUBST(VERSION_STRING) |
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
351 |
AC_SUBST(VERSION_SHORT) |
33929 | 352 |
AC_SUBST(VERSION_IS_GA) |
33926
3a19edba4808
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
diff
changeset
|
353 |
]) |