caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlbuild + ocamldoc + external library problems
@ 2008-12-23  2:01 Ashish Agarwal
       [not found] ` <1230028123-sup-9915@ausone.local>
  0 siblings, 1 reply; 2+ messages in thread
From: Ashish Agarwal @ 2008-12-23  2:01 UTC (permalink / raw)
  To: Caml List

[-- Attachment #1: Type: text/plain, Size: 660 bytes --]

How can I get ocamlbuild to include paths to external libraries when
building documentation?
Ocamlbuild gives me errors when building documentation, when my interface
files contain references to an external library. I have set up my plugin and
_tags file to correctly compile the code, but cannot get the documentation
to work. The command that ocamlbuild executes is [1], which gives error
[2]. Module M is declared in an external library. I get no errors if I
manually type [3], where ~/mylibs contains the appropriate library.
[1] ocamlfind ocamldoc -dump a.odoc a.mli
[2] Unbound module M
[3] ocamlfind ocamldoc -dump a.odoc -I ~/mylibs/ a.mli

Thank you.

[-- Attachment #2: Type: text/html, Size: 868 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] ocamlbuild + ocamldoc + external library problems
       [not found] ` <1230028123-sup-9915@ausone.local>
@ 2008-12-23 15:18   ` Ashish Agarwal
  0 siblings, 0 replies; 2+ messages in thread
From: Ashish Agarwal @ 2008-12-23 15:18 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: Caml List

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

Thank you. That does it. However, it seems not analogous to code
compilation, for which what I did was add
      ocaml_lib ~extern:true ~dir:"~/mylibs" "mylib2";

to myocamlbuild.ml and then use the _tags file to specify which files
require mylib2. I wonder why the call to ocamldoc cannot use the same
dependency information generated to compile an interface file. The same
libraries are needed to compile an interface file to a cmi file or to
documentation.


On Tue, Dec 23, 2008 at 5:32 AM, Nicolas Pouillard <
nicolas.pouillard@gmail.com> wrote:

> Excerpts from Ashish Agarwal's message of Tue Dec 23 03:01:38 +0100 2008:
> > How can I get ocamlbuild to include paths to external libraries when
> > building documentation?
> > Ocamlbuild gives me errors when building documentation, when my interface
> > files contain references to an external library. I have set up my plugin
> and
> > _tags file to correctly compile the code, but cannot get the
> documentation
> > to work. The command that ocamlbuild executes is [1], which gives error
> > [2]. Module M is declared in an external library. I get no errors if I
> > manually type [3], where ~/mylibs contains the appropriate library.
> > [1] ocamlfind ocamldoc -dump a.odoc a.mli
> > [2] Unbound module M
> > [3] ocamlfind ocamldoc -dump a.odoc -I ~/mylibs/ a.mli
>
> You should give the same flags for building and generating the
> documentation,
> for instance if you have:
>
>   flag ["ocaml", "compile"] (S[A"-I"; A".../mylibs"])
>
> Then you need:
>
>   flag ["ocaml", "doc"] (S[A"-I"; A".../mylibs"])
>
> HTH,
>
> --
> Nicolas Pouillard aka Ertai
>

[-- Attachment #2: Type: text/html, Size: 2258 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-23 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-23  2:01 ocamlbuild + ocamldoc + external library problems Ashish Agarwal
     [not found] ` <1230028123-sup-9915@ausone.local>
2008-12-23 15:18   ` [Caml-list] " Ashish Agarwal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).