summaryrefslogtreecommitdiff
path: root/build-aux/ocaml_version.m4
diff options
context:
space:
mode:
authorSébastien Hinderer <Sebastien.Hinderer@inria.fr>2021-08-31 12:11:55 +0200
committerSébastien Hinderer <Sebastien.Hinderer@inria.fr>2021-10-08 12:20:06 +0200
commitb9ec96722d45dab17dc58f0d037a60d1b3343913 (patch)
tree6e9ecf4234ae85507e91c094378f305f3a4b2b99 /build-aux/ocaml_version.m4
parentce97e67006024957fe3e5638902ddcce6b4b456e (diff)
downloadocaml-b9ec96722d45dab17dc58f0d037a60d1b3343913.tar.gz
Document where the OCaml version is defined and how to update the VERSION file
Diffstat (limited to 'build-aux/ocaml_version.m4')
-rw-r--r--build-aux/ocaml_version.m413
1 files changed, 11 insertions, 2 deletions
diff --git a/build-aux/ocaml_version.m4 b/build-aux/ocaml_version.m4
index a439ec92dd..2ed381ef34 100644
--- a/build-aux/ocaml_version.m4
+++ b/build-aux/ocaml_version.m4
@@ -40,6 +40,7 @@ m4_define([OCAML__VERSION_EXTRA], [dev0-2021-06-03])
# Development releases, for instance, should use a [+] prefix.
m4_define([OCAML__VERSION_EXTRA_PREFIX], [+])
m4_define([OCAML__VERSION_SHORT], [OCAML__VERSION_MAJOR.OCAML__VERSION_MINOR])
+# The OCAML__VERSION below must be in the format specified in stdlib/sys.mli
m4_define([OCAML__VERSION],
[m4_do(
OCAML__VERSION_SHORT.OCAML__VERSION_PATCHLEVEL,
@@ -54,7 +55,15 @@ m4_define([OCAML__VERSION],
m4_syscmd([cat > VERSION << END_OF_VERSION_FILE
]OCAML__VERSION[
-# The version string is the first line of this file.
-# It must be in the format described in stdlib/sys.mli
+# Starting with OCaml 4.14, although the version string that appears above is
+# still correct and this file can thus still be used to figure it out,
+# the version itself is actually defined in the build-aux/ocaml_version.m4
+# file (See the OCAML__VERSION* macros there.)
+# To update the present VERSION file:
+# 1. Update build-aux/ocaml_version.m4
+# 2. Run tools/autogen.
+# 3. If you are in a context where version control matters,
+# commit the changes to both build-aux/ocaml_version.m4 and VERSION.
+# The version string must be in the format described in stdlib/sys.mli
END_OF_VERSION_FILE
])