From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 4AB16800D1 for ; Wed, 1 Feb 2017 14:40:42 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.33,320,1477954800"; d="scan'208";a="211658729" Received: from dt-64014.paris.inria.fr (HELO [128.93.64.14]) ([128.93.64.14]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 01 Feb 2017 14:40:41 +0100 To: Gabriel Scherer References: <58910692.1060706@inria.fr> Cc: caml users , github@mjambon.com From: =?UTF-8?Q?Fran=c3=a7ois_Pottier?= Message-ID: Date: Wed, 1 Feb 2017 14:40:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] cppo, ocamlbuild, and dependencies On 01/02/2017 11:19, Gabriel Scherer wrote: > In the meantime, I implemented an amusing hack at the ocamlbuild level Thanks Gabriel for your quick reply. This seems amusing indeed, but does not quite work for me. Running ocamlbuild once fails, complaining that A.ml does not exist (whereas A.cppo.ml exists). If I immediately run ocamlbuild again, the build succeeds. I think I would prefer to use a slightly less amusing approach and just find out, ahead of time, what the dependencies are. In the rule that transforms %.cppo.ml to %.ml, could I just read the source file, looking #include patterns, and ask that the included files be built first? -- François Pottier francois.pottier@inria.fr http://gallium.inria.fr/~fpottier/