From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 6C873BBAF for ; Sat, 24 Oct 2009 18:11:28 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmsBAPfD4kpDww+jmWdsb2JhbACEcYxnfohcAQEBAQEICwoHE6h2KIE7hiWIaAEGBAGBLYI6UwQ X-IronPort-AV: E=Sophos;i="4.44,617,1249250400"; d="scan'208";a="38893182" Received: from web111506.mail.gq1.yahoo.com ([67.195.15.163]) by mail1-smtp-roc.national.inria.fr with SMTP; 24 Oct 2009 18:11:27 +0200 Received: (qmail 67513 invoked by uid 60001); 24 Oct 2009 16:11:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1256400686; bh=wfZdMw30WUTKuJORtEJOo2A7FivE7lsimkV/03kZweI=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=MHZUWIOHRnXUU/++MOpWqjdwcsPLo/pSrUTLUb1v0DkRC68iAOElAWRU/7YO42A/V8tUXDqPLYngMyBV8RZ/fJ0StAUeTGOl+AVzHn+CGA1R1N9WYJEeViMIpSFA+X/HUBOd6roDAG8pYMW5He+hUc3SeIagBYt9tNIizL9P+JQ= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=CRttbw4dgHBu1w0lBNJpn7gov4bqZAIEzmxOVuuGuNaKiBYGUBZsLOnt6djR8i8k5Je+ocgLYTYT09BuoCQzS/RQTJTUT/6LPxRGUPPBISXHeAuVxNVihmekxBJkT9Oqjs1LlX+33smbVVKTePT2ljri0Bx9t85De93meVDiDe8=; Message-ID: <332954.66598.qm@web111506.mail.gq1.yahoo.com> X-YMail-OSG: d.FSvPoVM1lY5JqRo7rZ4XRJh4JsDlBWLIB2WTkNzTMv_D1HbE47xTHvWRoIg98IJSdCIDuNWg1FFRbIERvD.5ecgIS56pOK28kU48nljpFfhbi0d0c8YZDpQxQAfLDqcsvWFMZaVnOZ26UoTDpHM3kz.l.PTiOTnNyPAnQlgekhFGrn7Dao6NP2X0x8fx80HIXLYrMcOpyrjR2sv9_gaetIlKkRR8_1ozO8q.q9Soya61QnOgyQgu5e.xjsrthkQbzl0KOMa4.XWGqBG3BPmwha6.TDXOZkm3SugwV8_AYv7lx4EvYmJGMIab_aqBxt1EB961CVQD7iC7b6oBGX8kNyv6p3kkir_lYT9QZzCP4ii_Z0t6L8JO0XACo8_j0dhULNsoC6 Received: from [213.205.71.58] by web111506.mail.gq1.yahoo.com via HTTP; Sat, 24 Oct 2009 09:11:26 PDT X-Mailer: YahooMailClassic/8.0.7 YahooMailWebService/0.7.361.3 Date: Sat, 24 Oct 2009 09:11:26 -0700 (PDT) From: Dario Teixeira Subject: Ocamlbuild directory inclusion problem To: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; bug:01 lib:01 foo:01 foo:01 lib:01 ocamlc:01 -pack:01 cmo:01 cmo:01 mli:01 sig:01 val:01 exited:01 invocation:01 ocamlc:01 Hi,=0A=0AI've come across another issue with Ocamlbuild, and I'm not sure i= f this one=0Ais a bug or a feature. Consider the project tree below; note = that everything=0Aunder lib/ is supposed to produce a foo.cma library, whil= e cmd/ is a command=0Aline application that uses foo.cma (and which can be = safely ignored for now).=0A=0A|-- _tags=0A|-- lib/=0A| |-- _tags=0A| |-= - foo.mllib=0A| |-- foo_core.mlpack=0A| |-- foo_core/=0A| | |-- (..= .)=0A| |=0A| |-- foo_ext.mlpack=0A| |-- foo_ext/=0A| |-- (...)= =0A|=0A|-- cmd/=0A |-- (...)=0A=0AThe file lib/_tags just contains " or : include". If I issue=0A"ocamlbuild foo.cma" inside th= e lib/ directory, then foo.cma gets built as expected.=0AHowever, if I move= to the parent directory and issue "ocamlbuild lib/foo.cma",=0AI get an err= or:=0A=0Aocamlc -pack lib/foo_ext/beta.cmo lib/foo_ext/alpha.cmo -o lib/foo= _ext.cmo=0AFile "_none_", line 1, characters 0-1:=0AError: The implementati= on (obtained by packing)=0A does not match the interface lib/foo_ext.= mli:=0A Modules do not match:=0A sig val num : int end=0A = is not included in=0A Foo_core.Zero.S=0A Unbound module ty= pe Foo_core.Zero.S=0ACommand exited with code 2.=0A=0A=0AThe problem is of = course that "-I lib" should be added to the invocation of ocamlc.=0AFor thi= s purpose I've created a myocamlbuild.ml in the root directory, with the=0A= following contents:=0A=0Alet () =3D dispatch begin function=0A | Aft= er_rules ->=0A Pathname.define_context "lib/foo_ext" ["lib"]= ;=0A | _ -> ()=0Aend=0A=0A=0AHowever, this doesn't work as expected.= Perhaps I've misunderstood the purpose=0Aof Pathname.define_context? In = any case, I would expect a simple example like=0Athis one to work even with= out the need for a myocamlbuild.ml plugin. So, what=0Ais missing here?=0A= =0AThanks in advance!=0ABest regards,=0ADario Teixeira=0A=0A=0A=0A