Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
ocamlbuild rules generating multiple files
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-02-10 (22:51)
From: Hezekiah M. Carty <hcarty@a...>
Subject: Re: [Caml-list] ocamlbuild rules generating multiple files
On Tue, Feb 10, 2009 at 5:39 PM, Daniel Bünzli
<> wrote:
> Le 10 févr. 09 à 23:33, Hezekiah M. Carty a écrit :
>> I've used the following rule under After_rules in for
> [...]
> Thanks but my problem is that the generated file do not have the same
> basename as the dep i.e. I cannot specify the ~prods arg, the ~prods are
> going to be discovered while the rule is executed and without going through
> further "build" argument invocations.
> Maybe a good example is tar archives. Let's say I have a rule that takes a
> .tgz and produces its files. How do I tell ocamlbuild that these files now
> exist.

Ah, my apologies.  I didn't read your original post carefully enough.
Would it be possible to write a function to read these files in to a
list then use "dep [foo; bar] file_list;"?  This is what I use for
included files in .idl files.  I have only done this with static,
pre-defined lists using 'dep ["compile"; "camlidl"] [";"];'.  I'm not sure how well it would work or if it would
work at all with a dynamic list of files.


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