Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 126 lines (90 sloc) 3.424 kB
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18
19 (**
20 Meta Infos about the build.
21
22 This module is meant to be generated at build time,
23 and should depends on nothing.
24 Any module in the framework can have access to it.
25
26 @author Mathieu Barbin
27 @author bld <bld.tool\@opageneral.com>
28 *)
29
30 (** {6 Non generated code} *)
31
32 (**
33 It is possible to define some part of code, which is not geneated by bld.
34 (like type definition, variant for version or whatever...)
35 *)
36
37
38 (** The rest of the module is generated by the build system *)
39
40 (** {6 Opa version name} *)
41
42 (**
43 The name of the opa version, e.g. S2, S3, S3.1, etc.
44 This version name is read from the file [version.txt], contained in the same
45 directory.
46 *)
47 val opa_version_name : string
48
49 (** {6 Git Infos} *)
50
51 (**
52 Git versions. An int indicated the number of commits since the beginning
53 of the repositories.
54
55 Generated from the following command line in each repository :
56
57 {[
58 git log --pretty=oneline | wc -l
59 ]}
60 *)
61 (** *)
62
63 val opalang_git_version : int
64
65 (**
66 Git sha of HEAD. A string indicated the short sha of the last commit.
67
68 Generated from the following command line in each repository :
69
70 {[
71 git log -n1 --pretty=format:%h
72 ]}
73 *)
74 (** *)
75 val opalang_git_sha : string
76
77 (** {6 Date} *)
78
79 (**
80 The date of the last commit.
81
82 Generated from the following command, in the main repository opageneral :
83
84 {[
85 git log -n1 --pretty=format:%ad --date=short
86 ]}
87 *)
88 val date : string
89
90 (** Just the year of the build e.g. 2010 *)
91 val year : string
92
93 (** {6 Parameters} *)
94
95 (** A boolean which says if the build was a release *)
96 val is_release : bool
97
98 (** sum git version, make the sum between all git versions *)
99 val git_version_counter : int
100
101 (** From the different infos, we build a uniq version identifier *)
102 val version_id : string
607c286 [feature] compiler option: --minimal-version for Makefile
Mathieu Barbin authored
103
104 (**
105 Check if the current version of the compiler is newer than a given string.
106
107 The purpose is to get quickly a clear error message about the version
108 of the compiler, rather than a strange error message caused by
109 an update in the compiler and/or in the stdlib.
110
111 It is recommended to use this option in your Makefile for applications
112 using new features, or new functions of the stdlib, or in any application
113 published somewhere, and potentially compiled by people having
114 wild and heterogeneous versions of Opa (nightly builds, from sources).
115
116 Support several formats:
117 -only the name, like "S3.5"
118 -simple int, in that case this will compare with the build id
119 HACK: for backward compatibility (reset of build number)
120 any number after 27000 is older than numbers between 0 and 27000.
121
122 If the function returns [None], that means that the given
123 string does not make sence as a version name.
124 *)
125 val assert_minimal_version : string -> bool option
Something went wrong with that request. Please try again.