From: Andrej Bauer <Andrej.Bauer@fmf.uni-lj.si>
To: caml-list caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] How to tell ocamlbuild to pass options to ocamldoc?
Date: Mon, 03 Mar 2008 22:59:39 +0100 [thread overview]
Message-ID: <47CC74CB.6040006@fmf.uni-lj.si> (raw)
In-Reply-To: <1204547029-sup-3853@ausone.inria.fr>
>> open Ocamlbuild_plugin;;
>>
>> dispatch begin function
>> | After_rules ->
>> flag ["ocaml"; "doc"] "-keep-code"
>> end
This gives me an error.
> 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).
Thank you again.
Andrej
next prev parent reply other threads:[~2008-03-03 21:57 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 [this message]
2008-03-04 9:00 ` Nicolas Pouillard
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=47CC74CB.6040006@fmf.uni-lj.si \
--to=andrej.bauer@fmf.uni-lj.si \
--cc=Andrej.Bauer@andrej.com \
--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