[ocaml-extlib] r439 committed - fix ocamlfind invocation with ocaml/mingw

4 views
Skip to first unread message

codesite...@google.com

unread,
Dec 1, 2013, 9:40:44 AM12/1/13
to ocaml-extl...@googlegroups.com
Revision: 439
Author: ygrekheretix
Date: Sun Dec 1 14:40:15 2013 UTC
Log: fix ocamlfind invocation with ocaml/mingw

http://code.google.com/p/ocaml-extlib/source/detail?r=439

Modified:
/trunk/extlib/install.ml

=======================================
--- /trunk/extlib/install.ml Tue Nov 26 03:15:37 2013 UTC
+++ /trunk/extlib/install.ml Sun Dec 1 14:40:15 2013 UTC
@@ -49,6 +49,7 @@
"unzip";
]

+(* ocaml/mingw uses unix extensions but will have Sys.os_type = "Win32" :(
*)
let obj_ext , lib_ext , cp_cmd , path_type = match Sys.os_type with
| "Unix" | "Cygwin" | "MacOS" -> ".o" , ".a" , "cp", PathUnix
| "Win32" -> ".obj" , ".lib" , "copy", PathDos
@@ -220,19 +221,18 @@
Findlib ->
let files = Buffer.create 0 in
List.iter (fun m ->
- Buffer.add_string files (m ^ ".cmi");
- Buffer.add_char files ' ';
- Buffer.add_string files (m ^ ".mli");
- Buffer.add_char files ' ')
+ Buffer.add_string files (m ^ ".cmi ");
+ Buffer.add_string files (m ^ ".mli "))
modules;
Buffer.add_string files "extLib.cmi ";
if !autobyte then Buffer.add_string files "extLib.cma ";
if !autonative then begin
- Buffer.add_string files "extLib.cmxa ";
- Buffer.add_string files ("extLib" ^ lib_ext^ " ");
- end;
+ Buffer.add_string files "extLib.cmxa extLib.cmx ";
+ List.iter (fun m -> Buffer.add_string files (m ^ ".cmx ")) modules;
+ end;
+ let optional = if !autonative then "-optional extLib.lib extLib.a"
else "" in
let files = Buffer.contents files in
- run (sprintf "ocamlfind install -patch-version %s extlib META %s"
version files);
+ run (sprintf "ocamlfind install -patch-version %s extlib META %s %s"
version files optional);
| Dir install_dir ->
List.iter (fun m ->
copy (m ^ ".cmi") install_dir;
Reply all
Reply to author
Forward
0 new messages