Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
<daniel.buenzli@erratique.ch> wrote:
>
> Le 10 févr. 09 à 23:33, Hezekiah M. Carty a écrit :
>
>> I've used the following rule under After_rules in myocamlbuild.ml 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"] ["file1.inc;
file2.inc"];'.  I'm not sure how well it would work or if it would
work at all with a dynamic list of files.

Hez

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