caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Romain Bardou <bardou@lsv.ens-cachan.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] ocamlbuild generates .annot files in _build
Date: Tue, 17 Jul 2012 16:46:24 +0200	[thread overview]
Message-ID: <50057AC0.7050903@lsv.ens-cachan.fr> (raw)
In-Reply-To: <1657861881.12110434.1342508437161.JavaMail.root@inria.fr>

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

  parent reply	other threads:[~2012-07-17 14:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17  5:12 Francois Berenger
2012-07-17  5:25 ` Francois Berenger
2012-07-17  7:00   ` Xavier Clerc
2012-07-17  7:35     ` Francois Berenger
2012-07-17 14:46     ` Romain Bardou [this message]
2012-07-17  6:55 ` Xavier Clerc
2012-07-17  7:24   ` Francois Berenger
2012-07-17  7:27     ` Francois Berenger
2012-07-17  7:31     ` Xavier Clerc
2012-07-17 14:28       ` Romain Bardou
2012-07-17  8:49   ` Anil Madhavapeddy
2012-07-17 11:05 ` Daniel Bünzli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50057AC0.7050903@lsv.ens-cachan.fr \
    --to=bardou@lsv.ens-cachan.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).