diff options
author | Maxence Guesdon <maxence.guesdon@inria.fr> | 2009-03-11 07:04:39 +0000 |
---|---|---|
committer | Maxence Guesdon <maxence.guesdon@inria.fr> | 2009-03-11 07:04:39 +0000 |
commit | e93f6dd12bd3dae4c4eb6525563ae967ce48fbce (patch) | |
tree | 4538cb98bb99da63f9f372ba94528c943c2da8d1 /ocamldoc/odoc.ml | |
parent | 89154947c2bcbfabfb31fc75c2cf47b273dcd449 (diff) | |
download | ocaml-e93f6dd12bd3dae4c4eb6525563ae967ce48fbce.tar.gz |
option -g also for native code version (loading custom generators)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc.ml')
-rw-r--r-- | ocamldoc/odoc.ml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ocamldoc/odoc.ml b/ocamldoc/odoc.ml index e66ce37543..1709694ee7 100644 --- a/ocamldoc/odoc.ml +++ b/ocamldoc/odoc.ml @@ -25,17 +25,18 @@ let print_DEBUG s = print_string s ; print_newline () (* we check if we must load a module given on the command line *) let arg_list = Array.to_list Sys.argv -let (cmo_or_cma_opt, paths) = +let (cm_opt, paths) = let rec iter (f_opt, inc) = function [] | _ :: [] -> (f_opt, inc) | "-g" :: file :: q when ((Filename.check_suffix file "cmo") or - (Filename.check_suffix file "cma")) & + (Filename.check_suffix file "cma") or + (Filename.check_suffix file "cmxs")) & (f_opt = None) -> - iter (Some file, inc) q - | "-i" :: dir :: q -> - iter (f_opt, inc @ [dir]) q - | _ :: q -> + iter (Some file, inc) q + | "-i" :: dir :: q -> + iter (f_opt, inc @ [dir]) q + | _ :: q -> iter (f_opt, inc) q in iter (None, []) arg_list @@ -63,12 +64,11 @@ let get_real_filename name = ) let _ = - match cmo_or_cma_opt with + match cm_opt with None -> () | Some file -> - (* initializations for dynamic loading *) - Dynlink.init (); + let file = Dynlink.adapt_filename file in Dynlink.allow_unsafe_modules true; try let real_file = get_real_filename file in |