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=2.2 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 1DCBCBB84 for ; Tue, 10 Feb 2009 23:59:31 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AugBAIOVkUnRVdsQkGdsb2JhbACUCj8BAQEBCQkMBxEDrnOPcAEDAQOEFwaEJA X-IronPort-AV: E=Sophos;i="4.38,188,1233529200"; d="scan'208";a="22782078" Received: from mail-ew0-f16.google.com ([209.85.219.16]) by mail3-smtp-sop.national.inria.fr with ESMTP; 10 Feb 2009 23:59:30 +0100 Received: by ewy9 with SMTP id 9so193741ewy.3 for ; Tue, 10 Feb 2009 14:59:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=KAOQa6AeLHwI3c5olqkkomOopjPPlEQOCm2HtjM1DCs=; b=ctI2zH3mjykCj3nDkTETEr+jwsem8BGi+g+Qg2/BS48Rb2ddBYIdIcKtYtPgM4yB19 4jdhp/uRzIQ8fi31I4hbwbg2N1HjKGQKFBH61wRI36Bw5oXB4wCEbICQv8WhK3PZ9YjU zMjsMex1FB1ABEmSBgbY7NyJ1ML5RSunbzO0M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=MqCNqSjYCru7aYwmX1oHtcmn87lTghrEg8K2hIv4zkc4usL4d3cNRHZDhRxIqjkmkM JgtcaO/hz1KIBqk8KFqCgAgrI41+qViayL/nwh4/AT3+ZvIeEWM26UBZ6XZR0DhNz4Pj NYWx2xYZve3tP3WPDyZ/2aSXmNrpTx0hj1M2I= MIME-Version: 1.0 Sender: mikkelfj@gmail.com Received: by 10.210.44.19 with SMTP id r19mr3706754ebr.195.1234306769352; Tue, 10 Feb 2009 14:59:29 -0800 (PST) In-Reply-To: References: <3a360f590902101433t1f955f6cw908c77bedb053d80@mail.gmail.com> Date: Tue, 10 Feb 2009 23:59:29 +0100 X-Google-Sender-Auth: 13741801721b30b6 Message-ID: Subject: Re: [Caml-list] ocamlbuild rules generating multiple files From: =?UTF-8?Q?Mikkel_Fahn=C3=B8e_J=C3=B8rgensen?= 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; mikkel:01 rgensen:01 mikkel:01 buenzli:01 basename:01 dependencies:01 2009:98 git:98 config:01 caml-list:01 dependency:01 dependency:01 argument:02 tree:02 tgz:02 2009/2/10 Daniel B=C3=BCnzli : > 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. 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