From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 79ABABB84 for ; Tue, 23 Dec 2008 16:18:39 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.36,271,1228086000"; d="scan'208";a="20748789" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 23 Dec 2008 16:18:39 +0100 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id mBNFIcqf019189 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 23 Dec 2008 16:18:38 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnkCALuPUElKfSwekGdsb2JhbACCPzCQQj4BAQEBCQkMBxEDq1FYg1OBBIxpAQMBA4ZA X-IronPort-AV: E=Sophos;i="4.36,271,1228086000"; d="scan'208";a="18836752" Received: from yx-out-2324.google.com ([74.125.44.30]) by mail2-smtp-roc.national.inria.fr with ESMTP; 23 Dec 2008 16:18:37 +0100 Received: by yx-out-2324.google.com with SMTP id 8so802632yxg.27 for ; Tue, 23 Dec 2008 07:18:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=Qsb9bUyTfys4KY/UGEsZZkY9GGMDfmpDQpVSLLNoeAk=; b=qqmTM87qdkEKjdpbHbIftWBWTkMx83K0nKIHNVJUe7x+Vfn+sQog3cznUtZ6wtAj6A tp3L8h0vVkYe5Dug6cKqIaYOufKiY9jVEKLSyOboTfN40B9oZuYi1QCrnOrTXEQbLwjC /oSw3pQv26VVhj+8UsHEVpwR7Y4xJ+0fijgew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=IkKIDndufZSQYdsfm5dhdV9+ho2UzZSh+QyTLxFWv78pKuOStm2NoThltQf3K9cAKv ERSZgsGZ51HR7sfYWEk8JbeNO2X4WuN6BEGaj+qLVjYNGSNuY+3KiqsXSFSlD5iR3P3g sqTXq0TeExast7y4N1hQKkX5hV7MdfoJPLzrU= Received: by 10.143.11.11 with SMTP id o11mr3195844wfi.193.1230045516111; Tue, 23 Dec 2008 07:18:36 -0800 (PST) Received: by 10.143.93.7 with HTTP; Tue, 23 Dec 2008 07:18:36 -0800 (PST) Message-ID: Date: Tue, 23 Dec 2008 10:18:36 -0500 From: "Ashish Agarwal" To: "Nicolas Pouillard" Subject: Re: [Caml-list] ocamlbuild + ocamldoc + external library problems Cc: "Caml List" In-Reply-To: <1230028123-sup-9915@ausone.local> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_69250_15548020.1230045516106" References: <1230028123-sup-9915@ausone.local> X-Miltered: at concorde with ID 4951014E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocamldoc:01 compilation:01 ocaml:01 lib:01 extern:01 mylib:01 mylib:01 ocamldoc:01 cmi:01 ocamlfind:01 odoc:01 mli:01 ocamlfind:01 odoc:01 mli:01 ------=_Part_69250_15548020.1230045516106 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 > ------=_Part_69250_15548020.1230045516106 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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

------=_Part_69250_15548020.1230045516106--