mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 19:55:31 -05:00
updated oasis to 4.xxx
This commit is contained in:
parent
6459258942
commit
57bb863f78
9 changed files with 204 additions and 153 deletions
6
_oasis
6
_oasis
|
|
@ -1,9 +1,9 @@
|
||||||
OASISFormat: 0.3
|
OASISFormat: 0.4
|
||||||
Name: containers
|
Name: containers
|
||||||
Version: 0.1
|
Version: 0.1
|
||||||
Homepage: https://github.com/c-cube/ocaml-containers
|
Homepage: https://github.com/c-cube/ocaml-containers
|
||||||
Authors: Simon Cruanes
|
Authors: Simon Cruanes
|
||||||
License: BSD3
|
License: BSD-2-clause
|
||||||
LicenseFile: LICENSE
|
LicenseFile: LICENSE
|
||||||
Plugins: META (0.3), DevFiles (0.3)
|
Plugins: META (0.3), DevFiles (0.3)
|
||||||
OCamlVersion: >= 4.00.1
|
OCamlVersion: >= 4.00.1
|
||||||
|
|
@ -40,7 +40,7 @@ Library "containers"
|
||||||
Vector, Bij, PiCalculus, Bencode, Sexp, RAL, MultiSet,
|
Vector, Bij, PiCalculus, Bencode, Sexp, RAL, MultiSet,
|
||||||
UnionFind, SmallSet, Leftistheap, AbsSet, CSM, MultiMap,
|
UnionFind, SmallSet, Leftistheap, AbsSet, CSM, MultiMap,
|
||||||
ActionMan, BV, QCheck, BencodeOnDisk, Show, TTree,
|
ActionMan, BV, QCheck, BencodeOnDisk, Show, TTree,
|
||||||
HGraph, Automaton
|
HGraph, Automaton, Conv
|
||||||
BuildDepends: unix
|
BuildDepends: unix
|
||||||
|
|
||||||
Library "containers_thread"
|
Library "containers_thread"
|
||||||
|
|
|
||||||
33
_tags
33
_tags
|
|
@ -1,5 +1,5 @@
|
||||||
# OASIS_START
|
# OASIS_START
|
||||||
# DO NOT EDIT (digest: 9646ccb2c67bd5510c1a73553e55f6ff)
|
# DO NOT EDIT (digest: 546f589c3cee93fdadf97d55440d02f8)
|
||||||
# Ignore VCS directories, you can use the same kind of rule outside
|
# Ignore VCS directories, you can use the same kind of rule outside
|
||||||
# OASIS_START/STOP if you want to exclude directories that contains
|
# OASIS_START/STOP if you want to exclude directories that contains
|
||||||
# useless stuff for the build process
|
# useless stuff for the build process
|
||||||
|
|
@ -53,6 +53,7 @@
|
||||||
"tTree.cmx": for-pack(Containers)
|
"tTree.cmx": for-pack(Containers)
|
||||||
"hGraph.cmx": for-pack(Containers)
|
"hGraph.cmx": for-pack(Containers)
|
||||||
"automaton.cmx": for-pack(Containers)
|
"automaton.cmx": for-pack(Containers)
|
||||||
|
"conv.cmx": for-pack(Containers)
|
||||||
# Library containers_thread
|
# Library containers_thread
|
||||||
"containers_thread.cmxs": use_containers_thread
|
"containers_thread.cmxs": use_containers_thread
|
||||||
<*.ml{,i}>: package(threads)
|
<*.ml{,i}>: package(threads)
|
||||||
|
|
@ -60,42 +61,42 @@
|
||||||
"containers_lwt.cmxs": use_containers_lwt
|
"containers_lwt.cmxs": use_containers_lwt
|
||||||
"behavior.cmx": for-pack(Containers_lwt)
|
"behavior.cmx": for-pack(Containers_lwt)
|
||||||
"lwt_automaton.cmx": for-pack(Containers_lwt)
|
"lwt_automaton.cmx": for-pack(Containers_lwt)
|
||||||
<*.ml{,i}>: use_containers
|
|
||||||
<*.ml{,i}>: package(lwt)
|
<*.ml{,i}>: package(lwt)
|
||||||
<*.ml{,i}>: package(lwt.unix)
|
<*.ml{,i}>: package(lwt.unix)
|
||||||
<*.ml{,i}>: package(unix)
|
<*.ml{,i}>: package(unix)
|
||||||
|
<*.ml{,i}>: use_containers
|
||||||
# Library containers_cgi
|
# Library containers_cgi
|
||||||
"cgi/containers_cgi.cmxs": use_containers_cgi
|
"cgi/containers_cgi.cmxs": use_containers_cgi
|
||||||
<cgi/*.ml{,i}>: use_containers
|
|
||||||
<cgi/*.ml{,i}>: package(CamlGI)
|
<cgi/*.ml{,i}>: package(CamlGI)
|
||||||
<cgi/*.ml{,i}>: package(unix)
|
<cgi/*.ml{,i}>: package(unix)
|
||||||
|
<cgi/*.ml{,i}>: use_containers
|
||||||
# Executable benchs
|
# Executable benchs
|
||||||
"tests/benchs.native": use_containers
|
|
||||||
"tests/benchs.native": package(bench)
|
"tests/benchs.native": package(bench)
|
||||||
"tests/benchs.native": package(unix)
|
"tests/benchs.native": package(unix)
|
||||||
|
"tests/benchs.native": use_containers
|
||||||
<tests/*.ml{,i}>: package(bench)
|
<tests/*.ml{,i}>: package(bench)
|
||||||
# Executable run_tests
|
# 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)
|
||||||
"tests/run_tests.native": package(lwt.unix)
|
"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/run_tests.native": package(unix)
|
||||||
<tests/*.ml{,i}>: use_containers
|
"tests/run_tests.native": use_containers
|
||||||
<tests/*.ml{,i}>: package(threads)
|
|
||||||
<tests/*.ml{,i}>: package(oUnit)
|
|
||||||
<tests/*.ml{,i}>: package(lwt)
|
<tests/*.ml{,i}>: package(lwt)
|
||||||
<tests/*.ml{,i}>: package(lwt.unix)
|
<tests/*.ml{,i}>: package(lwt.unix)
|
||||||
|
<tests/*.ml{,i}>: package(oUnit)
|
||||||
|
<tests/*.ml{,i}>: package(threads)
|
||||||
<tests/*.ml{,i}>: package(unix)
|
<tests/*.ml{,i}>: package(unix)
|
||||||
|
<tests/*.ml{,i}>: use_containers
|
||||||
# Executable web_pwd
|
# 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(CamlGI)
|
||||||
|
"examples/cgi/web_pwd.byte": package(threads)
|
||||||
"examples/cgi/web_pwd.byte": package(unix)
|
"examples/cgi/web_pwd.byte": package(unix)
|
||||||
<examples/cgi/*.ml{,i}>: use_containers_cgi
|
"examples/cgi/web_pwd.byte": use_containers
|
||||||
<examples/cgi/*.ml{,i}>: use_containers
|
"examples/cgi/web_pwd.byte": use_containers_cgi
|
||||||
<examples/cgi/*.ml{,i}>: package(threads)
|
|
||||||
<examples/cgi/*.ml{,i}>: package(CamlGI)
|
<examples/cgi/*.ml{,i}>: package(CamlGI)
|
||||||
|
<examples/cgi/*.ml{,i}>: package(threads)
|
||||||
<examples/cgi/*.ml{,i}>: package(unix)
|
<examples/cgi/*.ml{,i}>: package(unix)
|
||||||
|
<examples/cgi/*.ml{,i}>: use_containers
|
||||||
|
<examples/cgi/*.ml{,i}>: use_containers_cgi
|
||||||
# OASIS_STOP
|
# OASIS_STOP
|
||||||
|
|
|
||||||
4
containers.mldylib
Normal file
4
containers.mldylib
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# OASIS_START
|
||||||
|
# DO NOT EDIT (digest: 5382aaf8b3d2fdeb6717f9805b0dd511)
|
||||||
|
Containers
|
||||||
|
# OASIS_STOP
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# OASIS_START
|
# OASIS_START
|
||||||
# DO NOT EDIT (digest: 9b329c33930d547bbc92d89a6a2cec77)
|
# DO NOT EDIT (digest: ff5363e0f2b41f49070889cafc95f37b)
|
||||||
Cache
|
Cache
|
||||||
Deque
|
Deque
|
||||||
Gen
|
Gen
|
||||||
|
|
@ -38,4 +38,5 @@ Show
|
||||||
TTree
|
TTree
|
||||||
HGraph
|
HGraph
|
||||||
Automaton
|
Automaton
|
||||||
|
Conv
|
||||||
# OASIS_STOP
|
# OASIS_STOP
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# OASIS_START
|
# OASIS_START
|
||||||
# DO NOT EDIT (digest: 9b329c33930d547bbc92d89a6a2cec77)
|
# DO NOT EDIT (digest: ff5363e0f2b41f49070889cafc95f37b)
|
||||||
Cache
|
Cache
|
||||||
Deque
|
Deque
|
||||||
Gen
|
Gen
|
||||||
|
|
@ -38,4 +38,5 @@ Show
|
||||||
TTree
|
TTree
|
||||||
HGraph
|
HGraph
|
||||||
Automaton
|
Automaton
|
||||||
|
Conv
|
||||||
# OASIS_STOP
|
# OASIS_STOP
|
||||||
|
|
|
||||||
4
containers_lwt.mldylib
Normal file
4
containers_lwt.mldylib
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# OASIS_START
|
||||||
|
# DO NOT EDIT (digest: bc144ef7b5b54947fab9662a822f9179)
|
||||||
|
Containers_lwt
|
||||||
|
# OASIS_STOP
|
||||||
4
containers_thread.mldylib
Normal file
4
containers_thread.mldylib
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# OASIS_START
|
||||||
|
# DO NOT EDIT (digest: adff855173c9b92b5478129af7d39e03)
|
||||||
|
Future
|
||||||
|
# OASIS_STOP
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
(* OASIS_START *)
|
(* OASIS_START *)
|
||||||
(* DO NOT EDIT (digest: 0ae112fe35eff6babb0408ce917edebb) *)
|
(* DO NOT EDIT (digest: c8b764a938cf7287206f86816566b0b5) *)
|
||||||
module OASISGettext = struct
|
module OASISGettext = struct
|
||||||
(* # 22 "src/oasis/OASISGettext.ml" *)
|
(* # 22 "src/oasis/OASISGettext.ml" *)
|
||||||
|
|
||||||
|
|
@ -204,26 +204,27 @@ module BaseEnvLight = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
let var_get name env =
|
let rec var_expand str env =
|
||||||
let rec var_expand str =
|
let buff =
|
||||||
let buff =
|
Buffer.create ((String.length str) * 2)
|
||||||
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
|
|
||||||
in
|
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 =
|
let var_choose lst env =
|
||||||
|
|
@ -233,7 +234,7 @@ module BaseEnvLight = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# 236 "myocamlbuild.ml"
|
# 237 "myocamlbuild.ml"
|
||||||
module MyOCamlbuildFindlib = struct
|
module MyOCamlbuildFindlib = struct
|
||||||
(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *)
|
(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *)
|
||||||
|
|
||||||
|
|
@ -306,6 +307,22 @@ module MyOCamlbuildFindlib = struct
|
||||||
let find_syntaxes () = ["camlp4o"; "camlp4r"]
|
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 =
|
let dispatch =
|
||||||
function
|
function
|
||||||
| Before_options ->
|
| Before_options ->
|
||||||
|
|
@ -331,13 +348,17 @@ module MyOCamlbuildFindlib = struct
|
||||||
List.iter
|
List.iter
|
||||||
begin fun pkg ->
|
begin fun pkg ->
|
||||||
let base_args = [A"-package"; A pkg] in
|
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 syn_args = [A"-syntax"; A "camlp4o"] in
|
||||||
let args =
|
let args =
|
||||||
(* Heuristic to identify syntax extensions: whether they end in
|
(* Heuristic to identify syntax extensions: whether they end in
|
||||||
* ".syntax"; some might not *)
|
".syntax"; some might not.
|
||||||
if Filename.check_suffix pkg "syntax"
|
*)
|
||||||
then syn_args @ base_args
|
if Filename.check_suffix pkg "syntax" ||
|
||||||
else base_args
|
List.mem pkg well_known_syntax then
|
||||||
|
syn_args @ base_args
|
||||||
|
else
|
||||||
|
base_args
|
||||||
in
|
in
|
||||||
flag ["ocaml"; "compile"; "pkg_"^pkg] & S args;
|
flag ["ocaml"; "compile"; "pkg_"^pkg] & S args;
|
||||||
flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args;
|
flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args;
|
||||||
|
|
@ -531,10 +552,14 @@ module MyOCamlbuildBase = struct
|
||||||
(* Add flags *)
|
(* Add flags *)
|
||||||
List.iter
|
List.iter
|
||||||
(fun (tags, cond_specs) ->
|
(fun (tags, cond_specs) ->
|
||||||
let spec =
|
let spec = BaseEnvLight.var_choose cond_specs env in
|
||||||
BaseEnvLight.var_choose cond_specs env
|
let rec eval_specs =
|
||||||
|
function
|
||||||
|
| S lst -> S (List.map eval_specs lst)
|
||||||
|
| A str -> A (BaseEnvLight.var_expand str env)
|
||||||
|
| spec -> spec
|
||||||
in
|
in
|
||||||
flag tags & spec)
|
flag tags & (eval_specs spec))
|
||||||
t.flags
|
t.flags
|
||||||
| _ ->
|
| _ ->
|
||||||
()
|
()
|
||||||
|
|
@ -551,7 +576,7 @@ module MyOCamlbuildBase = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# 554 "myocamlbuild.ml"
|
# 579 "myocamlbuild.ml"
|
||||||
open Ocamlbuild_plugin;;
|
open Ocamlbuild_plugin;;
|
||||||
let package_default =
|
let package_default =
|
||||||
{
|
{
|
||||||
|
|
@ -570,6 +595,6 @@ let package_default =
|
||||||
|
|
||||||
let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
|
let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
|
||||||
|
|
||||||
# 574 "myocamlbuild.ml"
|
# 599 "myocamlbuild.ml"
|
||||||
(* OASIS_STOP *)
|
(* OASIS_STOP *)
|
||||||
Ocamlbuild_plugin.dispatch dispatch_default;;
|
Ocamlbuild_plugin.dispatch dispatch_default;;
|
||||||
|
|
|
||||||
213
setup.ml
213
setup.ml
|
|
@ -1,9 +1,9 @@
|
||||||
(* setup.ml generated for the first time by OASIS v0.3.0 *)
|
(* setup.ml generated for the first time by OASIS v0.3.0 *)
|
||||||
|
|
||||||
(* OASIS_START *)
|
(* 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
|
Visit http://oasis.forge.ocamlcore.org for more information and
|
||||||
documentation about functions used in this file.
|
documentation about functions used in this file.
|
||||||
*)
|
*)
|
||||||
|
|
@ -52,6 +52,7 @@ module OASISContext = struct
|
||||||
|
|
||||||
type t =
|
type t =
|
||||||
{
|
{
|
||||||
|
(* TODO: replace this by a proplist. *)
|
||||||
quiet: bool;
|
quiet: bool;
|
||||||
info: bool;
|
info: bool;
|
||||||
debug: bool;
|
debug: bool;
|
||||||
|
|
@ -88,19 +89,31 @@ module OASISContext = struct
|
||||||
{!default with quiet = true}
|
{!default with quiet = true}
|
||||||
|
|
||||||
|
|
||||||
let args () =
|
let fspecs () =
|
||||||
|
(* TODO: don't act on default. *)
|
||||||
|
let ignore_plugins = ref false in
|
||||||
["-quiet",
|
["-quiet",
|
||||||
Arg.Unit (fun () -> default := {!default with quiet = true}),
|
Arg.Unit (fun () -> default := {!default with quiet = true}),
|
||||||
(s_ " Run quietly");
|
s_ " Run quietly";
|
||||||
|
|
||||||
"-info",
|
"-info",
|
||||||
Arg.Unit (fun () -> default := {!default with info = true}),
|
Arg.Unit (fun () -> default := {!default with info = true}),
|
||||||
(s_ " Display information message");
|
s_ " Display information message";
|
||||||
|
|
||||||
|
|
||||||
"-debug",
|
"-debug",
|
||||||
Arg.Unit (fun () -> default := {!default with debug = true}),
|
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
|
end
|
||||||
|
|
||||||
module OASISString = struct
|
module OASISString = struct
|
||||||
|
|
@ -286,6 +299,13 @@ module OASISUtils = struct
|
||||||
Hashtbl.hash (String.lowercase s)
|
Hashtbl.hash (String.lowercase s)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
module SetStringCsl =
|
||||||
|
Set.Make
|
||||||
|
(struct
|
||||||
|
type t = string
|
||||||
|
let compare = compare_csl
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
let varname_of_string ?(hyphen='_') s =
|
let varname_of_string ?(hyphen='_') s =
|
||||||
if String.length s = 0 then
|
if String.length s = 0 then
|
||||||
|
|
@ -920,7 +940,6 @@ module OASISLicense = struct
|
||||||
| DEP5And of license_dep_5 list
|
| DEP5And of license_dep_5 list
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type t =
|
type t =
|
||||||
| DEP5License of license_dep_5
|
| DEP5License of license_dep_5
|
||||||
| OtherLicense of string (* URL *)
|
| OtherLicense of string (* URL *)
|
||||||
|
|
@ -2763,7 +2782,7 @@ module OASISFileUtil = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# 2766 "setup.ml"
|
# 2785 "setup.ml"
|
||||||
module BaseEnvLight = struct
|
module BaseEnvLight = struct
|
||||||
(* # 22 "src/base/BaseEnvLight.ml" *)
|
(* # 22 "src/base/BaseEnvLight.ml" *)
|
||||||
|
|
||||||
|
|
@ -2838,26 +2857,27 @@ module BaseEnvLight = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
let var_get name env =
|
let rec var_expand str env =
|
||||||
let rec var_expand str =
|
let buff =
|
||||||
let buff =
|
Buffer.create ((String.length str) * 2)
|
||||||
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
|
|
||||||
in
|
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 =
|
let var_choose lst env =
|
||||||
|
|
@ -2867,15 +2887,15 @@ module BaseEnvLight = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# 2870 "setup.ml"
|
# 2890 "setup.ml"
|
||||||
module BaseContext = struct
|
module BaseContext = struct
|
||||||
(* # 22 "src/base/BaseContext.ml" *)
|
(* # 22 "src/base/BaseContext.ml" *)
|
||||||
|
|
||||||
|
(* TODO: get rid of this module. *)
|
||||||
open OASISContext
|
open OASISContext
|
||||||
|
|
||||||
|
|
||||||
let args = args
|
let args () = fst (fspecs ())
|
||||||
|
|
||||||
|
|
||||||
let default = default
|
let default = default
|
||||||
|
|
@ -5006,11 +5026,14 @@ module BaseSetup = struct
|
||||||
s_ " Don't try to update setup.ml, even if _oasis has changed.")
|
s_ " Don't try to update setup.ml, even if _oasis has changed.")
|
||||||
|
|
||||||
|
|
||||||
|
let default_oasis_fn = "_oasis"
|
||||||
|
|
||||||
|
|
||||||
let update_setup_ml t =
|
let update_setup_ml t =
|
||||||
let oasis_fn =
|
let oasis_fn =
|
||||||
match t.oasis_fn with
|
match t.oasis_fn with
|
||||||
| Some fn -> fn
|
| Some fn -> fn
|
||||||
| None -> "_oasis"
|
| None -> default_oasis_fn
|
||||||
in
|
in
|
||||||
let oasis_exec =
|
let oasis_exec =
|
||||||
match t.oasis_exec with
|
match t.oasis_exec with
|
||||||
|
|
@ -5108,7 +5131,8 @@ module BaseSetup = struct
|
||||||
try
|
try
|
||||||
match t.oasis_digest with
|
match t.oasis_digest with
|
||||||
| Some dgst ->
|
| 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
|
begin
|
||||||
do_update ();
|
do_update ();
|
||||||
true
|
true
|
||||||
|
|
@ -5274,7 +5298,7 @@ module BaseSetup = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# 5277 "setup.ml"
|
# 5301 "setup.ml"
|
||||||
module InternalConfigurePlugin = struct
|
module InternalConfigurePlugin = struct
|
||||||
(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *)
|
(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *)
|
||||||
|
|
||||||
|
|
@ -6123,7 +6147,7 @@ module InternalInstallPlugin = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# 6126 "setup.ml"
|
# 6150 "setup.ml"
|
||||||
module OCamlbuildCommon = struct
|
module OCamlbuildCommon = struct
|
||||||
(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *)
|
(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *)
|
||||||
|
|
||||||
|
|
@ -6135,10 +6159,15 @@ module OCamlbuildCommon = struct
|
||||||
open OASISGettext
|
open OASISGettext
|
||||||
open BaseEnv
|
open BaseEnv
|
||||||
open BaseStandardVar
|
open BaseStandardVar
|
||||||
|
open OASISTypes
|
||||||
|
|
||||||
|
|
||||||
let ocamlbuild_clean_ev =
|
|
||||||
"ocamlbuild-clean"
|
|
||||||
|
type extra_args = string list
|
||||||
|
|
||||||
|
|
||||||
|
let ocamlbuild_clean_ev = "ocamlbuild-clean"
|
||||||
|
|
||||||
|
|
||||||
let ocamlbuildflags =
|
let ocamlbuildflags =
|
||||||
|
|
@ -6261,27 +6290,7 @@ module OCamlbuildPlugin = struct
|
||||||
ref (fun lst -> lst)
|
ref (fun lst -> lst)
|
||||||
|
|
||||||
|
|
||||||
type ocamlbuild_plugin =
|
let build extra_args pkg argv =
|
||||||
{
|
|
||||||
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 =
|
|
||||||
(* Return the filename in build directory *)
|
(* Return the filename in build directory *)
|
||||||
let in_build_dir fn =
|
let in_build_dir fn =
|
||||||
Filename.concat
|
Filename.concat
|
||||||
|
|
@ -6425,33 +6434,13 @@ module OCamlbuildPlugin = struct
|
||||||
(BaseBuilt.register bt bnm lst)
|
(BaseBuilt.register bt bnm lst)
|
||||||
in
|
in
|
||||||
|
|
||||||
let cond_targets =
|
(* Run the hook *)
|
||||||
(* Run the hook *)
|
let cond_targets = !cond_targets_hook cond_targets in
|
||||||
!cond_targets_hook cond_targets
|
|
||||||
in
|
|
||||||
|
|
||||||
let extra_args =
|
(* Run a list of target... *)
|
||||||
match t.plugin_tags with
|
run_ocamlbuild (List.flatten (List.map snd cond_targets) @ extra_args) argv;
|
||||||
| Some tags -> "-plugin-tags" :: ("'" ^ tags ^ "'") :: t.extra_args
|
(* ... and register events *)
|
||||||
| None -> t.extra_args
|
List.iter check_and_register (List.flatten (List.map fst cond_targets))
|
||||||
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))
|
|
||||||
|
|
||||||
|
|
||||||
let clean pkg extra_args =
|
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 =
|
let index_html =
|
||||||
OASISUnixPath.make
|
OASISUnixPath.make
|
||||||
[
|
[
|
||||||
path;
|
run.run_path;
|
||||||
cs.cs_name^".docdir";
|
cs.cs_name^".docdir";
|
||||||
"index.html";
|
"index.html";
|
||||||
]
|
]
|
||||||
|
|
@ -6502,11 +6497,11 @@ module OCamlbuildDocPlugin = struct
|
||||||
OASISHostPath.make
|
OASISHostPath.make
|
||||||
[
|
[
|
||||||
build_dir argv;
|
build_dir argv;
|
||||||
OASISHostPath.of_unix path;
|
OASISHostPath.of_unix run.run_path;
|
||||||
cs.cs_name^".docdir";
|
cs.cs_name^".docdir";
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
run_ocamlbuild [index_html] argv;
|
run_ocamlbuild (index_html :: run.extra_args) argv;
|
||||||
List.iter
|
List.iter
|
||||||
(fun glb ->
|
(fun glb ->
|
||||||
BaseBuilt.register
|
BaseBuilt.register
|
||||||
|
|
@ -6517,7 +6512,7 @@ module OCamlbuildDocPlugin = struct
|
||||||
["*.html"; "*.css"]
|
["*.html"; "*.css"]
|
||||||
|
|
||||||
|
|
||||||
let doc_clean t pkg (cs, doc) argv =
|
let doc_clean run pkg (cs, doc) argv =
|
||||||
run_clean argv;
|
run_clean argv;
|
||||||
BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name
|
BaseBuilt.unregister BaseBuilt.BDoc cs.cs_name
|
||||||
|
|
||||||
|
|
@ -6525,7 +6520,7 @@ module OCamlbuildDocPlugin = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# 6528 "setup.ml"
|
# 6523 "setup.ml"
|
||||||
module CustomPlugin = struct
|
module CustomPlugin = struct
|
||||||
(* # 22 "src/plugins/custom/CustomPlugin.ml" *)
|
(* # 22 "src/plugins/custom/CustomPlugin.ml" *)
|
||||||
|
|
||||||
|
|
@ -6673,15 +6668,13 @@ module CustomPlugin = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# 6676 "setup.ml"
|
# 6671 "setup.ml"
|
||||||
open OASISTypes;;
|
open OASISTypes;;
|
||||||
|
|
||||||
let setup_t =
|
let setup_t =
|
||||||
{
|
{
|
||||||
BaseSetup.configure = InternalConfigurePlugin.configure;
|
BaseSetup.configure = InternalConfigurePlugin.configure;
|
||||||
build =
|
build = OCamlbuildPlugin.build ["-use-ocamlfind"];
|
||||||
OCamlbuildPlugin.build
|
|
||||||
{OCamlbuildPlugin.plugin_tags = None; extra_args = []};
|
|
||||||
test =
|
test =
|
||||||
[
|
[
|
||||||
("all",
|
("all",
|
||||||
|
|
@ -6693,7 +6686,15 @@ let setup_t =
|
||||||
cmd_distclean = [(OASISExpr.EBool true, None)]
|
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;
|
install = InternalInstallPlugin.install;
|
||||||
uninstall = InternalInstallPlugin.uninstall;
|
uninstall = InternalInstallPlugin.uninstall;
|
||||||
clean = [OCamlbuildPlugin.clean];
|
clean = [OCamlbuildPlugin.clean];
|
||||||
|
|
@ -6708,7 +6709,15 @@ let setup_t =
|
||||||
cmd_distclean = [(OASISExpr.EBool true, None)]
|
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 = [];
|
||||||
distclean_test =
|
distclean_test =
|
||||||
[
|
[
|
||||||
|
|
@ -6724,7 +6733,7 @@ let setup_t =
|
||||||
distclean_doc = [];
|
distclean_doc = [];
|
||||||
package =
|
package =
|
||||||
{
|
{
|
||||||
oasis_version = "0.3";
|
oasis_version = "0.4";
|
||||||
ocaml_version = Some (OASISVersion.VGreaterEqual "4.00.1");
|
ocaml_version = Some (OASISVersion.VGreaterEqual "4.00.1");
|
||||||
findlib_version = None;
|
findlib_version = None;
|
||||||
alpha_features = [];
|
alpha_features = [];
|
||||||
|
|
@ -6735,7 +6744,7 @@ let setup_t =
|
||||||
OASISLicense.DEP5License
|
OASISLicense.DEP5License
|
||||||
(OASISLicense.DEP5Unit
|
(OASISLicense.DEP5Unit
|
||||||
{
|
{
|
||||||
OASISLicense.license = "BSD3";
|
OASISLicense.license = "BSD-2-clause";
|
||||||
excption = None;
|
excption = None;
|
||||||
version = OASISLicense.NoVersion
|
version = OASISLicense.NoVersion
|
||||||
});
|
});
|
||||||
|
|
@ -6891,7 +6900,8 @@ let setup_t =
|
||||||
"Show";
|
"Show";
|
||||||
"TTree";
|
"TTree";
|
||||||
"HGraph";
|
"HGraph";
|
||||||
"Automaton"
|
"Automaton";
|
||||||
|
"Conv"
|
||||||
];
|
];
|
||||||
lib_pack = true;
|
lib_pack = true;
|
||||||
lib_internal_modules = [];
|
lib_internal_modules = [];
|
||||||
|
|
@ -7213,8 +7223,9 @@ let setup_t =
|
||||||
plugin_data = []
|
plugin_data = []
|
||||||
};
|
};
|
||||||
oasis_fn = Some "_oasis";
|
oasis_fn = Some "_oasis";
|
||||||
oasis_version = "0.4.1";
|
oasis_version = "0.4.2";
|
||||||
oasis_digest = Some "6:\022\240L\020\180\171e[+\176\163\r\213\232";
|
oasis_digest =
|
||||||
|
Some "\145G\\+\192\166\200\007\233\210\000\157\216\241\017 ";
|
||||||
oasis_exec = None;
|
oasis_exec = None;
|
||||||
oasis_setup_args = [];
|
oasis_setup_args = [];
|
||||||
setup_update = false
|
setup_update = false
|
||||||
|
|
@ -7222,6 +7233,6 @@ let setup_t =
|
||||||
|
|
||||||
let setup () = BaseSetup.setup setup_t;;
|
let setup () = BaseSetup.setup setup_t;;
|
||||||
|
|
||||||
# 7226 "setup.ml"
|
# 7237 "setup.ml"
|
||||||
(* OASIS_STOP *)
|
(* OASIS_STOP *)
|
||||||
let () = setup ();;
|
let () = setup ();;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue