diff options
author | Rickard Green <[email protected]> | 2014-02-16 00:54:08 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2014-02-19 15:30:44 +0100 |
commit | 3fd4e3e770fbed95fd6fa2d547945ac71256339c (patch) | |
tree | a856f741c5d307d4e56334b650740d7e22073cbf | |
parent | a37ea8849ab29cb8d15ab3bc5a3ba1fc16dd0276 (diff) | |
download | otp-3fd4e3e770fbed95fd6fa2d547945ac71256339c.tar.gz otp-3fd4e3e770fbed95fd6fa2d547945ac71256339c.tar.bz2 otp-3fd4e3e770fbed95fd6fa2d547945ac71256339c.zip |
Misc adjustments of OTP version
-rw-r--r-- | HOWTO/INSTALL.md | 16 | ||||
-rw-r--r-- | HOWTO/MARKDOWN.md | 7 | ||||
-rw-r--r-- | Makefile.in | 15 | ||||
-rw-r--r-- | OTP_VERSION | 1 | ||||
-rw-r--r-- | configure.in | 12 | ||||
-rw-r--r-- | erts/configure.in | 10 | ||||
-rw-r--r-- | erts/doc/src/Makefile | 2 | ||||
-rw-r--r-- | erts/doc/src/erlang.xml | 19 | ||||
-rw-r--r-- | erts/emulator/Makefile.in | 4 | ||||
-rwxr-xr-x | erts/emulator/beam/erl_bif_info.c | 14 | ||||
-rwxr-xr-x | erts/emulator/utils/make_version | 8 | ||||
-rw-r--r-- | erts/etc/win32/nsis/erlang.nsi | 1 | ||||
-rw-r--r-- | erts/etc/win32/nsis/erlang20.nsi | 1 | ||||
-rw-r--r-- | erts/start_scripts/Makefile | 2 | ||||
-rw-r--r-- | erts/vsn.mk | 5 | ||||
-rw-r--r-- | lib/orber/src/Makefile | 3 | ||||
-rw-r--r-- | make/emd2exml.in | 6 | ||||
-rw-r--r-- | make/otp.mk.in | 7 | ||||
-rw-r--r-- | make/otp_default_release_path.mk | 24 | ||||
-rw-r--r-- | make/otp_release_targets.mk | 4 | ||||
-rwxr-xr-x | otp_build | 8 | ||||
-rw-r--r-- | system/doc/installation_guide/otp_version.xml | 71 | ||||
-rw-r--r-- | system/doc/installation_guide/part.xml | 1 | ||||
-rw-r--r-- | system/doc/installation_guide/xmlfiles.mk | 1 | ||||
-rw-r--r-- | system/doc/top/Makefile | 2 |
25 files changed, 194 insertions, 50 deletions
diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 533960ef99..2a4abedfcf 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -189,16 +189,16 @@ section below before proceeding. Step 1: Start by unpacking the Erlang/OTP distribution file with your GNU compatible TAR program. - $ gunzip -c otp_src_%OTP-REL%.tar.gz | tar xf - + $ gunzip -c otp_src_%OTP-VSN%.tar.gz | tar xf - alternatively: - $ zcat otp_src_%OTP-REL%.tar.gz | tar xf - + $ zcat otp_src_%OTP-VSN%.tar.gz | tar xf - Step 2: Now cd into the base directory (`$ERL_TOP`). - $ cd otp_src_%OTP-REL% + $ cd otp_src_%OTP-VSN% ### Configuring ### @@ -553,13 +553,13 @@ For some graphical tools to find the on-line help you have to install the HTML documentation on top of the installed OTP applications, i.e. $ cd <ReleaseDir> - $ gunzip -c otp_html_%OTP-REL%.tar.gz | tar xf - + $ gunzip -c otp_html_%OTP-VSN%.tar.gz | tar xf - For `erl -man <page>` to work the Unix manual pages have to be installed in the same way, i.e. $ cd <ReleaseDir> - $ gunzip -c otp_man_%OTP-REL%.tar.gz | tar xf - + $ gunzip -c otp_man_%OTP-VSN%.tar.gz | tar xf - Where `<ReleaseDir>` is @@ -803,9 +803,9 @@ Before modifying this document you need to have a look at the [Building in Git]: #How-to-Build-and-Install-ErlangOTP_Building-in-Git [Pre-built Source Release]: #How-to-Build-and-Install-ErlangOTP_Prebuilt-Source-Release [make and $ERL_TOP]: #How-to-Build-and-Install-ErlangOTP_make-and-ERLTOP - [html documentation]: http://www.erlang.org/download/otp_doc_html_%OTP-REL%.tar.gz - [man pages]: http://www.erlang.org/download/otp_doc_man_%OTP-REL%.tar.gz - [the released source tar ball]: http://www.erlang.org/download/otp_src_%OTP-REL%.tar.gz + [html documentation]: http://www.erlang.org/download/otp_doc_html_%OTP-VSN%.tar.gz + [man pages]: http://www.erlang.org/download/otp_doc_man_%OTP-VSN%.tar.gz + [the released source tar ball]: http://www.erlang.org/download/otp_src_%OTP-VSN%.tar.gz [$ERL_TOP/HOWTO/MARKDOWN.md]: MARKDOWN.md [?TOC]: true diff --git a/HOWTO/MARKDOWN.md b/HOWTO/MARKDOWN.md index c9ad09a1be..8e8a5c02cf 100644 --- a/HOWTO/MARKDOWN.md +++ b/HOWTO/MARKDOWN.md @@ -223,8 +223,11 @@ places. Appropriate attributes to the `X` tag will also be generated. \%CopyrightBegin\% and \%CopyrightEnd\% "tags" will be removed from the output. -* All occurrences of \%OTP-REL% will be replaced by current release number - (e.g. R14A). +* All occurrences of \%OTP-REL% will be replaced by current OTP release number + (e.g. 17). + +* All occurrences of \%OTP-VSN% will be replaced by current OTP version + (e.g. 17.0). * All occurrences of \%ERTS-VSN% will be replaced by current ERTS version (e.g. 5.8). diff --git a/Makefile.in b/Makefile.in index d3d81c8817..567bd427fc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -172,6 +172,7 @@ endif TARGET := @TARGET@ include $(ERL_TOP)/make/target.mk export TARGET +include $(ERL_TOP)/make/otp_default_release_path.mk BOOTSTRAP_ONLY = @BOOTSTRAP_ONLY@ @@ -395,6 +396,11 @@ endif cd $(ERL_TOP)/erts && \ ERL_TOP=$(ERL_TOP) PATH=$(INST_PATH_PREFIX)"$${PATH}" \ $(MAKE) BUILD_ALL=1 TESTROOT="$(RELEASE_ROOT)" release +ifeq ($(RELEASE_ROOT),) + $(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(OTP_DEFAULT_RELEASE_PATH)" +else + $(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(RELEASE_ROOT)" +endif # --------------------------------------------------------------- # Target only used when building commercial ERTS patches @@ -921,7 +927,7 @@ $(TEST_DIRS): # # Order is important here, don't change it! # -INST_DEP += install.dirs install.emulator install.libs install.Install install.bin +INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version install.bin install: $(INST_DEP) @@ -950,6 +956,13 @@ install.Install: (cd "$(ERLANG_LIBDIR)" \ && ./Install $(INSTALL_CROSS) -minimal "$(ERLANG_INST_LIBDIR)") +install.otp_version: +ifeq ($(ERLANG_LIBDIR),) + $(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(OTP_DEFAULT_RELEASE_PATH)" +else + $(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(ERLANG_LIBDIR)" +endif + # # Install erlang base public files # diff --git a/OTP_VERSION b/OTP_VERSION new file mode 100644 index 0000000000..c86282f25f --- /dev/null +++ b/OTP_VERSION @@ -0,0 +1 @@ +17.0-rc1 diff --git a/configure.in b/configure.in index 88fd847030..081febd47b 100644 --- a/configure.in +++ b/configure.in @@ -180,18 +180,26 @@ AC_PROG_LN_S AC_PROG_RANLIB # -# Get erts version and otp release from erts/vsn.mk +# Get erts version from erts/vsn.mk # AC_MSG_CHECKING([ERTS version]) [ERTS_VSN=`sed -n "s/^VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`] AC_MSG_RESULT([$ERTS_VSN]) AC_SUBST(ERTS_VSN) +# +# Get OTP release and OTP version from $ERL_TOP/OTP_VERSION +# AC_MSG_CHECKING([OTP release]) -[OTP_REL=`sed -n "s/^SYSTEM_VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`] +[OTP_REL=`cat $ERL_TOP/OTP_VERSION | sed "s|\([0-9]*\).*|\1|"`] AC_MSG_RESULT([$OTP_REL]) AC_SUBST(OTP_REL) +AC_MSG_CHECKING([OTP version]) +[OTP_VSN=`cat $ERL_TOP/OTP_VERSION`] +AC_MSG_RESULT([$OTP_VSN]) +AC_SUBST(OTP_VSN) + AC_ARG_ENABLE(threads, AS_HELP_STRING([--enable-threads], [enable async thread support]) AS_HELP_STRING([--disable-threads], [disable async thread support])) 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 diff --git a/lib/orber/src/Makefile b/lib/orber/src/Makefile index 1c6781e5fd..d96350f4d5 100644 --- a/lib/orber/src/Makefile +++ b/lib/orber/src/Makefile @@ -21,9 +21,6 @@ include $(ERL_TOP)/make/target.mk include $(ERL_TOP)/make/$(TARGET)/otp.mk -# To get hold of SYSTEM_VSN (e.g. R9C). -#include $(ERL_TOP)/erts/vsn.mk - # ---------------------------------------------------- # Application version # ---------------------------------------------------- diff --git a/make/emd2exml.in b/make/emd2exml.in index 5bfe89894e..48473349d0 100644 --- a/make/emd2exml.in +++ b/make/emd2exml.in @@ -334,6 +334,8 @@ text(Line) -> text("%ERTS-VSN%" ++ Cs, Acc) -> text(Cs, ["@ERTS_VSN@"|Acc]); +text("%OTP-VSN%" ++ Cs, Acc) -> + text(Cs, ["@OTP_VSN@"|Acc]); text("%OTP-REL%" ++ Cs, Acc) -> text(Cs, ["@OTP_REL@"|Acc]); @@ -357,6 +359,8 @@ put_text(#state{c = CTag, emphasis = EmTag} = S, Line) -> put_text(S, "%ERTS-VSN%"++Cs, CTag, EmTag, Acc) -> put_text(S, Cs, CTag, EmTag, ["@ERTS_VSN@"|Acc]); +put_text(S, "%OTP-VSN%"++Cs, CTag, EmTag, Acc) -> + put_text(S, Cs, CTag, EmTag, ["@OTP_VSN@"|Acc]); put_text(S, "%OTP-REL%"++Cs, CTag, EmTag, Acc) -> put_text(S, Cs, CTag, EmTag, ["@OTP_REL@"|Acc]); @@ -560,6 +564,8 @@ code(Line) -> code("%ERTS-VSN%" ++ Cs, Acc) -> code(Cs, ["@ERTS_VSN@"|Acc]); +code("%OTP-VSN%" ++ Cs, Acc) -> + code(Cs, ["@OTP_VSN@"|Acc]); code("%OTP-REL%" ++ Cs, Acc) -> code(Cs, ["@OTP_REL@"|Acc]); diff --git a/make/otp.mk.in b/make/otp.mk.in index 785926b997..a89bc37820 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -30,6 +30,13 @@ include $(ERL_TOP)/make/output.mk # ---------------------------------------------------- +# Version +# ---------------------------------------------------- + +OTP_VERSION = @OTP_VERSION@ +SYSTEM_VSN = @SYSTEM_VSN@ + +# ---------------------------------------------------- # Cross Compiling # ---------------------------------------------------- CROSS_COMPILING = @CROSS_COMPILING@ diff --git a/make/otp_default_release_path.mk b/make/otp_default_release_path.mk new file mode 100644 index 0000000000..932bbb2f6d --- /dev/null +++ b/make/otp_default_release_path.mk @@ -0,0 +1,24 @@ +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 2014. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% +# + +# +# Where to release to by default +# + +OTP_DEFAULT_RELEASE_PATH="$(ERL_TOP)/release/$(TARGET)" diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk index b6afcd1c8b..fcac2ff695 100644 --- a/make/otp_release_targets.mk +++ b/make/otp_release_targets.mk @@ -17,6 +17,8 @@ # %CopyrightEnd% # +include $(ERL_TOP)/make/otp_default_release_path.mk + # ---------------------------------------------------- # Targets for the new documentation support # ---------------------------------------------------- @@ -137,7 +139,7 @@ endif ifeq ($(TESTROOT),) release release_docs release_tests release_html: - $(MAKE) $(MFLAGS) RELEASE_PATH="$(ERL_TOP)/release/$(TARGET)" \ + $(MAKE) $(MFLAGS) RELEASE_PATH=$(OTP_DEFAULT_RELEASE_PATH) \ $(TARGET_MAKEFILE) $@_spec else @@ -1216,8 +1216,12 @@ do_patch_app () echo "No OTP $otp_major_vsn installation in $target_dir" 1>&2 exit 1 fi + shift + otp_version=`cat "$target_dir/OTP_VERSION"` || { echo "Not able to read $target_dir/OTP_VERSION" 1>&2; exit 1; } + { echo "$otp_version" | sed "s|^\([^\*]*\)\**|\1\*\*|g" > $target_dir/OTP_VERSION; } 2>/dev/null || { echo "Not able to update $target_dir/OTP_VERSION" 1>&2; exit 1; } + # Build all applications to target for app in "$@"; do if [ "$app" = "erts" ] && [ -d $ERL_TOP/$app ]; then @@ -1430,9 +1434,9 @@ cd $ERL_TOP determine_version_controller -# Unset ERL_FLAGS and ERL_OTP<Major-VSN>_FLAGS during bootstrap to +# Unset ERL_FLAGS and ERL_OTP<OTP Release>_FLAGS during bootstrap to # prevent potential problems -otp_major_vsn=`cat erts/vsn.mk | grep SYSTEM_VSN | sed "s|SYSTEM_VSN[^=]*=[^0-9]*\([0-9]*\).*|\1|g"` +otp_major_vsn=`cat OTP_VERSION | sed "s|\([0-9]*\).*|\1|"` erl_otp_flags="ERL_OTP${otp_major_vsn}_FLAGS" unset ERL_FLAGS unset ${erl_otp_flags} diff --git a/system/doc/installation_guide/otp_version.xml b/system/doc/installation_guide/otp_version.xml new file mode 100644 index 0000000000..dcba2d1702 --- /dev/null +++ b/system/doc/installation_guide/otp_version.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE chapter SYSTEM "chapter.dtd"> + +<chapter> + <header> + <copyright> + <year>2014</year> + <holder>Ericsson AB. All Rights Reserved.</holder> + </copyright> + <legalnotice> + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + </legalnotice> + + <title>OTP version</title> + <prepared></prepared> + <responsible></responsible> + <docno></docno> + <approved></approved> + <checked></checked> + <date>2014-02-19</date> + <rev></rev> + <file>otp_version.xml</file> + </header> + <p>As of OTP release 17, the OTP release number corresponds to + the major OTP version number. In the normal case, the OTP version + number will be constructed as + <c><Major>.<Minor>.<Patch></c>. However more + dot separated parts may exist. If all parts less significant than + <c>Minor</c> equals <c>0</c>, they are omitted when printing the + version. Release candidates have an <c>-rc<N></c> suffix. The + OTP version as a concept was introduced in OTP 17.</p> + <p>OTP of a specific version is a set of applications of + specific versions. The application versions identified by + an OTP version corresponds to application versions that + have been tested together by the Erlang/OTP team at Ericsson AB. + An OTP system can however be put together with applications from + different OTP versions. Such a combination of application versions + has not been tested by the Erlang/OTP team. It is therefore + <em>always preferred to use OTP applications from one single OTP + version</em>.</p> + <p>In an OTP source code tree as well as in an installed OTP + development system, the OTP version can be read from the text + file <c>OTP_VERSION</c> in the OTP installation root directory + (<seealso marker="kernel:code#root_dir/0"><c>code:root_dir()</c></seealso>).</p> + <p>If the version read from the <c>OTP_VERSION</c> file in a + development system has a <c>**</c> suffix, the system has been + patched using the <c>$ERL_TOP/otp_build patch_app</c> tool. In + this case, the system consists of application versions from + multiple OTP versions. The version preceding the <c>**</c> + suffix corresponds to the OTP version of the base system that + has been patched.</p> + <p>On a target system (see the + <seealso marker="doc/system_principles:create_target">system principles</seealso> + documentation) no <c>OTP_VERSION</c> file will exist. This since + one easily can create a target system where it is hard to even + determine the base OTP version.</p> + <p>Note that if a development system is updated by other means + than <c>$ERL_TOP/otp_build patch_app</c>, the <c>OTP_VERSION</c> + file may identify wrong OTP version.</p> +</chapter> + diff --git a/system/doc/installation_guide/part.xml b/system/doc/installation_guide/part.xml index 19808fd165..150df39512 100644 --- a/system/doc/installation_guide/part.xml +++ b/system/doc/installation_guide/part.xml @@ -31,6 +31,7 @@ <description> <p>How to install Erlang/OTP on UNIX or Windows.</p> </description> + <xi:include href="otp_version.xml"/> <xi:include href="install-binary.xml"/> <xi:include href="verification.xml"/> <xi:include href="INSTALL.xml"/> diff --git a/system/doc/installation_guide/xmlfiles.mk b/system/doc/installation_guide/xmlfiles.mk index 3995c607af..245491ab94 100644 --- a/system/doc/installation_guide/xmlfiles.mk +++ b/system/doc/installation_guide/xmlfiles.mk @@ -17,6 +17,7 @@ # %CopyrightEnd% # INST_GUIDE_CHAPTER_FILES = \ + otp_version.xml \ install-binary.xml \ verification.xml \ INSTALL.xml \ diff --git a/system/doc/top/Makefile b/system/doc/top/Makefile index 20ef9fe781..79fd875d68 100644 --- a/system/doc/top/Makefile +++ b/system/doc/top/Makefile @@ -198,7 +198,7 @@ $(GLOSSARY): $(GLOSSARY_SCRIPT) #-------------------------------------------------------------------------- -PR.template: PR.template.src $(ERL_TOP)/erts/vsn.mk +PR.template: PR.template.src $(ERL_TOP)/make/$(TARGET)/otp.mk sed -e 's;%VSN%;$(VSN);' \ -e 's;%SYSTEM_VSN%;$(SYSTEM_VSN);' \ $< > $@ |