From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id EF92D7EE79 for ; Tue, 12 Apr 2016 15:00:02 +0200 (CEST) IronPort-PHdr: 9a23:eWljqhEtvS+Ick+KEgzxrJ1GYnF86YWxBRYc798ds5kLTJ75r86wAkXT6L1XgUPTWs2DsrQf27qQ7vmrBTNIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/nh6bvotaPPE1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv/h7TL7icq8kYbtdBTUgeyBptYy4/SXEGACG439UT34biAEAVwPM6RW/WpbqrgP7sPB80W+UJ5ulY6ozXGGJ771qUwPvkCcwF6A2/Xuf3sdwlqNAvBW5p1p/xIPbbZu9KOc7dK7HedIcA2ZMCJUCHxddC5+xOtNcR9EKOvxV+tWsqg== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=christoph.hoeger@tu-berlin.de; spf=None smtp.mailfrom=christoph.hoeger@tu-berlin.de; spf=None smtp.helo=postmaster@mail.tu-berlin.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@tu-berlin.de) identity=pra; client-ip=130.149.7.33; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="christoph.hoeger@tu-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@tu-berlin.de) identity=mailfrom; client-ip=130.149.7.33; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="christoph.hoeger@tu-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.tu-berlin.de) identity=helo; client-ip=130.149.7.33; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="postmaster@mail.tu-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AkAQDz7wxXkyEHlYJehAp9AaoLkGmBdCGFbAKBMTkTAQEBAQEBAQERAQEBAQcNCQkhL4ItghUBAQQjDwE7ChELGAICBQQSCwICCQMCAQIBMxIGDQYCAQEOiAADEgQKrj2MeAOFKQEBCAIefIlwhz+CVgWGMQyRS4V3ikuHAYVajychAYJVgVRqigUBAQE X-IPAS-Result: A0AkAQDz7wxXkyEHlYJehAp9AaoLkGmBdCGFbAKBMTkTAQEBAQEBAQERAQEBAQcNCQkhL4ItghUBAQQjDwE7ChELGAICBQQSCwICCQMCAQIBMxIGDQYCAQEOiAADEgQKrj2MeAOFKQEBCAIefIlwhz+CVgWGMQyRS4V3ikuHAYVajychAYJVgVRqigUBAQE X-IronPort-AV: E=Sophos;i="5.24,474,1454972400"; d="scan'208";a="213666484" Received: from mail.tu-berlin.de ([130.149.7.33]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2016 15:00:02 +0200 X-tubIT-Incoming-IP: 91.66.50.149 Received: from ip5b423295.dynamic.kabel-deutschland.de ([91.66.50.149] helo=[192.168.178.42]) by mail.tu-berlin.de (exim-4.76/mailfrontend-5) with esmtpsa [UNKNOWN:AES128-SHA:128] for id 1apxvE-0002Rv-71; Tue, 12 Apr 2016 15:00:01 +0200 From: =?UTF-8?Q?Christoph_H=c3=b6ger?= To: caml users References: <570CE35A.4090709@tu-berlin.de> Organization: =?UTF-8?Q?Technische_Universit=c3=a4t_Berlin?= Message-ID: <570CF14F.3080801@tu-berlin.de> Date: Tue, 12 Apr 2016 14:59:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.4.12.125416 X-PMX-Spam: Gauge=IIIIIII, Probability=0%, Report='' Subject: Re: [Caml-list] glob-ing dependencies for a custom ocamlbuild rule I should have mentioned it, but I am not particularly interested in letting ocamlbuild build one of the /**/*.mo files, I just want to make sure that when it comes to building .modlib.impl or not, ocamlbuild considers _all_ source files in and rebuilds if one has changed. Is that covered by "dynamic dependencies"? Am 12.04.2016 um 14:48 schrieb Gabriel Scherer: > Ocamlbuild distinguishes "static dependencies", which are expressed in > the ~deps argument of the rule declaration, and "dynamic dependencies" > which are files required by the rule command. > > The notion of pattern accepted for static dependencies is indeed > rather rigid (less expressive than the patterns used in the _tags > file), and what you have in mind does not work. The supported patterns > are deterministic: given one file, there is a unique way a pattern can > match, and a pattern is instantiated into a single file by any > substitution environment. There is a good reason for that: it is not > clear what the semantics of your proposal would be. Indeed, ocamlbuild > tries to recursively build all static dependencies before deciding to > apply a rule, but what does it mean to build all **/*.mo? Listing the > one that exist in the source directory is easy, but how would you > guess which one to try to build recursively using other rules? > > Notions such as "all files matching P in this directory" are not > stable to the replacement of a source file by an intermediate target: > for example if tomorrow you decide that one of the .mo file will be > itself pre-processed from a .mo.pp file, it won't be seen by a > existing-file globbing technique anymore. You have a lot of > flexibility in the behaviors you implement in the build command, so > you can easily do the matching there and "build" those files, but it > will result in a relatively fragile rule; this is you decision to > make, and not in the path of least resistance. > > > On Tue, Apr 12, 2016 at 8:00 AM, Christoph Höger > wrote: >> Dear all, >> >> I want to write a custom ocamlbuild rule that basically combines all >> source files from a given (sub-)directory and thus depends on these files. >> >> However, the following does not work: >> >> rule "normalize (preprocess) a Modelica library" >> ~prods:["%.modlib.impl"; "%.modlib.sign"] >> ~deps:["%.modlib/**/*.mo"; "%.modlib.depends"] >> ~doc:"Preprocesses a Modelica library" >> modlibc_command >> >> It seems that the rule does not expand the pattern in the dependency. Is >> there a way to achieve something similar? It would be a major PITA to >> add all these files manually... >> >> regards, >> >> Christoph >> -- >> Christoph Höger >> >> Technische Universität Berlin >> Fakultät IV - Elektrotechnik und Informatik >> Übersetzerbau und Programmiersprachen >> >> Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin >> >> Tel.: +49 (30) 314-24890 >> E-Mail: christoph.hoeger@tu-berlin.de >> >> -- >> Caml-list mailing list. Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> Bug reports: http://caml.inria.fr/bin/caml-bugs > -- Christoph Höger Technische Universität Berlin Fakultät IV - Elektrotechnik und Informatik Übersetzerbau und Programmiersprachen Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin Tel.: +49 (30) 314-24890 E-Mail: christoph.hoeger@tu-berlin.de