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.0 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 93D73BBC1 for ; Sun, 2 Mar 2008 11:26:56 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAIYPykdC+Vyvi2dsb2JhbACQcAEBAQgEBAkKEQWRE4db X-IronPort-AV: E=Sophos;i="4.25,434,1199660400"; d="scan'208";a="23258127" Received: from ug-out-1314.google.com ([66.249.92.175]) by mail4-smtp-sop.national.inria.fr with ESMTP; 02 Mar 2008 11:26:56 +0100 Received: by ug-out-1314.google.com with SMTP id k40so1365008ugc.18 for ; Sun, 02 Mar 2008 02:26:55 -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:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=71oW85O/s1jd+yigaonVgX0AUN6ABfGjKHGSIwZ33Vk=; b=t7tYQyIy2not71UOxTJNgFBuYTQePwrI1rDXjdXsJrSLzVk8q1x5vOT6sNcaVlTKm3mmSmg3qgfM47WPX9zOoGDxRDXpwH3T2zmyZoxlcUpr9LIKQDV4KfTkQ28MfRBvCHx817U4pLcORKmw+o9hepnA0n2G9Jgezonv63mAup8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uPDFaZgTJ35ktiuzcjAmYVoROfst3exw9X5cjtpRbxscex4ovFT3YFd9mM++asmbtDDyXE+qUfhV6Hrvw7jcj2Ikk8uZ4UYf2lPu+01obc5P1hA6STpM7AXLx0HJYLRodH+1xa3lZdmjHXodhYA7Mru3/ZfSCQHyUJR3K1ylvyQ= Received: by 10.78.170.6 with SMTP id s6mr14475030hue.58.1204453615170; Sun, 02 Mar 2008 02:26:55 -0800 (PST) Received: by 10.78.42.16 with HTTP; Sun, 2 Mar 2008 02:26:55 -0800 (PST) Message-ID: <4b5157c30803020226i2f84248eh5535985c753f58a@mail.gmail.com> Date: Sun, 2 Mar 2008 11:26:55 +0100 From: "Paolo Donadeo" To: "caml-list caml-list" Subject: Re: [Caml-list] How to tell ocamlbuild to pass options to ocamldoc? In-Reply-To: <47C9A4BA.7040504@fmf.uni-lj.si> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47C9A4BA.7040504@fmf.uni-lj.si> X-Spam: no; 0.00; ocamldoc:01 -keep-code:01 ocamldoc:01 ocamlfind:01 netcgi:01 netcgi:01 netstring:01 pxp-engine:01 ocamlfind:01 -package:01 ocaml:01 -linkpkg:01 -package:01 ocamlc:01 ocamlc:01 > Perhaps I am just blind, but I was unable to figure out after poking > around for a while, how to tell ocamlbuild that it should pass the > -keep-code flag to ocamldoc. I suspect I need to put something in _tags, > but what? (I am an ocamlbuild newbie.) I don't know if this is the best way, but I use the myocamlbuild module to pass arguments to ocamlfind and ocamldoc, it just works. An example: =============== myocamlbuild.ml =============== open Ocamlbuild_plugin;; open Command;; let (|>) x f = f x let packages = [ "cryptokit"; "extlib"; "netcgi2"; "netcgi2-plex"; "nethttpd"; "netplex"; "netstring"; "oUnit"; "pxp-engine"; "pxp-lex-iso88591"; "str"; "unix" ] |> String.concat ",";; let ocamlfind cmd = S[A"ocamlfind"; A cmd; A"-package"; A packages];; flag ["ocaml"; "link"] (A"-linkpkg");; let ocamldoc = S[A"ocamlfind"; A"ocamldoc"; A"-package"; A packages; A"-stars"; A"-colorize-code"; A"-intro"; A"../documentation/doc_index.txt"; A"-css-style"; A"../documentation/style.css"; A"-t"; A"The Ex-nunc System"; ];; dispatch begin function | After_options -> Options.ocamldoc := ocamldoc; Options.ocamlc := ocamlfind "ocamlc"; Options.ocamlopt := ocamlfind "ocamlopt"; | _ -> () end =========== END OF myocamlbuild.ml ============ -- Paolo Donadeo Studio Associato 4Sigma Website: http://www.4sigma.it Email: p.donadeo@4sigma.it ~ ~ :wq