caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Hezekiah M. Carty" <hcarty@atmos.umd.edu>
To: Dario Teixeira <darioteixeira@yahoo.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Ocamlbuild + unexpected dependency
Date: Fri, 23 Oct 2009 11:13:26 -0500	[thread overview]
Message-ID: <3a360f590910230913l5cdea067l843b4f1ce219b360@mail.gmail.com> (raw)
In-Reply-To: <806031.45357.qm@web111508.mail.gq1.yahoo.com>

On Fri, Oct 23, 2009 at 11:04 AM, Dario Teixeira
<darioteixeira@yahoo.com> wrote:
>
> I'm using the Xstrp4 syntax extension to include an external
> file "data.txt" inside a "foobar.ml" file.  I'm also using
> ocamlbuild to build the project.  How do I tell ocamlbuild
> that data.txt should be also be copied to the _build directory
> for building?  Ocamlbuild by default has no way of knowing that
> foobar.ml depends on data.txt.  (I am presently using an absolute
> path to get around this, which is not very portable).
>

I'm not sure if there is a better way to do this, but you can add the
dependency in your myocamlbuild.ml file.  Add something along the
lines of this:

---
let xstrp4_includes = "data.txt"

...
| After_rules ->
...

dep ["compile"; "the_xstrp4_tag"] xstrp4_includes;
---

I use this to support external includes with camlidl + ocamlbuild.

Hope this helps,

Hez

-- 
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science


  reply	other threads:[~2009-10-23 16:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23 16:04 Dario Teixeira
2009-10-23 16:13 ` Hezekiah M. Carty [this message]
2009-10-23 16:49   ` [Caml-list] " Dario Teixeira

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=3a360f590910230913l5cdea067l843b4f1ce219b360@mail.gmail.com \
    --to=hcarty@atmos.umd.edu \
    --cc=caml-list@yquem.inria.fr \
    --cc=darioteixeira@yahoo.com \
    /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).