From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p46JZNck022492 for ; Fri, 6 May 2011 21:35:23 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar8EANVMxE1ii1thdmdsb2JhbACYAo4xAQwJCwkRBiKIcasygi6EfIkSAQQFAYYDBIY9jT8miio X-IronPort-AV: E=Sophos;i="4.64,327,1301868000"; d="scan'208";a="82520753" Received: from nm27.bullet.mail.sp2.yahoo.com ([98.139.91.97]) by mail3-smtp-sop.national.inria.fr with SMTP; 06 May 2011 21:35:17 +0200 Received: from [98.139.91.66] by nm27.bullet.mail.sp2.yahoo.com with NNFMP; 06 May 2011 19:34:00 -0000 Received: from [98.139.91.2] by tm6.bullet.mail.sp2.yahoo.com with NNFMP; 06 May 2011 19:34:00 -0000 Received: from [127.0.0.1] by omp1002.mail.sp2.yahoo.com with NNFMP; 06 May 2011 19:34:00 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 502930.84677.bm@omp1002.mail.sp2.yahoo.com Received: (qmail 2028 invoked by uid 60001); 6 May 2011 19:34:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1304710440; bh=IFQsYXLrado5VxZejwMqYYSDQdiPk6xb/CwHz20yv58=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=qSd1UFpPkJNRjv/zeRPXnIP/O0sjgHQtI7TZ3oj9pgCQpIU+u0yxuW9ykO62AjqlJi8TmoKXw17MQ0XQTqp8v3xJtnQEk23Wr9tA61wMThDVOXdMhvFUZd9ACrBfi+UDg4pjaRL4iYcYW2byAHFKTPJrHDILixW35qMuVEGrJYs= 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:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=UekNz8Irwnosn/2J8fcAx7lD1AgEK8DiwnhW7Nm3WrCl3tRQkQG85U2jcyh7pja6uBa5XXmiAqCJxgptJFMsqmt6mt28I40m9glg1Mmbc+ireQS6nbh0cBTIxf0G7oGSbxXdPQueKkvJt01sTqu7k/DZNN4uMMkz5kAR2NC07RA=; Message-ID: <164349.91725.qm@web111505.mail.gq1.yahoo.com> X-YMail-OSG: BhApQ1cVM1mB34W6ojASoOdy5rHq4TnvDUaHWmLKq2sgXDZ JiusOzzQH7QVD1u2kJZIbQQrKnDm6nxgKf3h02lSxD9g6.LcFf2w47bSGTLo tcCPvFIGhkx5nNib8YHNQA_kn3enYYR5swJ4MTUJZM.9YAiNy_df91AFfGlO nX0JAuc.aGcBWoD1s_o3QY1zmIxpm1Cj.jnSqLhjO2p_pRpIwzJDvPW6C5OQ y6ylWAQpAz9NhN2a6thXTxlUGC7hCwv50eKZhgqfaWVjZzs_F9KYUF54uSyj 3Mb6vTrk4UfF9shUO5P_Neq4hQ.JZzd9.14A0RAWBMia2VR8Dmm8kkuOGlN7 kzEm9u9yFbH3hPF4kfvVKpvlW5IgsHIGTR4cztpimpfE3bE4SQakQDkESPWH 4w3VuiLLPb3GokxDEaFabXf8JONb.gdrib7tnhTeWelT.EcWqtVhTga6WYft DQt7fjcJjDhy3tuUgMWgkgm._h5GHv3Ddj_Xr6OPX.3EaHC84nzXBhmQrz71 I96TLniPTN_yZ4MUkvA-- Received: from [213.205.70.223] by web111505.mail.gq1.yahoo.com via HTTP; Fri, 06 May 2011 12:34:00 PDT X-Mailer: YahooMailClassic/12.0.2 YahooMailWebService/0.8.111.303096 Date: Fri, 6 May 2011 12:34:00 -0700 (PDT) From: Dario Teixeira To: Gabriel Scherer Cc: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p46JZNck022492 Subject: Re: [Caml-list] Telling Ocamlbuild to link seemingly unreferenced modules Hi, > Thanks for the input, Gabriel.  Directly hacking the > myocamlbuild.ml file > does work, and the process may be even further simplified > with just a > couple of lines: > > dep ["ocaml"; "link"; "native"] ["foo.cmx"]; > dep ["ocaml"; "link"; "byte"] ["foo.cmo"]; I may have spoken too soon regarding this problem being solved. The issue now is that foo.cmx is linked *after* the "main" module, main.ml. I thought I could influence Ocamlbuild's dependency graph by adding the following extra after_rule: dep ["ocaml"; "ocamldep"; "file:main.ml"] ["foo.ml"]; However, this does not seem to work. Any ideas on how I can convince Ocamlbuild to link foo.cmx and to do it before main.cmx? On a related note, if there's one tool in the Ocaml ecosystem that desperately needs a manual is Ocamlbuild. I find myself mostly cargo-culting when I interact with it: the documentation is sparse and all over the place, making it very difficult to grok how the whole fits together. /end rant. Best regards, Dario Teixeira