From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 30A27BB84 for ; Tue, 10 Feb 2009 23:51:23 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AosDABuUkUnRVdqgc2dsb2JhbACUCj8BDAgLCRGvJoZ9iEqEGgY X-IronPort-AV: E=Sophos;i="4.38,188,1233529200"; d="scan'208";a="23882024" Received: from mail-bw0-f160.google.com ([209.85.218.160]) by mail1-smtp-roc.national.inria.fr with ESMTP; 10 Feb 2009 23:51:22 +0100 Received: by bwz4 with SMTP id 4so156380bwz.3 for ; Tue, 10 Feb 2009 14:51:22 -0800 (PST) MIME-Version: 1.0 Sender: hcarty@mulethief.com Received: by 10.103.119.19 with SMTP id w19mr2360729mum.80.1234306281894; Tue, 10 Feb 2009 14:51:21 -0800 (PST) In-Reply-To: References: <3a360f590902101433t1f955f6cw908c77bedb053d80@mail.gmail.com> Date: Tue, 10 Feb 2009 17:51:21 -0500 X-Google-Sender-Auth: 11e1be9effc87390 Message-ID: <3a360f590902101451m41eff2efx42de4cde14f0058d@mail.gmail.com> Subject: Re: [Caml-list] ocamlbuild rules generating multiple files From: "Hezekiah M. Carty" To: =?UTF-8?Q?Daniel_B=C3=BCnzli?= Cc: OCaml List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; buenzli:01 basename:01 foo:01 idl:01 camlidl:01 10,:98 2009:98 wrote:01 compile:01 caml-list:01 tar:01 argument:02 archives:02 tgz:02 arg:03 On Tue, Feb 10, 2009 at 5:39 PM, Daniel B=C3=BCnzli wrote: > > Le 10 f=C3=A9vr. 09 =C3=A0 23:33, Hezekiah M. Carty a =C3=A9crit : > >> 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 throu= gh > 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 no= w > 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 --=20 Hezekiah M. Carty Graduate Research Assistant University of Maryland Department of Atmospheric and Oceanic Science