From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id F2A89BBAF for ; Tue, 30 Sep 2008 09:27:10 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkwDAHFx4UjAXQImiGdsb2JhbACTQQEBARUiqBKBZw X-IronPort-AV: E=Sophos;i="4.33,336,1220220000"; d="scan'208";a="15490769" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 30 Sep 2008 09:27:10 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m8U7RAjM002916 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 30 Sep 2008 09:27:10 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkoDAN9x4UjCpx6vamdsb2JhbACTQQ0LCgYSqBCBZw X-IronPort-AV: E=Sophos;i="4.33,336,1220220000"; d="scan'208";a="17488602" Received: from smtpka.univ-orleans.fr (HELO ka.univ-orleans.fr) ([194.167.30.175]) by mail3-smtp-sop.national.inria.fr with ESMTP; 30 Sep 2008 09:27:10 +0200 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by ka.univ-orleans.fr (Postfix) with ESMTP id 0CA5C12AD55; Tue, 30 Sep 2008 09:27:10 +0200 (CEST) Received: from [192.168.0.2] (lau18-1-82-246-197-195.fbx.proxad.net [82.246.197.195]) by smtps.univ-orleans.fr (Postfix) with ESMTP id 6AA0736E60; Tue, 30 Sep 2008 09:27:10 +0200 (CEST) Subject: OCamlBuild question From: David Teller To: OCaml Cc: Nicolas Pouillard Content-Type: text/plain Date: Tue, 30 Sep 2008 09:27:11 +0200 Message-Id: <1222759631.6764.4.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 48E1D4CE.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; univ-orleans:01 mli:01 mli:01 foo:01 ad-hoc:01 univ-orleans:01 lifo:01 plug-in:98 liquidations:98 dependency:01 modules:02 tree:02 api:02 resolving:03 module:03 Hi everyone, I'm trying to write a OCamlBuild plug-in to automatically generate the .mli corresponding to a .mlpack (for documentation purposes). I've written a [rule] which lets me depend a .mli on the corresponding .mlpack . From this .mlpack, I can obtain the list of modules involved in the construction of the pack. Now, I only have to 1. find the corresponding source .mli files 2. find the corresponding .mli.depends files 3. do a topological sort and create the destination .mli . Part 3 is no problem. On the other hand, I haven't been able to progress much with parts 1 and 2. Part 2 requires waiting until the corresponding .mli.depends have been created, but * neither [~insert:`bottom] nor [~insert:(`after foo)] seem to help here * attempting to [build] an ad-hoc list of files somehow extracted from the mlpack only gives me dependency errors * attempting [Solve.solve_target] doesn't seem to help any further. As for part 1, it requires the ability to find which source .ml / .mli correspond to a given module. I can only assume OCamlBuild offers some kind of API for this purpose, because I'd rather avoid folding through the whole tree, resolving [include] directives myself to find a .ml or a .mli which may be the right file. Does anyone have suggestions? Thanks, David -- David Teller-Rajchenbach Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations.