Version française
Home     About     Download     Resources     Contact us    
Browse thread
Two questions on OCamlDoc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jan Kybic <kybic@f...>
Subject: Re: [Caml-list] Another question on OcamlDoc
>> Let me add another couple of questions about OcamlDoc. I am sorry if
>> this is a common knowledge.
>> 
>>    - how can I tell OcamlDoc to only process some files?
>>      Actually, the question is rather how to make OcamlDoc ignore the
>>      unresolved dependencies and "Unbound type constructor" errors.
>
> Does it stop ocamldoc or does is end in elements not linked in the final
> doc ?
> If it stops ocamldoc, then this is a compilation problem. Make sure you
> give the same options (-I, -rectypes, ...) to ocamldoc than to ocamlc.
> In th second case, you can use the -hide-warnings option.

I think I know what the problem was. I was compiling a program with
some of the source files in subdirectories, like

  ocalmfind ocamlc <some options> bootstrap/parallel.mli

Now when running ocamldoc like

  ocamlfind ocamldoc <some options> bootstrap/parallel.mli

it was capable of reading the source *.mli file but apparently it
also needs the *.cmi (or *.cmx ?) files which it could not find. So
the solution was to add the "include" option:

  ocamlfind ocamldoc <some options> -I bootstrap bootstrap/parallel.mli

So now everything is working well. Thank you for your help.

Jan 

P.S. I am using the source files from subdirectories as a means of
sharing a source code between projects. It works but it is kind of
fragile. Does anyone have a better method?



-- 
-------------------------------------------------------------------------
Jan Kybic <kybic@fel.cvut.cz>                       tel. +420 2 2435 5721
http://cmp.felk.cvut.cz/~kybic                      ICQ 200569450