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,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_WHOIS autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 80178BBC1 for ; Thu, 6 Mar 2008 16:31:55 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALedz0fOvjGtoWdsb2JhbACQeAEBAQEBAQUEBgkIARebCg X-IronPort-AV: E=Sophos;i="4.25,456,1199660400"; d="scan'208";a="9959531" Received: from web54603.mail.re2.yahoo.com ([206.190.49.173]) by mail3-smtp-sop.national.inria.fr with SMTP; 06 Mar 2008 16:31:54 +0100 Received: (qmail 25810 invoked by uid 60001); 6 Mar 2008 15:31:53 -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=xe6k4pFSVEISymPGOpyuKQYv43MsfZV5yRj4kRUExUYTYfjODLJQTDJfc1Ut421tCo7dWJEAwVjFVqLqK9McmAK4YNrVfqti7QimYm1NJv4DpqkI5ftIhWRPw3hVHqML7xl2OJkpF1xGkJUHJCrj8KaMfOkl/F+/UlBbouKVrlQ=; X-YMail-OSG: tyeP6TcVM1mEcjGKZ40I8ZBn2JPEa2WZGMeCv8QX29QiYjG5AIpfahIy9gqUyP.7EjHezWxCp0snr4tGPFBwDwYTYIbkRFqY6.6k.c_UWLdSCdG93lz_e0yYnDkJjdn5WGI7tMHMzE95KbOz8FYz8zMTDg-- Received: from [85.244.9.139] by web54603.mail.re2.yahoo.com via HTTP; Thu, 06 Mar 2008 15:31:53 GMT Date: Thu, 6 Mar 2008 15:31:53 +0000 (GMT) From: Dario Teixeira Subject: Re: [Caml-list] Ocamlbuild with findlib + camlp4 To: Romain Bardou Cc: caml-list@yquem.inria.fr In-Reply-To: <47CEB768.10508@lri.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <318509.18876.qm@web54603.mail.re2.yahoo.com> X-Spam: no; 0.00; findlib:01 camlp:01 camlp:01 -package:01 findlib:01 syntax:01 preprocessed:01 syntax:01 ideally:01 caml-list:01 define:02 tagged:02 let:03 depends:04 guess:04 Hi, And thanks for the reply. > Moreover, these lines mean that packages str and so on will only be used > when your files are tagged with use_pgsql. Is it really what you want? Yes. > I have no experience of ocamlbuild with camlp4 extensions but I guess in > your case I would list all packages correctly in the "let packages = > ..." definition (unless you don't want to add the -package option for > every file?), tag my files which use the camlp4 extension with > "use_pgsql", and add a flag such as: I've been mucking around with the myocamlbuild.ml plugin but still haven't managed to achieve what I want. And judging from a previous message by Nicolas Pouillard, it may be altogether impossible with the current version of Ocamlbuild. Anyway, ideally one should be able to specify in the _tags file the findlib packages that each ml file depends upon. Suppose that by default you wanted your ml files to use the "extlib,lwt,ocsigen,pgocaml" packages, but you also had a "database.ml" file that used the PG'OCaml syntax extension, and therefore should be preprocessed using the instructions in the "pgocaml.statements" package. I could define a _tags file as something like this: true: pkg(extlib,lwt,ocsigen,pgocaml) : camlp4, pkg(pgocaml.statements) Any thoughts on how this could be achieved? (I'm not even sure if Ocamlbuild's tags can be parameterised). This would go a long way towards simplifying the use of syntax extensions that we've been discussing in the OSR thread. Thanks in advance, Dario Teixeira __________________________________________________________ Sent from Yahoo! Mail. The World's Favourite Email http://uk.docs.yahoo.com/nowyoucan.html