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=1.1 required=5.0 tests=AWL,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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 34140BC1A for ; Tue, 4 Mar 2008 10:01:23 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.25,443,1199660400"; d="asc'?scan'208";a="23336791" Received: from peray.inria.fr (HELO ausone.inria.fr) ([128.93.8.98]) by mail4-relais-sop.national.inria.fr with SMTP; 04 Mar 2008 10:01:22 +0100 Received: by ausone.inria.fr (sSMTP sendmail emulation); Tue, _d Mar 2008 10:00:12 +0100 From: "Nicolas Pouillard" Cc: caml-list caml-list Subject: Re: [Caml-list] How to tell ocamlbuild to pass options to ocamldoc? To: andrej.bauer References: <47C9A4BA.7040504@fmf.uni-lj.si> <4b5157c30803020226i2f84248eh5535985c753f58a@mail.gmail.com> <47CBB144.8020108@lri.fr> <1204547029-sup-3853@ausone.inria.fr> <47CC74CB.6040006@fmf.uni-lj.si> In-Reply-To: <47CC74CB.6040006@fmf.uni-lj.si> Date: Tue, 04 Mar 2008 10:00:12 +0100 Message-Id: <1204621210-sup-4430@ausone.inria.fr> User-Agent: Sup/git Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1204621212-943826-50585-2782-2-="; micalg="pgp-sha1" MIME-Version: 1.0 X-Spam: no; 0.00; ocamldoc:01 andrej:01 ocaml:01 -keep-code:01 ocaml:01 -keep-code:01 ocamldoc:01 ocamllex:01 ocamlyacc:01 makefile:01 mll:01 compile:01 compile:01 symbolic:01 caml-list:01 X-Attachments: cset="UTF-8" type="application/pgp-signature" name="signature.asc" name="signature.asc" --=-1204621212-943826-50585-2782-2-= Content-Type: text/plain; charset=UTF-8 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 --=-1204621212-943826-50585-2782-2-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkfND5wACgkQj+FCNw9dwLm6+wCgjwdKxByvMUjthdNPbvq1go6l 88cAnR/Kxwx3RPNj6L38uHLx7FkNhWSE =Vvn9 -----END PGP SIGNATURE----- --=-1204621212-943826-50585-2782-2-=--