<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/10/9e2c94423f18872e0c1332c3f6115d66"
  from="Hezekiah M. Carty &lt;hcarty@a...&gt;"
  author="Hezekiah M. Carty"
  date="2009-10-23T16:13:47"
  subject="Re: [Caml-list] Ocamlbuild + unexpected dependency"
  prev="2009/10/3bcd2f16c7ea93d30f4c2afe13184103"
  next="2009/10/39062037ea7b698ed4d0e8eac5722e3f"
  prev-in-thread="2009/10/3bcd2f16c7ea93d30f4c2afe13184103"
  next-in-thread="2009/10/5b7e1adc784c98522967086aecba7d6c"
  prev-thread="2009/10/7ee1373a402f5409b88f6f1276dca2cd"
  next-thread="2009/10/dd2f31ff751f8cc85c64a3d518f82592"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Ocamlbuild + unexpected dependency">
<msg 
  url="2009/10/3bcd2f16c7ea93d30f4c2afe13184103"
  from="Dario Teixeira &lt;darioteixeira@y...&gt;"
  author="Dario Teixeira"
  date="2009-10-23T16:04:48"
  subject="Ocamlbuild + unexpected dependency">
<msg 
  url="2009/10/9e2c94423f18872e0c1332c3f6115d66"
  from="Hezekiah M. Carty &lt;hcarty@a...&gt;"
  author="Hezekiah M. Carty"
  date="2009-10-23T16:13:47"
  subject="Re: [Caml-list] Ocamlbuild + unexpected dependency">
<msg 
  url="2009/10/5b7e1adc784c98522967086aecba7d6c"
  from="Dario Teixeira &lt;darioteixeira@y...&gt;"
  author="Dario Teixeira"
  date="2009-10-23T16:49:49"
  subject="Re: [Caml-list] Ocamlbuild + unexpected dependency">
</msg>
</msg>
</msg>
</thread>

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

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 -&gt;
...

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

</contents>

</message>

