From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id DEA657ED34 for ; Tue, 17 Jul 2012 16:46:07 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of bardou@lsv.ens-cachan.fr) identity=pra; client-ip=188.165.41.191; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="bardou@lsv.ens-cachan.fr"; x-sender="bardou@lsv.ens-cachan.fr"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of bardou@lsv.ens-cachan.fr) identity=mailfrom; client-ip=188.165.41.191; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="bardou@lsv.ens-cachan.fr"; x-sender="bardou@lsv.ens-cachan.fr"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mo3.mail-out.ovh.net) identity=helo; client-ip=188.165.41.191; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="bardou@lsv.ens-cachan.fr"; x-sender="postmaster@mo3.mail-out.ovh.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkgBAFR5BVC8pSm/mWdsb2JhbABFtX+DbgEBAQEBCAsLBxQngiABAQU4QBELGAkWDwkDAgECAUUTCAKICQS9L4tAGoMRgxwDmzeDLolBgV0 X-IronPort-AV: E=Sophos;i="4.77,603,1336341600"; d="scan'208";a="150929698" Received: from 12.mo3.mail-out.ovh.net (HELO mo3.mail-out.ovh.net) ([188.165.41.191]) by mail4-smtp-sop.national.inria.fr with ESMTP; 17 Jul 2012 16:46:07 +0200 Received: from mail607.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo3.mail-out.ovh.net (Postfix) with SMTP id AE5AAFF957F for ; Tue, 17 Jul 2012 16:51:29 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 17 Jul 2012 16:46:24 +0200 Received: from unknown (HELO ?138.231.81.39?) (romain%bardou.fr@138.231.81.39) by ns0.ovh.net with SMTP; 17 Jul 2012 16:46:23 +0200 Message-ID: <50057AC0.7050903@lsv.ens-cachan.fr> Date: Tue, 17 Jul 2012 16:46:24 +0200 From: Romain Bardou User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4 MIME-Version: 1.0 To: caml-list@inria.fr X-Ovh-Mailout: 178.32.228.3 (mo3.mail-out.ovh.net) References: <1657861881.12110434.1342508437161.JavaMail.root@inria.fr> In-Reply-To: <1657861881.12110434.1342508437161.JavaMail.root@inria.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 8844788194649495328 X-Ovh-Remote: 138.231.81.39 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeegkedrjeekucetufdoteggodetrfdofgetucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfhrhhomheptfhomhgrihhnuceurghrughouhcuoegsrghrughouheslhhsvhdrvghnshdqtggrtghhrghnrdhfrheqnecujfgurhepkfffhfgfggfvufhfjggtgfesthejrgdttdefud X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeegkedrjeekucetufdoteggodetrfdofgetucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfhrhhomheptfhomhgrihhnuceurghrughouhcuoegsrghrughouheslhhsvhdrvghnshdqtggrtghhrghnrdhfrheqnecujfgurhepkfffhfgfggfvufhfjggtgfesthejrgdttdefud X-Validation-by: bardou@lsv.ens-cachan.fr Subject: Re: [Caml-list] ocamlbuild generates .annot files in _build On 17/07/2012 09:00, Xavier Clerc wrote: > > > ----- Mail original ----- >> On 07/17/2012 02:12 PM, Francois Berenger wrote: >>> Hello, >>> >>> Shouldn't it generate theses files where the source files >>> are? >>> >>> The emacs plugin can no more find the types in case >>> the .annot files are not where the source file is. >> >> Also, the preprocessor INCLUDE directives don't work anymore because >> ocamlbuild did not copy the .ml file to include in _build. >> >> You have to use INCLUDE "../[your_file]" instead, which is dirty. > > I don't know if you will find my suggestion clean, > but when I encounter a similar problem I design an > ocamlbuild plugin that just copies the file to the > build directory. > > This will avoid relying upon a relative path, and > fits ocamlbuild structure by just declaring a dependency > and a rule to barely copy the file from its original > place to the build directory. Notice that this is akin > to what ocamlbuild actually does for source file, the > only difference is that ocamlbuild cannot determine the > dependency in your case. Hence, you have to declare it > manually. It feels very odd, at first, that the "dep" function of the Ocamlbuild API declares a dependency for tags rather than for a given file. I understand the rationale, it is strictly more general as this allows to add a dependency to a file only in some specific context, i.e. for specific rules. But we have to tag the file first (unless all files are tagged with their own name? I don't remember). Tagging a file to be able to declare a dependency does not feel very intuitive to me. I'm not even sure this works with every rules, I'm a little blurry on how tags are added to commands. Are all tags of the file names which appear in the command added automatically? Cheers, -- Romain Bardou