caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Mikkel Fahnøe Jørgensen" <mikkel@dvide.com>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: OCaml List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] ocamlbuild rules generating multiple files
Date: Tue, 10 Feb 2009 23:59:29 +0100	[thread overview]
Message-ID: <caee5ad80902101459m411005xc613e9dc0baa02c2@mail.gmail.com> (raw)
In-Reply-To: <CCD807BD-A9DC-4AC4-95EB-580A73047727@erratique.ch>

2009/2/10 Daniel Bünzli <daniel.buenzli@erratique.ch>:
> 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.

This is how dependency scanners also work.

You can see an example in

http://git.dvide.com/pub/ocamlbuild-ctools/tree/myocamlbuild_config.ml

search for:
accumulated_include_rule

Here accumulated_include_rule is used instead of rule, but it calls
rule eventually, but with its calculated prod arguments that it gets
(in this case) from reading multiple dependency files. You could
modify this function to take a list of a .tgz file.

Some care needs to be taken since each build step must produce an
actual file - especially when creating dependencies, but it is not
necessarily required in you case. Dependency scanners do need to
produce files so something else can depend on this files to ensure the
dependency is scanned.

Mikkel


  parent reply	other threads:[~2009-02-10 22:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 22:15 Daniel Bünzli
2009-02-10 22:33 ` [Caml-list] " Hezekiah M. Carty
2009-02-10 22:39   ` Daniel Bünzli
2009-02-10 22:51     ` Hezekiah M. Carty
2009-02-10 22:59     ` Mikkel Fahnøe Jørgensen [this message]
2009-02-11 11:48 ` Romain Bardou

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=caee5ad80902101459m411005xc613e9dc0baa02c2@mail.gmail.com \
    --to=mikkel@dvide.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    /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).