From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p5NJoBX2026182 for ; Thu, 23 Jun 2011 21:50:15 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AowIANKXA05APrys/2dsb2JhbABSmE6OXHfJToYtBIcmjzGLRw X-IronPort-AV: E=Sophos;i="4.65,414,1304287200"; d="scan'208";a="111811724" Received: from elehack.net ([64.62.188.172]) by mail1-smtp-roc.national.inria.fr with ESMTP; 23 Jun 2011 21:50:14 +0200 Received: from [134.84.72.188] (x-134-84-72-188.uofm-secure.wireless.umn.edu [134.84.72.188]) by elehack.net (Postfix) with ESMTPSA id F2D33EF1A0 for ; Thu, 23 Jun 2011 14:50:54 -0500 (CDT) Message-ID: <4E0398F3.5030604@elehack.net> Date: Thu, 23 Jun 2011 14:50:11 -0500 From: Michael Ekstrand User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: caml-list@inria.fr References: <4E033A0D.5010300@elehack.net> In-Reply-To: <4E033A0D.5010300@elehack.net> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] ocamlbuild: build-only dependencies on syntax extensions On 06/23/2011 08:05 AM, Michael Ekstrand wrote: > In my source tree, I build a few syntax extensions which are then used > to compile other modules. I do this as follows: > > flag_and_dep ["ocaml"; "ocamldep"; "use_lll"] & > S[A"-ppopt"; P"pa_lll.cma"]; > flag_and_dep ["ocaml"; "compile"; "use_lll"] & > S[A"-ppopt"; P"pa_lll.cma"] Found a fix: by using 'flag' for the second, rather than 'flag_and_dep', the dependency gets forced at ocamldep time but ignored at compile time, so it doesn't get found as a transitive dependency and linked. - Michael