5 let is_nl ch
= match ch
with | '
\n'
| '
\r'
-> true | _
-> false in
7 if n
= 0 then 0 else if is_nl s
.[n
-1] then cut (n
-1) else n
9 let ls = String.length s
in
11 if n = ls then s
else String.sub s
0 n
14 let cin = Unix.open_process_in
(Printf.sprintf
"ocamlfind -query %s" lib
) in
15 let s = chomp (input_line
cin) in
16 (* let s = Filename.quote s in*)
17 ignore
(Unix.close_process_in
cin);
22 dispatch
begin function
24 let extlib_dir = ocamlfind "extlib" in
25 let deriving_dir = Myocamlbuild_config.deriving_dir in
26 let ounit_dir = ocamlfind "oUnit" in
28 ocaml_lib ~extern
:true ~dir
:extlib_dir "extLib";
29 ocaml_lib ~extern
:true ~dir
:deriving_dir "deriving";
30 ocaml_lib ~extern
:true ~dir
:ounit_dir "oUnit";
32 flag
["ocaml"; "doc"; "use_extLib"] (S
[A
"-I"; A
extlib_dir]);