Fetching contributors…
Cannot retrieve contributors at this time
126 lines (90 sloc) 3.34 KB
Copyright © 2011 MLstate
This file is part of OPA.
OPA is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License, version 3, as published by
the Free Software Foundation.
OPA 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 Affero General Public License for
more details.
You should have received a copy of the GNU Affero General Public License
along with OPA. If not, see <>.
Meta Infos about the build.
This module is meant to be generated at build time,
and should depends on nothing.
Any module in the framework can have access to it.
@author Mathieu Barbin
@author bld <bld.tool\>
(** {6 Non generated code} *)
It is possible to define some part of code, which is not geneated by bld.
(like type definition, variant for version or whatever...)
(** The rest of the module is generated by the build system *)
(** {6 Opa version name} *)
The name of the opa version, e.g. S2, S3, S3.1, etc.
This version name is read from the file [version.txt], contained in the same
val opa_version_name : string
(** {6 Git Infos} *)
Git versions. An int indicated the number of commits since the beginning
of the repositories.
Generated from the following command line in each repository :
git log --pretty=oneline | wc -l
(** *)
val opalang_git_version : int
Git sha of HEAD. A string indicated the short sha of the last commit.
Generated from the following command line in each repository :
git log -n1 --pretty=format:%h
(** *)
val opalang_git_sha : string
(** {6 Date} *)
The date of the last commit.
Generated from the following command, in the main repository opageneral :
git log -n1 --pretty=format:%ad --date=short
val date : string
(** Just the year of the build e.g. 2010 *)
val year : string
(** {6 Parameters} *)
(** A boolean which says if the build was a release *)
val is_release : bool
(** sum git version, make the sum between all git versions *)
val git_version_counter : int
(** From the different infos, we build a uniq version identifier *)
val version_id : string
Check if the current version of the compiler is newer than a given string.
The purpose is to get quickly a clear error message about the version
of the compiler, rather than a strange error message caused by
an update in the compiler and/or in the stdlib.
It is recommended to use this option in your Makefile for applications
using new features, or new functions of the stdlib, or in any application
published somewhere, and potentially compiled by people having
wild and heterogeneous versions of Opa (nightly builds, from sources).
Support several formats:
-only the name, like "S3.5"
-simple int, in that case this will compare with the build id
HACK: for backward compatibility (reset of build number)
any number after 27000 is older than numbers between 0 and 27000.
If the function returns [None], that means that the given
string does not make sence as a version name.
val assert_minimal_version : string -> bool option