59
58
| `Debug -> s_ "D: "
61
60
prerr_endline (beg^str)
68
68
ignore_plugins = false;
69
69
ignore_unknown_fields = false;
74
{!default with quiet = true}
82
Arg.Unit (fun () -> default := {!default with verbose = false}),
79
Arg.Unit (fun () -> default := {!default with quiet = true}),
83
80
(s_ " Run quietly");
83
Arg.Unit (fun () -> default := {!default with info = true}),
84
(s_ " Display information message");
86
88
Arg.Unit (fun () -> default := {!default with debug = true}),
87
89
(s_ " Output debug message")]
92
module OASISString = struct
93
(* # 1 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/oasis/OASISString.ml" *)
97
(** Various string utilities.
99
Mostly inspired by extlib and batteries ExtString and BatString libraries.
101
@author Sylvain Le Gall
108
let buf = Buffer.create 13 in
111
lst := Buffer.contents buf :: !lst;
114
let str_len = String.length str in
115
for i = 0 to str_len - 1 do
119
Buffer.add_char buf str.[i]
124
(** [nsplit c s] Split the string [s] at char [c]. It doesn't include the
130
let find ~what ?(offset=0) str =
131
let what_idx = ref 0 in
132
let str_idx = ref offset in
133
while !str_idx < String.length str &&
134
!what_idx < String.length what do
135
if str.[!str_idx] = what.[!what_idx] then
141
if !what_idx <> String.length what then
146
let sub_start str len =
147
let str_len = String.length str in
148
if len >= str_len then
151
String.sub str len (str_len - len)
153
let sub_end ?(offset=0) str len =
154
let str_len = String.length str in
155
if len >= str_len then
158
String.sub str 0 (str_len - len)
160
let starts_with ~what ?(offset=0) str =
161
let what_idx = ref 0 in
162
let str_idx = ref offset in
165
!str_idx < String.length str &&
166
!what_idx < String.length what do
167
if str.[!str_idx] = what.[!what_idx] then
173
if !what_idx = String.length what then
178
let strip_starts_with ~what str =
179
if starts_with ~what str then
180
sub_start str (String.length what)
184
let ends_with ~what ?(offset=0) str =
185
let what_idx = ref ((String.length what) - 1) in
186
let str_idx = ref ((String.length str) - 1) in
189
offset <= !str_idx &&
191
if str.[!str_idx] = what.[!what_idx] then
197
if !what_idx = -1 then
202
let strip_ends_with ~what str =
203
if ends_with ~what str then
204
sub_end str (String.length what)
208
let replace_chars f s =
209
let buf = String.make (String.length s) 'X' in
210
for i = 0 to String.length s - 1 do
90
217
module OASISUtils = struct
91
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/oasis/OASISUtils.ml"
218
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/oasis/OASISUtils.ml" *)
95
222
module MapString = Map.Make(String)
97
224
let map_string_of_assoc assoc =
99
226
(fun acc (k, v) -> MapString.add k v acc)
103
230
module SetString = Set.Make(String)
105
232
let set_string_add_list st lst =
107
234
(fun acc e -> SetString.add e acc)
111
238
let set_string_of_list =
112
239
set_string_add_list
116
243
let compare_csl s1 s2 =
117
244
String.compare (String.lowercase s1) (String.lowercase s2)
119
246
module HashStringCsl =
124
251
let equal s1 s2 =
125
252
(String.lowercase s1) = (String.lowercase s2)
128
255
Hashtbl.hash (String.lowercase s)
135
let rec split_aux acc pos =
136
if pos < str_len then
140
String.index_from str pos sep
145
String.sub str pos (pos_sep - pos)
150
if pos_sep >= str_len then
152
(* Nothing more in the string *)
155
else if pos_sep = (str_len - 1) then
157
(* String end with a separator *)
162
split_aux acc (pos_sep + 1)
173
258
let varname_of_string ?(hyphen='_') s =
174
259
if String.length s = 0 then
1424
1595
(OASISUnixPath.concat bs.bs_path))
1426
1597
(headers @ cmxs)
1430
| Container of findlib_name * (group_t list)
1431
| Package of (findlib_name *
1437
let group_libs pkg =
1438
(** Associate a name with its children *)
1599
type data = common_section * build_section * library
1601
| Node of (data option) * (tree MapString.t)
1604
let findlib_mapping pkg =
1605
(* Map from library name to either full findlib name or parts + parent. *)
1606
let fndlb_parts_of_lib_name =
1607
let fndlb_parts cs lib =
1609
match lib.lib_findlib_name with
1611
| None -> cs.cs_name
1614
String.concat "." (lib.lib_findlib_containers @ [name])
1621
| Library (cs, _, lib) ->
1623
let lib_name = cs.cs_name in
1624
let fndlb_parts = fndlb_parts cs lib in
1625
if MapString.mem lib_name mp then
1627
(f_ "The library name '%s' is used more than once.")
1629
match lib.lib_findlib_parent with
1630
| Some lib_name_parent ->
1633
(`Unsolved (lib_name_parent, fndlb_parts))
1638
(`Solved fndlb_parts)
1642
| Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ ->
1648
(* Solve the above graph to be only library name to full findlib name. *)
1649
let fndlb_name_of_lib_name =
1650
let rec solve visited mp lib_name lib_name_child =
1651
if SetString.mem lib_name visited then
1653
(f_ "Library '%s' is involved in a cycle \
1654
with regard to findlib naming.")
1656
let visited = SetString.add lib_name visited in
1658
match MapString.find lib_name mp with
1659
| `Solved fndlb_nm ->
1661
| `Unsolved (lib_nm_parent, post_fndlb_nm) ->
1662
let pre_fndlb_nm, mp =
1663
solve visited mp lib_nm_parent lib_name
1665
let fndlb_nm = pre_fndlb_nm^"."^post_fndlb_nm in
1666
fndlb_nm, MapString.add lib_name (`Solved fndlb_nm) mp
1669
(f_ "Library '%s', which is defined as the findlib parent of \
1670
library '%s', doesn't exist.")
1671
lib_name lib_name_child
1675
(fun lib_name status mp ->
1678
(* Solved initialy, no need to go further *)
1681
let _, mp = solve SetString.empty mp lib_name "<none>" in
1683
fndlb_parts_of_lib_name
1684
fndlb_parts_of_lib_name
1688
| `Solved fndlb_nm -> fndlb_nm
1689
| `Unsolved _ -> assert false)
1693
(* Convert an internal library name to a findlib name. *)
1694
let findlib_name_of_library_name lib_nm =
1696
MapString.find lib_nm fndlb_name_of_lib_name
1698
raise (InternalLibraryNotFound lib_nm)
1701
(* Add a library to the tree.
1704
let fndlb_fullname =
1705
let cs, _, _ = sct in
1706
let lib_name = cs.cs_name in
1707
findlib_name_of_library_name lib_name
1709
let rec add_children nm_lst (children : tree MapString.t) =
1715
add_node tl (MapString.find hd children)
1720
MapString.add hd node children
1723
(* Should not have a nameless library. *)
1725
and add_node tl node =
1729
| Node (None, children) ->
1730
Node (Some sct, children)
1731
| Leaf (cs', _, _) | Node (Some (cs', _, _), _) ->
1732
(* TODO: allow to merge Package, i.e.
1733
* archive(byte) = "foo.cma foo_init.cmo"
1735
let cs, _, _ = sct in
1737
(f_ "Library '%s' and '%s' have the same findlib name '%s'")
1738
cs.cs_name cs'.cs_name fndlb_fullname
1744
Node (Some data, add_children tl MapString.empty)
1745
| Node (data_opt, children) ->
1746
Node (data_opt, add_children tl children)
1753
Node (None, MapString.add hd (new_node tl) MapString.empty)
1755
add_children (OASISString.nsplit fndlb_fullname '.') mp
1758
let rec group_of_tree mp =
1763
| Node (Some (cs, bs, lib), children) ->
1764
Package (nm, cs, bs, lib, group_of_tree children)
1765
| Node (None, children) ->
1766
Container (nm, group_of_tree children)
1767
| Leaf (cs, bs, lib) ->
1768
Package (nm, cs, bs, lib, [])
1443
1778
| Library (cs, bs, lib) ->
1445
match lib.lib_findlib_parent with
1450
MapString.find p_nm mp
1454
MapString.add p_nm ((cs, bs, lib) :: children) mp
1779
add (cs, bs, lib) mp
1461
1782
MapString.empty
1465
(* Compute findlib name of a single node *)
1466
let findlib_name (cs, _, lib) =
1467
match lib.lib_findlib_name with
1469
| None -> cs.cs_name
1472
(** Build a package tree *)
1473
let rec tree_of_library containers ((cs, bs, lib) as acc) =
1474
match containers with
1476
Container (hd, [tree_of_library tl acc])
1479
(findlib_name acc, cs, bs, lib,
1482
(fun ((_, _, child_lib) as child_acc) ->
1484
child_lib.lib_findlib_containers
1486
(MapString.find cs.cs_name children)
1491
(** Merge containers with the same name *)
1492
let rec merge_containers groups =
1493
(* Collect packages and create the map "container name -> merged children" *)
1494
let packages, containers =
1496
(fun (packages, containers) group ->
1498
| Container(name, children) ->
1501
MapString.find name containers
1506
MapString.add name (children' @ children) containers)
1507
| Package(name, cs, bs, lib, children) ->
1508
(Package(name, cs, bs, lib, merge_containers children) :: packages,
1510
([], MapString.empty)
1513
(* Recreate the list of groups *)
1516
(fun name children acc ->
1517
Container(name, merge_containers children) :: acc)
1521
(* TODO: check that libraries are unique *)
1526
| Library (cs, bs, lib) when lib.lib_findlib_parent = None ->
1527
(tree_of_library lib.lib_findlib_containers (cs, bs, lib)) :: acc
1533
(** Compute internal to findlib library matchings, including subpackage
1534
and return a map of it.
1536
let findlib_name_map pkg =
1538
(* Compute names in a tree *)
1539
let rec findlib_names_aux path mp grp =
1540
let fndlb_nm, children, mp =
1542
| Container (fndlb_nm, children) ->
1543
fndlb_nm, children, mp
1545
| Package (fndlb_nm, {cs_name = nm}, _, _, children) ->
1546
fndlb_nm, children, (MapString.add nm (path, fndlb_nm) mp)
1550
| Some pth -> pth^"."
1555
(findlib_names_aux (Some fndlb_nm_full))
1561
(findlib_names_aux None)
1566
let findlib_of_name ?(recurse=false) map nm =
1568
let (path, fndlb_nm) =
1569
MapString.find nm map
1572
| Some pth when recurse -> pth^"."^fndlb_nm
1577
(f_ "Unable to translate internal library '%s' to findlib name")
1580
let name_findlib_map pkg =
1582
findlib_name_map pkg
1592
MapString.add fndlb_nm_full nm acc)
1787
group_of_tree group_mp
1790
let library_name_of_findlib_name =
1793
(* Revert findlib_name_of_library_name. *)
1795
(fun k v mp -> MapString.add v k mp)
1796
fndlb_name_of_lib_name
1799
let library_name_of_findlib_name fndlb_nm =
1801
MapString.find fndlb_nm (Lazy.force library_name_of_findlib_name)
1803
raise (FindlibPackageNotFound fndlb_nm)
1807
findlib_name_of_library_name,
1808
library_name_of_findlib_name
1596
1810
let findlib_of_group =
1598
1812
| Container (fndlb_nm, _)
1599
1813
| Package (fndlb_nm, _, _, _, _) -> fndlb_nm
1601
1815
let root_of_group grp =
1602
1816
let rec root_lib_aux =
1817
(* We do a DFS in the group. *)
1604
1819
| Container (_, children) ->
1605
root_lib_lst children
1606
| Package (_, cs, bs, lib, children) ->
1607
if lib.lib_findlib_parent = None then
1610
root_lib_lst children
1828
| Package (_, cs, bs, lib, _) ->
1625
(f_ "Unable to determine root library of findlib library '%s'")
1626
(findlib_of_group grp)
1831
match root_lib_aux grp with
1836
(f_ "Unable to determine root library of findlib library '%s'")
1837
(findlib_of_group grp)
1631
1841
module OASISFlag = struct
1632
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/oasis/OASISFlag.ml"
1842
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/oasis/OASISFlag.ml" *)
1636
1846
module OASISPackage = struct
1637
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/oasis/OASISPackage.ml"
1847
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/oasis/OASISPackage.ml" *)
1641
1851
module OASISSourceRepository = struct
1642
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/oasis/OASISSourceRepository.ml"
1852
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/oasis/OASISSourceRepository.ml" *)
1646
1856
module OASISTest = struct
1647
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/oasis/OASISTest.ml"
1857
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/oasis/OASISTest.ml" *)
1651
1861
module OASISDocument = struct
1652
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/oasis/OASISDocument.ml"
1862
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/oasis/OASISDocument.ml" *)
1866
module OASISExec = struct
1867
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/oasis/OASISExec.ml" *)
1873
(* TODO: I don't like this quote, it is there because $(rm) foo expands to
1876
let run ~ctxt ?f_exit_code ?(quote=true) cmd args =
1879
if Sys.os_type = "Win32" then
1880
if String.contains cmd ' ' then
1881
(* Double the 1st double quote... win32... sigh *)
1882
"\""^(Filename.quote cmd)
1891
String.concat " " (cmd :: args)
1893
info ~ctxt (f_ "Running command '%s'") cmdline;
1894
match f_exit_code, Sys.command cmdline with
1898
(f_ "Command '%s' terminated with error code %d")
1903
let run_read_output ~ctxt ?f_exit_code cmd args =
1905
Filename.temp_file "oasis-" ".txt"
1910
run ~ctxt ?f_exit_code cmd (args @ [">"; Filename.quote fn])
1921
routput := (input_line chn) :: !routput
1931
(try Sys.remove fn with _ -> ());
1934
let run_read_one_line ~ctxt ?f_exit_code cmd args =
1935
match run_read_output ~ctxt ?f_exit_code cmd args with
1940
(f_ "Command return unexpected output %S")
1941
(String.concat "\n" lst)
1944
module OASISFileUtil = struct
1945
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/oasis/OASISFileUtil.ml" *)
1949
let file_exists_case fn =
1950
let dirname = Filename.dirname fn in
1951
let basename = Filename.basename fn in
1952
if Sys.file_exists dirname then
1953
if basename = Filename.current_dir_name then
1958
(Array.to_list (Sys.readdir dirname))
1962
let find_file ?(case_sensitive=true) paths exts =
1964
(* Cardinal product of two list *)
1965
let ( * ) lst1 lst2 =
1975
let rec combined_paths lst =
1980
(fun (a,b) -> Filename.concat a b)
1983
combined_paths (acc :: tl)
1993
if String.length e > 0 && e.[0] <> '.' then
1997
((combined_paths paths) * exts)
2000
(if case_sensitive then
2006
let which ~ctxt prg =
2008
match Sys.os_type with
2014
let path_lst = OASISString.nsplit (Sys.getenv "PATH") path_sep in
2016
match Sys.os_type with
2018
"" :: (OASISString.nsplit (Sys.getenv "PATHEXT") path_sep)
2022
find_file ~case_sensitive:false [path_lst; [prg]] exec_ext
2025
let rec fix_dir dn =
2026
(* Windows hack because Sys.file_exists "src\\" = false when
2027
* Sys.file_exists "src" = true
2032
if Sys.os_type = "Win32" && ln > 0 && dn.[ln - 1] = '\\' then
2033
fix_dir (String.sub dn 0 (ln - 1))
2037
let q = Filename.quote
2040
let cp ~ctxt ?(recurse=false) src tgt =
2042
match Sys.os_type with
2045
"xcopy" [q src; q tgt; "/E"]
2048
"cp" ["-r"; q src; q tgt]
2051
(match Sys.os_type with
2056
let mkdir ~ctxt tgt =
2058
(match Sys.os_type with
2063
let rec mkdir_parent ~ctxt f tgt =
2067
if Sys.file_exists tgt then
2069
if not (Sys.is_directory tgt) then
2070
OASISUtils.failwithf
2071
(f_ "Cannot create directory '%s', a file of the same name already \
2077
mkdir_parent ~ctxt f (Filename.dirname tgt);
2078
if not (Sys.file_exists tgt) then
2085
let rmdir ~ctxt tgt =
2086
if Sys.readdir tgt = [||] then
2088
match Sys.os_type with
2090
OASISExec.run ~ctxt "rd" [q tgt]
2092
OASISExec.run ~ctxt "rm" ["-r"; q tgt]
2097
Filename.basename fn
2099
if String.length basename >= 2 &&
2100
basename.[0] = '*' &&
2101
basename.[1] = '.' then
2104
(String.length basename) - 2
2107
String.sub basename 2 ext_len
2118
((String.length fn) - ext_len)
2121
if fn_ext = ext then
2122
(Filename.concat dirname fn) :: acc
2125
with Invalid_argument _ ->
2128
(Sys.readdir dirname)
2132
if file_exists_case fn then
1657
2141
module BaseEnvLight = struct
1658
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/base/BaseEnvLight.ml"
2142
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/base/BaseEnvLight.ml" *)
1660
2144
module MapString = Map.Make(String)
1662
2146
type t = string MapString.t
1664
2148
let default_filename =
1665
2149
Filename.concat
1666
2150
(Sys.getcwd ())
1669
2153
let load ?(allow_empty=false) ?(filename=default_filename) () =
1670
2154
if Sys.file_exists filename then
2276
module BaseExec = struct
2277
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/base/BaseExec.ml"
2283
let run ?f_exit_code cmd args =
2285
String.concat " " (cmd :: args)
2287
info (f_ "Running command '%s'") cmdline;
2288
match f_exit_code, Sys.command cmdline with
2292
(f_ "Command '%s' terminated with error code %d")
2297
let run_read_output ?f_exit_code cmd args =
2299
Filename.temp_file "oasis-" ".txt"
2303
run ?f_exit_code cmd (args @ [">"; Filename.quote fn])
2317
routput := (input_line chn) :: !routput
2326
let run_read_one_line ?f_exit_code cmd args =
2327
match run_read_output ?f_exit_code cmd args with
2332
(f_ "Command return unexpected output %S")
2333
(String.concat "\n" lst)
2336
module BaseFileUtil = struct
2337
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/base/BaseFileUtil.ml"
2341
let find_file paths exts =
2343
(* Cardinal product of two list *)
2344
let ( * ) lst1 lst2 =
2354
let rec combined_paths lst =
2359
(fun (a,b) -> Filename.concat a b)
2362
combined_paths (acc :: tl)
2372
if String.length e > 0 && e.[0] <> '.' then
2376
((combined_paths paths) * exts)
2384
match Sys.os_type with
2396
match Sys.os_type with
2402
(Sys.getenv "PATHEXT"))
2406
find_file [path_lst; [prg]] exec_ext
2409
let rec fix_dir dn =
2410
(* Windows hack because Sys.file_exists "src\\" = false when
2411
* Sys.file_exists "src" = true
2416
if Sys.os_type = "Win32" && ln > 0 && dn.[ln - 1] = '\\' then
2417
fix_dir (String.sub dn 0 (ln - 1))
2421
let q = Filename.quote
2426
(match Sys.os_type with
2433
(match Sys.os_type with
2438
let rec mkdir_parent f tgt =
2442
if Sys.file_exists tgt then
2444
if not (Sys.is_directory tgt) then
2445
OASISUtils.failwithf
2446
(f_ "Cannot create directory '%s', a file of the same name already \
2452
mkdir_parent f (Filename.dirname tgt);
2453
if not (Sys.file_exists tgt) then
2461
if Sys.readdir tgt = [||] then
2463
match Sys.os_type with
2465
BaseExec.run "rd" [q tgt]
2467
BaseExec.run "rm" ["-r"; q tgt]
2472
Filename.basename fn
2474
if String.length basename >= 2 &&
2475
basename.[0] = '*' &&
2476
basename.[1] = '.' then
2479
(String.length basename) - 2
2482
String.sub basename 2 ext_len
2493
((String.length fn) - ext_len)
2496
if fn_ext = ext then
2497
(Filename.concat dirname fn) :: acc
2500
with Invalid_argument _ ->
2503
(Sys.readdir dirname)
2507
if Sys.file_exists fn then
2514
2729
module BaseArgExt = struct
2515
# 21 "/Users/mmottl/Downloads/oasis-0.3.0~rc2/src/base/BaseArgExt.ml"
2730
(* # 21 "/home/ysulsky/local/opam-full/4.00.1/build/oasis.0.3.0/src/base/BaseArgExt.ml" *)
2517
2732
open OASISUtils
2518
2733
open OASISGettext
2520
2735
let parse argv args =
2521
2736
(* Simulate command line for Arg *)
2528
2743
~current:current
3871
4195
BaseLog.default_filename
3873
(List.rev_map BaseFileAB.to_filename t.package.files_ab));
3875
(* Call distclean code *)
3878
t.package.distclean_custom
4197
(List.rev_map BaseFileAB.to_filename t.package.files_ab))
3885
4200
clean, distclean
3887
4202
let version t _ =
3888
print_endline t.version
4203
print_endline t.oasis_version
4205
let update_setup_ml, no_update_setup_ml_cli =
4208
("-no-update-setup-ml",
4210
s_ " Don't try to update setup.ml, even if _oasis has changed.")
4212
let update_setup_ml t =
4214
match t.oasis_fn with
4219
match t.oasis_exec with
4226
let setup_ml, args =
4227
match Array.to_list Sys.argv with
4228
| setup_ml :: args ->
4232
(s_ "Expecting non-empty command line arguments.")
4234
let ocaml, setup_ml =
4235
if Sys.executable_name = Sys.argv.(0) then
4236
(* We are not running in standard mode, probably the script
4243
let no_update_setup_ml_cli, _, _ = no_update_setup_ml_cli in
4245
let oasis_exec_version =
4246
OASISExec.run_read_one_line
4247
~ctxt:!BaseContext.default
4254
(f_ "Executable '%s' is probably an old version \
4255
of oasis (< 0.3.0), please update to version \
4257
oasis_exec t.oasis_version
4260
(f_ "Cannot find executable '%s', please install \
4262
oasis_exec t.oasis_version
4265
(f_ "Command '%s version' exited with code %d.")
4267
oasis_exec ["version"]
4269
if OASISVersion.comparator_apply
4270
(OASISVersion.version_of_string oasis_exec_version)
4271
(OASISVersion.VGreaterEqual
4272
(OASISVersion.version_of_string t.oasis_version)) then
4274
(* We have a version >= for the executable oasis, proceed with
4277
(* TODO: delegate this check to 'oasis setup'. *)
4278
if Sys.os_type = "Win32" then
4280
(f_ "It is not possible to update the running script \
4281
setup.ml on Windows. Please update setup.ml by \
4283
(String.concat " " (oasis_exec :: "setup" :: t.oasis_setup_args))
4287
~ctxt:!BaseContext.default
4294
(f_ "Unable to update setup.ml using '%s', \
4295
please fix the problem and retry.")
4297
oasis_exec ("setup" :: t.oasis_setup_args);
4298
OASISExec.run ~ctxt:!BaseContext.default ocaml (setup_ml :: args)
4303
(f_ "The version of '%s' (v%s) doesn't match the version of \
4304
oasis used to generate the %s file. Please install at \
4306
oasis_exec oasis_exec_version setup_ml t.oasis_version
4309
if !update_setup_ml then
4312
match t.oasis_digest with
4314
if Sys.file_exists oasis_fn && dgst <> Digest.file "_oasis" then
4325
(f_ "Error when updating setup.ml. If you want to avoid this error, \
4326
you can bypass the update of %s by running '%s %s %s %s'")
4327
setup_ml ocaml setup_ml no_update_setup_ml_cli
4328
(String.concat " " args);
3891
4335
let catch_exn =