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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 3434CBC6B for ; Wed, 7 Nov 2007 14:39:21 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAEpOMUfOvjGuh2dsb2JhbACOfAEBAQgEBgIPARc X-IronPort-AV: E=Sophos;i="4.21,384,1188770400"; d="scan'208";a="4150058" Received: from web54604.mail.re2.yahoo.com ([206.190.49.174]) by mail1-smtp-roc.national.inria.fr with SMTP; 07 Nov 2007 14:39:22 +0100 Received: (qmail 98851 invoked by uid 60001); 7 Nov 2007 13:39:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=w38IviL1yxQPQwhlKXyIH1+oXJmyRRy34SMzftUhZo3sNzHvOK4cflVt7FSQQASjIG8cXlzYzCYpa7RcIWo/1bpjdcUlX4poothhewpLQPlhZUXKue/ks63GpIVRX8+56rY/RJD75ns3Pwe/mwkKRzYJWC9EJtYJ/9fj42TV3Io=; X-YMail-OSG: A0gXYNgVM1nwZUICHGIIkkvpBvl6lQCRLY2dIy3A2f85_B7g.GeWHHHpp6.F360cQ28WO1Y59j6b5WWvhyDSjP.aK93V2DJ4VTdlFYfg6NUjD2EGVUJ6bOppY4ZdtESNApQGBQgWVdW6fux_9Bh2dOGhjA-- Received: from [85.244.12.94] by web54604.mail.re2.yahoo.com via HTTP; Wed, 07 Nov 2007 13:39:19 GMT Date: Wed, 7 Nov 2007 13:39:19 +0000 (GMT) From: Dario Teixeira Subject: Re: [Caml-list] Ocamlbuild plugins To: Nicolas Pouillard Cc: caml-list In-Reply-To: <1194376648-sup-4076@ausone.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <600766.97480.qm@web54604.mail.re2.yahoo.com> X-Spam: no; 0.00; camlp:01 ocamlfind:01 ocamlfind:01 -package:01 ocamlc:01 ocamlc:01 ocamlopt:01 ocamlopt:01 ocamldep:01 ocamldep:01 flags:01 -package:01 camlp:01 ocaml:01 flags:01 Hi, > (...) > Sadly you're right. As always any help/contribution will be appreciated :) Well, I'll do my part: once I grok Ocamlbuild I'll profusely document the myocamlbuild.ml for my project. Anyway, thanks again for your help. I have at the moment a myocamlbuild.ml that can handle almost everything I need; the only bit that isn't working is precisely the part that handles camlp4. So, here's the myocamlbuild.ml: ______________________________________________________________ open Ocamlbuild_plugin open Command let ocamlfind x = let packages = "calendar, ocsigen" in S[A "ocamlfind"; x; A "-package"; A packages];; dispatch begin function | Before_options -> Options.ocamlc := ocamlfind & A"ocamlc"; Options.ocamlopt := ocamlfind & A"ocamlopt"; Options.ocamldep := ocamlfind & A"ocamldep" | After_rules -> let some_flags = S[A"-package"; A"pgocaml.statements"; A"-syntax"; A"camlp4o"] in flag ["ocaml"; "compile"; "use_pgocaml_statements"] some_flags; flag ["ocaml"; "ocamldep"; "use_pgocaml_statements"] some_flags; flag ["ocaml"; "link"] (A"-linkpkg") | _ -> () end;; ______________________________________________________________ I also have a _tags file with just one line: "database.ml": use_pgocaml_statements, thread And this is the error I get when I run "ocamlbuild database.cmo": ______________________________________________________________ + ocamlfind ocamldep -package 'calendar, ocsigen' -package pgocaml.statements -syntax camlp4o -pp '-package pgocaml.statements -syntax camlp4o' -modules database.ml > database.ml.depends Warning: -pp overrides the effect of -syntax partly sh: Illegal option -p Preprocessing error on file database.ml Command exited with code 2. ______________________________________________________________ My guess is that some builtin rule is trying to invoke camlp4 with -pp, which is altogether unnecessary because ocamlfind takes care of that automatically with the -syntax option. Any thoughts? Thanks for your time, Dario _____________________________________________________ Do not compromise. Get unlimited storage and first rate spam protection with Yahoo! Mail. http://uk.mail.yahoo.com