updated oasis to 4.xxx

This commit is contained in:
Simon Cruanes 2014-02-26 12:10:17 +01:00
parent 6459258942
commit 57bb863f78
9 changed files with 204 additions and 153 deletions

6
_oasis
View file

@ -1,9 +1,9 @@
OASISFormat: 0.3
OASISFormat: 0.4
Name: containers
Version: 0.1
Homepage: https://github.com/c-cube/ocaml-containers
Authors: Simon Cruanes
License: BSD3
License: BSD-2-clause
LicenseFile: LICENSE
Plugins: META (0.3), DevFiles (0.3)
OCamlVersion: >= 4.00.1
@ -40,7 +40,7 @@ Library "containers"
Vector, Bij, PiCalculus, Bencode, Sexp, RAL, MultiSet,
UnionFind, SmallSet, Leftistheap, AbsSet, CSM, MultiMap,
ActionMan, BV, QCheck, BencodeOnDisk, Show, TTree,
HGraph, Automaton
HGraph, Automaton, Conv
BuildDepends: unix
Library "containers_thread"

33
_tags
View file

@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: 9646ccb2c67bd5510c1a73553e55f6ff)
# DO NOT EDIT (digest: 546f589c3cee93fdadf97d55440d02f8)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
@ -53,6 +53,7 @@
"tTree.cmx": for-pack(Containers)
"hGraph.cmx": for-pack(Containers)
"automaton.cmx": for-pack(Containers)
"conv.cmx": for-pack(Containers)
# Library containers_thread
"containers_thread.cmxs": use_containers_thread
<*.ml{,i}>: package(threads)
@ -60,42 +61,42 @@
"containers_lwt.cmxs": use_containers_lwt
"behavior.cmx": for-pack(Containers_lwt)
"lwt_automaton.cmx": for-pack(Containers_lwt)
<*.ml{,i}>: use_containers
<*.ml{,i}>: package(lwt)
<*.ml{,i}>: package(lwt.unix)
<*.ml{,i}>: package(unix)
<*.ml{,i}>: use_containers
# Library containers_cgi
"cgi/containers_cgi.cmxs": use_containers_cgi
<cgi/*.ml{,i}>: use_containers
<cgi/*.ml{,i}>: package(CamlGI)
<cgi/*.ml{,i}>: package(unix)
<cgi/*.ml{,i}>: use_containers
# Executable benchs
"tests/benchs.native": use_containers
"tests/benchs.native": package(bench)
"tests/benchs.native": package(unix)
"tests/benchs.native": use_containers
<tests/*.ml{,i}>: package(bench)
# Executable run_tests
"tests/run_tests.native": use_containers
"tests/run_tests.native": package(threads)
"tests/run_tests.native": package(oUnit)
"tests/run_tests.native": package(lwt)
"tests/run_tests.native": package(lwt.unix)
"tests/run_tests.native": package(oUnit)
"tests/run_tests.native": package(threads)
"tests/run_tests.native": package(unix)
<tests/*.ml{,i}>: use_containers
<tests/*.ml{,i}>: package(threads)
<tests/*.ml{,i}>: package(oUnit)
"tests/run_tests.native": use_containers
<tests/*.ml{,i}>: package(lwt)
<tests/*.ml{,i}>: package(lwt.unix)
<tests/*.ml{,i}>: package(oUnit)
<tests/*.ml{,i}>: package(threads)
<tests/*.ml{,i}>: package(unix)
<tests/*.ml{,i}>: use_containers
# Executable web_pwd
"examples/cgi/web_pwd.byte": use_containers_cgi
"examples/cgi/web_pwd.byte": use_containers
"examples/cgi/web_pwd.byte": package(threads)
"examples/cgi/web_pwd.byte": package(CamlGI)
"examples/cgi/web_pwd.byte": package(threads)
"examples/cgi/web_pwd.byte": package(unix)
<examples/cgi/*.ml{,i}>: use_containers_cgi
<examples/cgi/*.ml{,i}>: use_containers
<examples/cgi/*.ml{,i}>: package(threads)
"examples/cgi/web_pwd.byte": use_containers
"examples/cgi/web_pwd.byte": use_containers_cgi
<examples/cgi/*.ml{,i}>: package(CamlGI)
<examples/cgi/*.ml{,i}>: package(threads)
<examples/cgi/*.ml{,i}>: package(unix)
<examples/cgi/*.ml{,i}>: use_containers
<examples/cgi/*.ml{,i}>: use_containers_cgi
# OASIS_STOP

4
containers.mldylib Normal file
View file

@ -0,0 +1,4 @@
# OASIS_START
# DO NOT EDIT (digest: 5382aaf8b3d2fdeb6717f9805b0dd511)
Containers
# OASIS_STOP

View file

@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: 9b329c33930d547bbc92d89a6a2cec77)
# DO NOT EDIT (digest: ff5363e0f2b41f49070889cafc95f37b)
Cache
Deque
Gen
@ -38,4 +38,5 @@ Show
TTree
HGraph
Automaton
Conv
# OASIS_STOP

View file

@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: 9b329c33930d547bbc92d89a6a2cec77)
# DO NOT EDIT (digest: ff5363e0f2b41f49070889cafc95f37b)
Cache
Deque
Gen
@ -38,4 +38,5 @@ Show
TTree
HGraph
Automaton
Conv
# OASIS_STOP

4
containers_lwt.mldylib Normal file
View file

@ -0,0 +1,4 @@
# OASIS_START
# DO NOT EDIT (digest: bc144ef7b5b54947fab9662a822f9179)
Containers_lwt
# OASIS_STOP

View file

@ -0,0 +1,4 @@
# OASIS_START
# DO NOT EDIT (digest: adff855173c9b92b5478129af7d39e03)
Future
# OASIS_STOP

View file

@ -1,5 +1,5 @@
(* OASIS_START *)
(* DO NOT EDIT (digest: 0ae112fe35eff6babb0408ce917edebb) *)
(* DO NOT EDIT (digest: c8b764a938cf7287206f86816566b0b5) *)
module OASISGettext = struct
(* # 22 "src/oasis/OASISGettext.ml" *)
@ -204,26 +204,27 @@ module BaseEnvLight = struct
end
let var_get name env =
let rec var_expand str =
let buff =
Buffer.create ((String.length str) * 2)
in
Buffer.add_substitute
buff
(fun var ->
try
var_expand (MapString.find var env)
with Not_found ->
failwith
(Printf.sprintf
"No variable %s defined when trying to expand %S."
var
str))
str;
Buffer.contents buff
let rec var_expand str env =
let buff =
Buffer.create ((String.length str) * 2)
in
var_expand (MapString.find name env)
Buffer.add_substitute
buff
(fun var ->
try
var_expand (MapString.find var env) env
with Not_found ->
failwith
(Printf.sprintf
"No variable %s defined when trying to expand %S."
var
str))
str;
Buffer.contents buff
let var_get name env =
var_expand (MapString.find name env) env
let var_choose lst env =
@ -233,7 +234,7 @@ module BaseEnvLight = struct
end
# 236 "myocamlbuild.ml"
# 237 "myocamlbuild.ml"
module MyOCamlbuildFindlib = struct
(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *)
@ -306,6 +307,22 @@ module MyOCamlbuildFindlib = struct
let find_syntaxes () = ["camlp4o"; "camlp4r"]
let well_known_syntax = [
"camlp4.quotations.o";
"camlp4.quotations.r";
"camlp4.exceptiontracer";
"camlp4.extend";
"camlp4.foldgenerator";
"camlp4.listcomprehension";
"camlp4.locationstripper";
"camlp4.macro";
"camlp4.mapgenerator";
"camlp4.metagenerator";
"camlp4.profiler";
"camlp4.tracer"
]
let dispatch =
function
| Before_options ->
@ -331,13 +348,17 @@ module MyOCamlbuildFindlib = struct
List.iter
begin fun pkg ->
let base_args = [A"-package"; A pkg] in
(* TODO: consider how to really choose camlp4o or camlp4r. *)
let syn_args = [A"-syntax"; A "camlp4o"] in
let args =
(* Heuristic to identify syntax extensions: whether they end in
* ".syntax"; some might not *)
if Filename.check_suffix pkg "syntax"
then syn_args @ base_args
else base_args
(* Heuristic to identify syntax extensions: whether they end in
".syntax"; some might not.
*)
if Filename.check_suffix pkg "syntax" ||
List.mem pkg well_known_syntax then
syn_args @ base_args
else
base_args
in
flag ["ocaml"; "compile"; "pkg_"^pkg] & S args;
flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args;
@ -531,10 +552,14 @@ module MyOCamlbuildBase = struct
(* Add flags *)
List.iter
(fun (tags, cond_specs) ->
let spec =
BaseEnvLight.var_choose cond_specs env
let spec = BaseEnvLight.var_choose cond_specs env in
let rec eval_specs =
function
| S lst -> S (List.map eval_specs lst)
| A str -> A (BaseEnvLight.var_expand str env)
| spec -> spec
in
flag tags & spec)
flag tags & (eval_specs spec))
t.flags
| _ ->
()
@ -551,7 +576,7 @@ module MyOCamlbuildBase = struct
end
# 554 "myocamlbuild.ml"
# 579 "myocamlbuild.ml"
open Ocamlbuild_plugin;;
let package_default =
{
@ -570,6 +595,6 @@ let package_default =
let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
# 574 "myocamlbuild.ml"
# 599 "myocamlbuild.ml"
(* OASIS_STOP *)
Ocamlbuild_plugin.dispatch dispatch_default;;

213
setup.ml
View file

@ -1,9 +1,9 @@
(* setup.ml generated for the first time by OASIS v0.3.0 *)
(* OASIS_START *)
(* DO NOT EDIT (digest: 04bf46092acde357dff7874e85867622) *)
(* DO NOT EDIT (digest: 269dc97805609b876f6d0e0b85780bd1) *)
(*
Regenerated by OASIS v0.4.1
Regenerated by OASIS v0.4.2
Visit http://oasis.forge.ocamlcore.org for more information and
documentation about functions used in this file.
*)
@ -52,6 +52,7 @@ module OASISContext = struct
type t =
{
(* TODO: replace this by a proplist. *)
quiet: bool;
info: bool;
debug: bool;
@ -88,19 +89,31 @@ module OASISContext = struct
{!default with quiet = true}
let args () =
let fspecs () =
(* TODO: don't act on default. *)
let ignore_plugins = ref false in
["-quiet",
Arg.Unit (fun () -> default := {!default with quiet = true}),
(s_ " Run quietly");
s_ " Run quietly";
"-info",
Arg.Unit (fun () -> default := {!default with info = true}),
(s_ " Display information message");
s_ " Display information message";
"-debug",
Arg.Unit (fun () -> default := {!default with debug = true}),
(s_ " Output debug message")]
s_ " Output debug message";
"-ignore-plugins",
Arg.Set ignore_plugins,
s_ " Ignore plugin's field.";
"-C",
(* TODO: remove this chdir. *)
Arg.String (fun str -> Sys.chdir str),
s_ "dir Change directory before running."],
fun () -> {!default with ignore_plugins = !ignore_plugins}
end
module OASISString = struct
@ -286,6 +299,13 @@ module OASISUtils = struct
Hashtbl.hash (String.lowercase s)
end)
module SetStringCsl =
Set.Make
(struct
type t = string
let compare = compare_csl
end)
let varname_of_string ?(hyphen='_') s =
if String.length s = 0 then
@ -920,7 +940,6 @@ module OASISLicense = struct
| DEP5And of license_dep_5 list
type t =
| DEP5License of license_dep_5
| OtherLicense of string (* URL *)
@ -2763,7 +2782,7 @@ module OASISFileUtil = struct
end
# 2766 "setup.ml"
# 2785 "setup.ml"
module BaseEnvLight = struct
(* # 22 "src/base/BaseEnvLight.ml" *)
@ -2838,26 +2857,27 @@ module BaseEnvLight = struct
end
let var_get name env =
let rec var_expand str =
let buff =
Buffer.create ((String.length str) * 2)
in
Buffer.add_substitute
buff
(fun var ->
try
var_expand (MapString.find var env)
with Not_found ->
failwith
(Printf.sprintf
"No variable %s defined when trying to expand %S."
var
str))
str;
Buffer.contents buff
let rec var_expand str env =
let buff =
Buffer.create ((String.length str) * 2)
in
var_expand (MapString.find name env)
Buffer.add_substitute
buff
(fun var ->
try
var_expand (MapString.find var env) env
with Not_found ->
failwith
(Printf.sprintf
"No variable %s defined when trying to expand %S."
var
str))
str;
Buffer.contents buff
let var_get name env =
var_expand (MapString.find name env) env
let var_choose lst env =
@ -2867,15 +2887,15 @@ module BaseEnvLight = struct
end
# 2870 "setup.ml"
# 2890 "setup.ml"
module BaseContext = struct
(* # 22 "src/base/BaseContext.ml" *)
(* TODO: get rid of this module. *)
open OASISContext
let args = args
let args () = fst (fspecs ())
let default = default
@ -5006,11 +5026,14 @@ module BaseSetup = struct
s_ " Don't try to update setup.ml, even if _oasis has changed.")
let default_oasis_fn = "_oasis"
let update_setup_ml t =
let oasis_fn =
match t.oasis_fn with
| Some fn -> fn
| None -> "_oasis"
| None -> default_oasis_fn
in
let oasis_exec =
match t.oasis_exec with
@ -5108,7 +5131,8 @@ module BaseSetup = struct
try
match t.oasis_digest with
| Some dgst ->
if Sys.file_exists oasis_fn && dgst <> Digest.file "_oasis" then
if Sys.file_exists oasis_fn &&
dgst <> Digest.file default_oasis_fn then
begin
do_update ();
true
@ -5274,7 +5298,7 @@ module BaseSetup = struct
end
# 5277 "setup.ml"
# 5301 "setup.ml"
module InternalConfigurePlugin = struct
(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *)
@ -6123,7 +6147,7 @@ module InternalInstallPlugin = struct
end
# 6126 "setup.ml"
# 6150 "setup.ml"
module OCamlbuildCommon = struct
(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *)
@ -6135,10 +6159,15 @@ module OCamlbuildCommon = struct
open OASISGettext
open BaseEnv
open BaseStandardVar
open OASISTypes
let ocamlbuild_clean_ev =
"ocamlbuild-clean"
type extra_args = string list
let ocamlbuild_clean_ev = "ocamlbuild-clean"
let ocamlbuildflags =
@ -6261,27 +6290,7 @@ module OCamlbuildPlugin = struct
ref (fun lst -> lst)
type ocamlbuild_plugin =
{
plugin_tags: string option;
extra_args: string list;
}
let check_ocaml_version version pkg =
match pkg.ocaml_version with
| Some ocaml_version ->
let min_ocaml_version = OASISVersion.version_of_string version in
OASISVersion.comparator_ge min_ocaml_version ocaml_version
| None ->
false
let ocamlbuild_supports_ocamlfind = check_ocaml_version "3.12.1"
let ocamlbuild_supports_plugin_tags = check_ocaml_version "4.01"
let build t pkg argv =
let build extra_args pkg argv =
(* Return the filename in build directory *)
let in_build_dir fn =
Filename.concat
@ -6425,33 +6434,13 @@ module OCamlbuildPlugin = struct
(BaseBuilt.register bt bnm lst)
in
let cond_targets =
(* Run the hook *)
!cond_targets_hook cond_targets
in
(* Run the hook *)
let cond_targets = !cond_targets_hook cond_targets in
let extra_args =
match t.plugin_tags with
| Some tags -> "-plugin-tags" :: ("'" ^ tags ^ "'") :: t.extra_args
| None -> t.extra_args
in
let extra_args =
if ocamlbuild_supports_ocamlfind pkg then
"-use-ocamlfind" :: extra_args
else
extra_args
in
(* Run a list of target... *)
run_ocamlbuild
(List.flatten
(List.map snd cond_targets)
@ extra_args)
argv;
(* ... and register events *)
List.iter
check_and_register
(List.flatten (List.map fst cond_targets))
(* Run a list of target... *)
run_ocamlbuild (List.flatten (List.map snd cond_targets) @ extra_args) argv;
(* ... and register events *)
List.iter check_and_register (List.flatten (List.map fst cond_targets))
let clean pkg extra_args =
@ -6488,12 +6477,18 @@ module OCamlbuildDocPlugin = struct
type run_t =
{
extra_args: string list;
run_path: unix_filename;
}
let doc_build path pkg (cs, doc) argv =
let doc_build run pkg (cs, doc) argv =
let index_html =
OASISUnixPath.make
[
path;
run.run_path;
cs.cs_name^".docdir";
"index.html";
]
@ -6502,11 +6497,11 @@ module OCamlbuildDocPlugin = struct
OASISHostPath.make
[
build_dir argv;
OASISHostPath.of_unix path;
OASISHostPath.of_unix run.run_path;
cs.cs_name^".docdir";
]
in
run_ocamlbuild [index_html] argv;
run_ocamlbuild (index_html :: run.extra_args) argv;
List.iter
(fun glb ->
BaseBuilt.register
@ -6517,7 +6512,7 @@ module OCamlbuildDocPlugin = struct
["*.html"; "*.css"]
let doc_clean t pkg (cs, doc) argv =
let doc_clean run pkg (cs, doc) argv =
run_clean argv;
BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name
@ -6525,7 +6520,7 @@ module OCamlbuildDocPlugin = struct
end
# 6528 "setup.ml"
# 6523 "setup.ml"
module CustomPlugin = struct
(* # 22 "src/plugins/custom/CustomPlugin.ml" *)
@ -6673,15 +6668,13 @@ module CustomPlugin = struct
end
# 6676 "setup.ml"
# 6671 "setup.ml"
open OASISTypes;;
let setup_t =
{
BaseSetup.configure = InternalConfigurePlugin.configure;
build =
OCamlbuildPlugin.build
{OCamlbuildPlugin.plugin_tags = None; extra_args = []};
build = OCamlbuildPlugin.build ["-use-ocamlfind"];
test =
[
("all",
@ -6693,7 +6686,15 @@ let setup_t =
cmd_distclean = [(OASISExpr.EBool true, None)]
})
];
doc = [("containers", OCamlbuildDocPlugin.doc_build ".")];
doc =
[
("containers",
OCamlbuildDocPlugin.doc_build
{
OCamlbuildDocPlugin.extra_args = ["-use-ocamlfind"];
run_path = "."
})
];
install = InternalInstallPlugin.install;
uninstall = InternalInstallPlugin.uninstall;
clean = [OCamlbuildPlugin.clean];
@ -6708,7 +6709,15 @@ let setup_t =
cmd_distclean = [(OASISExpr.EBool true, None)]
})
];
clean_doc = [("containers", OCamlbuildDocPlugin.doc_clean ".")];
clean_doc =
[
("containers",
OCamlbuildDocPlugin.doc_clean
{
OCamlbuildDocPlugin.extra_args = ["-use-ocamlfind"];
run_path = "."
})
];
distclean = [];
distclean_test =
[
@ -6724,7 +6733,7 @@ let setup_t =
distclean_doc = [];
package =
{
oasis_version = "0.3";
oasis_version = "0.4";
ocaml_version = Some (OASISVersion.VGreaterEqual "4.00.1");
findlib_version = None;
alpha_features = [];
@ -6735,7 +6744,7 @@ let setup_t =
OASISLicense.DEP5License
(OASISLicense.DEP5Unit
{
OASISLicense.license = "BSD3";
OASISLicense.license = "BSD-2-clause";
excption = None;
version = OASISLicense.NoVersion
});
@ -6891,7 +6900,8 @@ let setup_t =
"Show";
"TTree";
"HGraph";
"Automaton"
"Automaton";
"Conv"
];
lib_pack = true;
lib_internal_modules = [];
@ -7213,8 +7223,9 @@ let setup_t =
plugin_data = []
};
oasis_fn = Some "_oasis";
oasis_version = "0.4.1";
oasis_digest = Some "6:\022\240L\020\180\171e[+\176\163\r\213\232";
oasis_version = "0.4.2";
oasis_digest =
Some "\145G\\+\192\166\200\007\233\210\000\157\216\241\017 ";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false
@ -7222,6 +7233,6 @@ let setup_t =
let setup () = BaseSetup.setup setup_t;;
# 7226 "setup.ml"
# 7237 "setup.ml"
(* OASIS_STOP *)
let () = setup ();;