From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p46HA7Vx019001 for ; Fri, 6 May 2011 19:10:07 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjQEABIqxE1ii1tVdGdsb2JhbACEU5NcjjEBDAkNBxEGIohxqhQ8gi6FB4kSAQQFAYEkg16BAQSGPY0/Jooq X-IronPort-AV: E=Sophos;i="4.64,327,1301868000"; d="scan'208";a="94562812" Received: from nm15.bullet.mail.sp2.yahoo.com ([98.139.91.85]) by mail4-smtp-sop.national.inria.fr with SMTP; 06 May 2011 19:10:01 +0200 Received: from [98.139.91.65] by nm15.bullet.mail.sp2.yahoo.com with NNFMP; 06 May 2011 17:10:00 -0000 Received: from [98.139.91.56] by tm5.bullet.mail.sp2.yahoo.com with NNFMP; 06 May 2011 17:10:00 -0000 Received: from [127.0.0.1] by omp1056.mail.sp2.yahoo.com with NNFMP; 06 May 2011 17:10:00 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 351323.72337.bm@omp1056.mail.sp2.yahoo.com Received: (qmail 81167 invoked by uid 60001); 6 May 2011 17:10:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1304701800; bh=TWojzKXFXCJsYj6NmDzWMlT9aNfA9YEJkBuyUKjGvPQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=LzaGg8eLXdEHMD+2VzoJJXH0TuP7074UNrhH5iJudcGy6rMDQ/e/0G9Td4dGI7Ne8axBnD4X55li1AM5ZC2kAoR3gcTo0XKwfugemJf2YjPeaNnXO800kpSslnDabORZA+W7gJVYZC4haf+iekJgJPZABOIs7bN7INtOcDOmTwY= 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=6SGv8bV8gdic11v5yMonQkxxykr4L8+CVWeFFXjMQpER6U1IfkQCnRSYwYaqqH3rR4QZUiLmdSbIUWnzxGhaVfLVeVviUfL2oDOIA/VEzVaksRsxzunbJkamf7HutnzyR/DOdP9M+ozibLIwH8+3AGN+T3ccd4694zyXeuQNXXM=; Message-ID: <33737.80989.qm@web111504.mail.gq1.yahoo.com> X-YMail-OSG: WKNL1CEVM1n7lRia65BRHE.fbOr6tA83oz_g..kRkYFc6Ee OnKMszRNIo33h.6WKWcGJyPllrtEpzNLfN.UrQ16XaTFpjlqWLuM5onazvGZ X22.1VPl9bti.SFn3Ms63DW5lPshPQJ7gM0M1aLtr3zjem8XiKFh5SulMC5P VwYNngi_afZm1OKKlmwxf7gxrQoB13FgNDRsU2wUq_IydofjVtjHzkxkTbzU eD2iSnXUQiQ9H18Lf8o_hFN2YXLZJIzGQxtpn0_GsAwbWe4z.kKCm37XXTxs MZapHbr2E5wlFfbW1Mj3QoBp9qORwYg2kp8QJodthuIuW8aba4BEWob.Y8kc FhyqSmk5bmGhEm_CDQnwHAmqx_zjzfnAWeeWXNIB4y2xtf9X_Oujv.XVLKWN pwpvHCFf4jIQnILccLR1GE0NPvgcLurureQNp1Fo97FuUjw8sdkN5xva.XgL yTZrN0G8B3X2iGt5jL3c- Received: from [213.205.70.204] by web111504.mail.gq1.yahoo.com via HTTP; Fri, 06 May 2011 10:09:59 PDT X-Mailer: YahooMailClassic/12.0.2 YahooMailWebService/0.8.111.303096 Date: Fri, 6 May 2011 10:09:59 -0700 (PDT) From: Dario Teixeira To: Gabriel Scherer Cc: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p46HA7Vx019001 Subject: Re: [Caml-list] Telling Ocamlbuild to link seemingly unreferenced modules Hi, > I'm not exactly sure this is a complete answer to your problem (I'm not > familiar with plugin linking and all that), but here is a small test: > > (...) > > I don't know the exact semantics of this 'dispatch' function > (After_rules, etc.), I just imitated it from an other project doing a > similar thing. I suppose you could find more detailed answers in the > ocamlbuild documentation. 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"]; However, I still wonder if there's some other incantation that would tell Ocamlbuild to link in a given module without requiring tweaking myocamlbuild.ml. Also, I suspect it is possible to further condense the two lines above into a single one. cheers, Dario