aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
Diffstat (limited to 'erts')
-rw-r--r--erts/configure.in10
-rw-r--r--erts/doc/src/Makefile2
-rw-r--r--erts/doc/src/erlang.xml19
-rw-r--r--erts/emulator/Makefile.in4
-rwxr-xr-xerts/emulator/beam/erl_bif_info.c14
-rwxr-xr-xerts/emulator/utils/make_version8
-rw-r--r--erts/etc/win32/nsis/erlang.nsi1
-rw-r--r--erts/etc/win32/nsis/erlang20.nsi1
-rw-r--r--erts/start_scripts/Makefile2
-rw-r--r--erts/vsn.mk5
10 files changed, 36 insertions, 30 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 8d245252b5..0784be001c 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -357,6 +357,16 @@ else
fi
AC_SUBST(OTP_RELEASE)
+AC_MSG_CHECKING([OTP release])
+[SYSTEM_VSN=`cat $ERL_TOP/OTP_VERSION | sed "s|\([0-9]*\).*|\1|"`]
+AC_MSG_RESULT([$SYSTEM_VSN])
+AC_SUBST(SYSTEM_VSN)
+
+AC_MSG_CHECKING([OTP version])
+[OTP_VERSION=`cat $ERL_TOP/OTP_VERSION`]
+AC_MSG_RESULT([$OTP_VERSION])
+AC_SUBST(OTP_VERSION)
+
dnl OK, we might have darwin switches off different kinds, lets
dnl check it all before continuing.
TMPSYS=`uname -s`-`uname -m`
diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile
index d4c6fe67d2..e8b856c3ff 100644
--- a/erts/doc/src/Makefile
+++ b/erts/doc/src/Makefile
@@ -139,7 +139,7 @@ man: $(MAN1_FILES) $(MAN3_FILES)
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-$(INFO_FILE): $(INFO_FILE_SRC) ../../vsn.mk
+$(INFO_FILE): $(INFO_FILE_SRC) $(ERL_TOP)/make/$(TARGET)/otp.mk
sed -e 's;%RELEASE%;$(SYSTEM_VSN);' $(INFO_FILE_SRC) > $(INFO_FILE)
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 4cf5631727..0f312fb430 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -6094,16 +6094,19 @@ ok
<seealso marker="#system_info_multi_scheduling">erlang:system_info(multi_scheduling)</seealso>, and
<seealso marker="#system_info_schedulers">erlang:system_info(schedulers)</seealso>.</p>
</item>
- <tag><marker id="system_info_otp_correction_package"><c>otp_correction_package</c></marker></tag>
- <item>
- <p>Returns a string containing the OTP correction package version
- number that currenly executing VM is part of. Note that other
- OTP applications in the system may be part of other OTP correction
- packages.</p>
- </item>
<tag><marker id="system_info_otp_release"><c>otp_release</c></marker></tag>
<item>
- <p>Returns a string containing the OTP release number.</p>
+ <p>Returns a string containing the OTP release number of the
+ OTP release that the currently executing ERTS application is
+ part of.</p>
+ <p>As of OTP release 17, the OTP release number corresponds to
+ the major OTP version number. There is no
+ <c>erlang:system_info()</c> argument giving the exact OTP
+ version. This since the exact OTP version in the general case
+ is hard to determine. For more information see
+ <seealso marker="doc/installation_guide:otp_version">the
+ documentation of the OTP version in the installation
+ guide</seealso>.</p>
</item>
<tag><marker id="system_info_port_parallelism"><c>port_parallelism</c></marker></tag>
<item><p>Returns the default port parallelism scheduling hint used.
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index f88a4ccc24..da4c33e457 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -574,8 +574,8 @@ $(TTF_DIR)/erl_alloc_types.h: beam/erl_alloc.types utils/make_alloc_types
GENERATE += $(TTF_DIR)/erl_alloc_types.h
# version include file
-$(TARGET)/erl_version.h: ../vsn.mk
- $(gen_verbose)LANG=C $(PERL) utils/make_version -o $@ $(SYSTEM_VSN) $(SYSTEM_CP_VSN) $(VSN)$(SERIALNO) $(TARGET)
+$(TARGET)/erl_version.h: ../vsn.mk $(ERL_TOP)/make/$(TARGET)/otp.mk
+ $(gen_verbose)LANG=C $(PERL) utils/make_version -o $@ $(SYSTEM_VSN) $(OTP_VERSION) $(VSN)$(SERIALNO) $(TARGET)
GENERATE += $(TARGET)/erl_version.h
# driver table
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index f25b4dbae5..2adba9b240 100755
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -64,7 +64,7 @@ static Export *gather_gc_info_res_trap;
#define DECL_AM(S) Eterm AM_ ## S = am_atom_put(#S, sizeof(#S) - 1)
-static char otp_correction_package[] = ERLANG_OTP_CORRECTION_PACKAGE;
+static char otp_version[] = ERLANG_OTP_VERSION;
/* Keep erts_system_version as a global variable for easy access from a core */
static char erts_system_version[] = ("Erlang/OTP " ERLANG_OTP_RELEASE
"%s"
@@ -312,7 +312,7 @@ erts_print_system_version(int to, void *arg, Process *c_p)
int i, rc = -1;
char *rc_str = "";
char rc_buf[100];
- char *ocp = otp_correction_package;
+ char *ov = otp_version;
#ifdef ERTS_SMP
Uint total, online, active;
#ifdef ERTS_DIRTY_SCHEDULERS
@@ -323,9 +323,9 @@ erts_print_system_version(int to, void *arg, Process *c_p)
(void) erts_schedulers_state(&total, &online, &active, NULL, NULL, NULL, 0);
#endif
#endif
- for (i = 0; i < sizeof(otp_correction_package)-4; i++) {
- if (ocp[i] == '-' && ocp[i+1] == 'r' && ocp[i+2] == 'c')
- rc = atoi(&ocp[i+3]);
+ for (i = 0; i < sizeof(otp_version)-4; i++) {
+ if (ov[i] == '-' && ov[i+1] == 'r' && ov[i+2] == 'c')
+ rc = atoi(&ov[i+3]);
}
if (rc >= 0) {
if (rc == 0)
@@ -2448,10 +2448,6 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
DECL_AM(unknown);
BIF_RET(AM_unknown);
}
- } else if (ERTS_IS_ATOM_STR("otp_correction_package", BIF_ARG_1)) {
- int n = sizeof(ERLANG_OTP_CORRECTION_PACKAGE)-1;
- hp = HAlloc(BIF_P, 2*n);
- BIF_RET(buf_to_intlist(&hp, ERLANG_OTP_CORRECTION_PACKAGE, n, NIL));
} else if (ERTS_IS_ATOM_STR("otp_release", BIF_ARG_1)) {
int n = sizeof(ERLANG_OTP_RELEASE)-1;
hp = HAlloc(BIF_P, 2*n);
diff --git a/erts/emulator/utils/make_version b/erts/emulator/utils/make_version
index 02b68f2b39..0ba1c77930 100755
--- a/erts/emulator/utils/make_version
+++ b/erts/emulator/utils/make_version
@@ -39,10 +39,10 @@ if ($ARGV[0] eq '-o') {
}
my $release = shift;
-defined $release or die "No release specified";
+defined $release or die "No otp release specified";
-my $correction_package = shift;
-defined $correction_package or die "No correction package specified";
+my $otp_version = shift;
+defined $otp_version or die "No otp version specified";
my $version = shift;
defined $version or die "No version name specified";
@@ -56,7 +56,7 @@ open(FILE, ">$outputfile") or die "Can't create $outputfile: $!";
print FILE <<EOF;
/* This file was created by 'make_version' -- don't modify. */
#define ERLANG_OTP_RELEASE "$release"
-#define ERLANG_OTP_CORRECTION_PACKAGE "$correction_package"
+#define ERLANG_OTP_VERSION "$otp_version"
#define ERLANG_VERSION "$version"
#define ERLANG_COMPILE_DATE "$time_str"
#define ERLANG_ARCHITECTURE "$architecture"
diff --git a/erts/etc/win32/nsis/erlang.nsi b/erts/etc/win32/nsis/erlang.nsi
index f4fd2b4cdb..162e634148 100644
--- a/erts/etc/win32/nsis/erlang.nsi
+++ b/erts/etc/win32/nsis/erlang.nsi
@@ -93,6 +93,7 @@ SectionIn 1 RO
skip_silent_mode:
SetOutPath "$INSTDIR"
+ File "${TESTROOT}\OTP_VERSION"
File "${TESTROOT}\Install.ini"
File "${TESTROOT}\Install.exe"
File /r "${TESTROOT}\releases"
diff --git a/erts/etc/win32/nsis/erlang20.nsi b/erts/etc/win32/nsis/erlang20.nsi
index 3333c4a9aa..3ee33e8121 100644
--- a/erts/etc/win32/nsis/erlang20.nsi
+++ b/erts/etc/win32/nsis/erlang20.nsi
@@ -144,6 +144,7 @@ Section "Development" SecErlangDev
SectionIn 1 RO
SetOutPath "$INSTDIR"
+ File "${TESTROOT}\OTP_VERSION"
File "${TESTROOT}\Install.ini"
File "${TESTROOT}\Install.exe"
SetOutPath "$INSTDIR\releases"
diff --git a/erts/start_scripts/Makefile b/erts/start_scripts/Makefile
index 32e65a227f..14d5d46195 100644
--- a/erts/start_scripts/Makefile
+++ b/erts/start_scripts/Makefile
@@ -52,7 +52,7 @@ endif
##############################################################################
# Get version numbers from the VSN files
-# VSN & SYSTEM_VSN
+# VSN
include ../vsn.mk
include $(LIBPATH)/kernel/vsn.mk
include $(LIBPATH)/stdlib/vsn.mk
diff --git a/erts/vsn.mk b/erts/vsn.mk
index 88a393f3d5..081fb66398 100644
--- a/erts/vsn.mk
+++ b/erts/vsn.mk
@@ -19,11 +19,6 @@
VSN = 6.0
-# OTP major version
-SYSTEM_VSN = 17
-# OTP correction package version
-SYSTEM_CP_VSN = 17.0-rc1
-
# Port number 4365 in 4.2
# Port number 4366 in 4.3
# Port number 4368 in 4.4.0 - 4.6.2