update to ocaml 4.00.1

This commit is contained in:
William 2013-01-14 23:48:43 +01:00
parent f0e1efa364
commit df51a5ec23
4 changed files with 11 additions and 193 deletions

View File

@ -1688,7 +1688,7 @@ USE_OSGPLUGIN(<plugin2>)
</tr>
<tr>
<td id="ocaml-native-package">ocaml</td>
<td id="ocaml-native-version">4.00.0</td>
<td id="ocaml-native-version">4.00.1</td>
<td id="ocaml-native-website"><a href="http://caml.inria.fr/">ocaml</a></td>
</tr>
<tr>
@ -1703,7 +1703,7 @@ USE_OSGPLUGIN(&lt;plugin2&gt;)
</tr>
<tr>
<td id="ocaml-core-package">ocaml</td>
<td id="ocaml-core-version">4.00.0</td>
<td id="ocaml-core-version">4.00.1</td>
<td id="ocaml-core-website"><a href="http://caml.inria.fr/">ocaml</a></td>
</tr>
<tr>

View File

@ -3,7 +3,7 @@
PKG := ocaml-core
$(PKG)_IGNORE :=
$(PKG)_CHECKSUM := $(ocaml-native_CHECKSUM)
$(PKG)_CHECKSUM := 5abf04cd4fccfcc980e8592995b9159014f23f53
$(PKG)_SUBDIR := $(ocaml-native_SUBDIR)
$(PKG)_FILE := $(ocaml-native_FILE)
$(PKG)_URL := $(ocaml-native_URL)

View File

@ -3,10 +3,10 @@ See index.html for further information.
Contains ad hoc patches for cross building.
From 71a88993df13ccaaab5957ad2a0aef3adf1d49ff Mon Sep 17 00:00:00 2001
From 93d5a514d545567b194af9b9fba0954bb82565e3 Mon Sep 17 00:00:00 2001
From: MXE
Date: Wed, 3 Oct 2012 09:25:11 +0200
Subject: [PATCH 1/5] findlib.ml
Subject: [PATCH 1/2] findlib.ml
diff --git a/ocamlbuild/findlib.ml b/ocamlbuild/findlib.ml
@ -23,196 +23,14 @@ index b5ef878..77454ed 100644
type package = {
name: string;
--
1.7.2.5
1.7.9.5
From a1a25210b44d5c7064d5c7a7002676a114b5f539 Mon Sep 17 00:00:00 2001
From: MXE
Date: Wed, 3 Oct 2012 09:26:40 +0200
Subject: [PATCH 2/5] main.ml : warnings on use of option -use-ocamlfind
diff --git a/ocamlbuild/main.ml b/ocamlbuild/main.ml
index 3b9bd89..7045867 100644
--- a/ocamlbuild/main.ml
+++ b/ocamlbuild/main.ml
@@ -152,6 +152,14 @@ let proceed () =
Ocaml_specific.init ();
Hooks.call_hook Hooks.After_rules;
+ if not !Options.use_ocamlfind then begin
+ if !Param_tags.ocamlfind_tags_used <> StringSet.empty then
+ Log.eprintf "Warning: Tag(s) '%s' can only work with option -use-ocamlfind"
+ (String.concat "," (StringSet.elements !Param_tags.ocamlfind_tags_used));
+ if !Options.ocaml_pkgs <> [] then
+ Log.eprintf "Warning: Options -pkg and -pkgs only work with -use-ocamlfind"
+ end;
+
Param_tags.init ();
Sys.chdir newpwd;
--
1.7.2.5
From aa7642e19ec9a81bcdda382d4682ab20df0013ba Mon Sep 17 00:00:00 2001
From: MXE
Date: Wed, 3 Oct 2012 09:29:23 +0200
Subject: [PATCH 3/5] param_tags : use of special tags considering whether state of option -use-ocamlfind
diff --git a/ocamlbuild/param_tags.ml b/ocamlbuild/param_tags.ml
index 02001de..1aae306 100644
--- a/ocamlbuild/param_tags.ml
+++ b/ocamlbuild/param_tags.ml
@@ -12,15 +12,24 @@
(* Original author: Romain Bardou *)
-module StringSet = Set.Make(String)
+(* 1 : 'acknowledge' while reading user input;
+ 2 : 'declare ' to declare what tags are parameterised tags
+ 3 : 'init' to check acknowledged vs declared tags,
+ and perform declared actions *)
+
+module StringSet = My_std.StringSet
module SSOSet = Set.Make(struct
type t = string * string option
let compare = Pervasives.compare
end)
-(* tag name -> tag action (string -> unit) *)
+(* tag (string) -> action (string -> unit) *)
+(* all parameterised tags must be declared here *)
let declared_tags = Hashtbl.create 17
+(* set of tags that were read (see 'acknowledge'):
+ ("package",Some "lablgtk2") if "package(lablgtk2)" was read ;
+ ("foo",None) if "foo" was read *)
let acknowledged_tags = ref SSOSet.empty
let only_once f =
@@ -32,25 +41,32 @@ let only_once f =
f param
end
-let declare name action =
- Hashtbl.add declared_tags name (only_once action)
+let declare tag action =
+ Hashtbl.add declared_tags tag (only_once action)
-let acknowledge tag =
- let tag = Lexers.tag_gen (Lexing.from_string tag) in
- acknowledged_tags := SSOSet.add tag !acknowledged_tags
+let ocamlfind_tags_used = ref StringSet.empty
-let really_acknowledge (name, param) =
- match param with
- | None ->
- if Hashtbl.mem declared_tags name then
- Log.eprintf "Warning: tag %S expects a parameter" name
- | Some param ->
- let actions = List.rev (Hashtbl.find_all declared_tags name) in
- if actions = [] then
- Log.eprintf "Warning: tag %S does not expect a parameter, but is used with parameter %S" name param;
- List.iter (fun f -> f param) actions
+let acknowledge tag_string =
+ let sso = Lexers.tag_gen (Lexing.from_string tag_string) in
+ let tag = fst sso in
+ (match tag with
+ | "package" | "predicate" | "syntax" ->
+ ocamlfind_tags_used := StringSet.add tag !ocamlfind_tags_used
+ | _ -> ()
+ );
+ acknowledged_tags := SSOSet.add sso !acknowledged_tags
let init () =
- SSOSet.iter really_acknowledge !acknowledged_tags
+ SSOSet.iter (fun (tag,param) ->
+ match param with
+ | None ->
+ if Hashtbl.mem declared_tags tag then
+ Log.eprintf "Warning: tag %S expects a parameter" tag
+ | Some param ->
+ let actions = List.rev (Hashtbl.find_all declared_tags tag) in
+ if actions = [] then
+ Log.eprintf "Warning: tag %S does not expect a parameter, but is used with parameter %S" tag param;
+ List.iter (fun f -> f param) actions
+ ) !acknowledged_tags
let make = Printf.sprintf "%s(%s)"
--
1.7.2.5
From e1f2adad03b52d5b71dea7fd6e2169d361366d60 Mon Sep 17 00:00:00 2001
From: MXE
Date: Wed, 3 Oct 2012 09:30:21 +0200
Subject: [PATCH 4/5] param_tags : use of special tags considering whether state of option -use-ocamlfind (mli)
diff --git a/ocamlbuild/param_tags.mli b/ocamlbuild/param_tags.mli
index a0047af..0839534 100644
--- a/ocamlbuild/param_tags.mli
+++ b/ocamlbuild/param_tags.mli
@@ -12,29 +12,38 @@
(* Original author: Romain Bardou *)
+(** just a check for use of tag "package" that implies ocamlfind use *)
+val ocamlfind_tags_used : My_std.StringSet.t ref
+
val declare: string -> (string -> unit) -> unit
(** Declare a parameterized tag.
-[declare "name" action]: [action "param"] will be executed (once) by [init]
-if a tag of the form [name(param)] is [acknowledge]d.
-
-A given tag may be declared several times with different actions. All actions
-will be executed, in the order they were declared. *)
+[declare tag action] declares [tag] as a parameterized tag.
+A given tag may be declared several times with different actions.
+[init] will execute all actions in the order they were declared.
+Example : [declare "package" action] *)
val acknowledge: string -> unit
(** Acknowledge a tag.
-If the tag is of the form [X(Y)], and have been declared using [declare],
-then the actions given using [declare] will be executed with [Y] as parameter
-when [init] is executed. The action will only be called once per
-acknowledged parameter. *)
+[acknowledge "package(lablgtk2)"] will store the tag "package" with
+parameter [Some "lablgtk2"].
+[acknowledge "annot"] will store the tag "annot" with
+parameter [None] *)
val init: unit -> unit
(** Initialize parameterized tags.
-Call this function once all tags have been [declare]d and [acknowledge]d.
+[init] checks in turn each acknowledged tag along with its parameter :
+- if the tag is declared (e.g "package"), and parameter=Some "lablgtk2",
+calls declared actions (only once) on "lablgtk2".
+- if the tag is not declared (e.g "annot"), and parameter=None, nothing is done
+- if the tag is not declared, but there is a parameter, raise a warning
+- if the tag is declared, but there is no parameter, raise a warning
If you [declare] or [acknowledge] a tag after having called [init], this will
-have no effect. [init] should only be called once. *)
+have no effect.
+[init] must be called once all tags have been marked with [declare] and
+[acknowledge]. It should only be called once. *)
val make: Tags.elt -> string -> Tags.elt
(** Make a parameterized tag instance.
--
1.7.2.5
From 82118f5d8e0cb7a0193479d0e7459d265692551a Mon Sep 17 00:00:00 2001
From b2ce063eee6dca5b3cd67bdb59d2a11ed2043995 Mon Sep 17 00:00:00 2001
From: MXE
Date: Wed, 3 Oct 2012 09:31:13 +0200
Subject: [PATCH 5/5] options : support for prefixed ocaml-tools with ocamlfind
Subject: [PATCH 2/2] options : support for prefixed ocaml-tools with
ocamlfind
diff --git a/ocamlbuild/options.ml b/ocamlbuild/options.ml
@ -289,5 +107,5 @@ index 1be4b63..48f6648 100644
let reorder x y = x := !x @ (List.concat (List.rev !y)) in
--
1.7.2.5
1.7.9.5

View File

@ -3,7 +3,7 @@
PKG := ocaml-native
$(PKG)_IGNORE :=
$(PKG)_CHECKSUM := 9653e76dd14f0fbb750d7b438415890ab9fe2f4e
$(PKG)_CHECKSUM := 5abf04cd4fccfcc980e8592995b9159014f23f53
$(PKG)_SUBDIR := ocaml-$($(PKG)_VERSION)
$(PKG)_FILE := ocaml-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://caml.inria.fr/pub/distrib/ocaml-$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)