caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: andrej.bauer <andrej.bauer@fmf.uni-lj.si>
Cc: caml-list caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] How to tell ocamlbuild to pass options to ocamldoc?
Date: Tue, 04 Mar 2008 10:00:12 +0100	[thread overview]
Message-ID: <1204621210-sup-4430@ausone.inria.fr> (raw)
In-Reply-To: <47CC74CB.6040006@fmf.uni-lj.si>

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

Excerpts from andrej.bauer's message of Mon Mar 03 22:59:39 +0100 2008:
> >> open Ocamlbuild_plugin;;
> >>
> >> dispatch begin function
> >>    | After_rules ->
> >>        flag ["ocaml"; "doc"] "-keep-code"
> >> end
> 
> This gives me an error.

Yes, in fact it's:

 flag ["ocaml"; "doc"] (A"-keep-code")

> > You can also be less global by adding a new tag "keep_code":
> 
> In my case I am happy to be "global". I ended up with:
> 
> open Ocamlbuild_plugin ;;
> 
> dispatch begin function
>   | After_options ->
>       Options.ocamldoc :=
>         S[
>           A"ocamldoc";
>           A"-keep-code";
>           A"-colorize-code"
>         ]
>   | _ -> ()
> end
> 
> This feels "too global" though.
> 
> Maybe I should explain the background. I am composing a library of small
> examples from programming language theory. A typical example consists of
> about 300 lines of code (including ocamllex and ocamlyacc). I want it to be:
> 
> (1) as easy to compile as possible: I decided to use ocamlbuild but I
> also provide a Makefile which runs ocamlbuild and a README.txt
> explaining how to compile. The only drawback is that this requires a
> fairly new version of ocaml.
> 
> (2) I want to publish the code on the web in browsable format. I think I
> will do it two ways: as generated by ocamldoc (which is why I wanted
> "-keep-code"). and as raw code converted to HTML with caml2html (because
> ocamldoc doesn't do .mly and .mll).
> 
> Since I am already talking about ocamlbuild, I should point out that I
> used it for teaching last semester. The main challenge was coping with
> Windows environment which cannot handle symbolic links. (And we used
> OcaIDE, too. The "development environment" kind of worked, and was much
> much less hassle than xemacs+make).

Yes windows support needs more care. Glad to hear that you've make it worked.

Best regards,

-- 
Nicolas Pouillard aka Ertai

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

  reply	other threads:[~2008-03-04  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-01 18:47 Andrej Bauer
2008-03-02 10:26 ` [Caml-list] " Paolo Donadeo
2008-03-03  8:05   ` Romain Bardou
2008-03-03 12:23     ` Nicolas Pouillard
2008-03-03 21:59       ` Andrej Bauer
2008-03-04  9:00         ` Nicolas Pouillard [this message]
2008-03-04  9:59           ` Andrej Bauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1204621210-sup-4430@ausone.inria.fr \
    --to=nicolas.pouillard@gmail.com \
    --cc=andrej.bauer@fmf.uni-lj.si \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).