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.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 987CABBAF for ; Sat, 4 Oct 2008 22:21:22 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgEAIht50inzgTGjWdsb2JhbACBcYNqhjVHhk0+AQEBAQkJCgkPBZ1xhzeBaA X-IronPort-AV: E=Sophos;i="4.33,361,1220220000"; d="scan'208";a="17663475" Received: from mta3.srv.hcvlny.cv.net ([167.206.4.198]) by mail3-smtp-sop.national.inria.fr with ESMTP; 04 Oct 2008 22:21:19 +0200 Received: from conda.greatnorthern.local (ool-457963cf.dyn.optonline.net [69.121.99.207]) by mta3.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0K8800FC3DVHDMA0@mta3.srv.hcvlny.cv.net> for caml-list@yquem.inria.fr; Sat, 04 Oct 2008 16:21:17 -0400 (EDT) Received: from 192.168.2.5 (conda.localdomain [127.0.0.1]) by conda.greatnorthern.local (Postfix) with ESMTP id 43939110407 for ; Sat, 04 Oct 2008 16:20:15 -0400 (EDT) Received: from 192.168.2.3 (SquirrelMail authenticated user serpent) by 192.168.2.5 with HTTP; Sat, 04 Oct 2008 16:20:15 -0400 (EDT) Date: Sat, 04 Oct 2008 16:20:15 -0400 (EDT) From: Jason Noakes Subject: Reading external references from cmo/cmx files To: caml-list@yquem.inria.fr Message-id: <2738.192.168.2.3.1223151615.squirrel@192.168.2.5> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) User-Agent: SquirrelMail/1.4.9a X-Spam: no; 0.00; cmo:01 cmx:01 cmo:01 cmx:01 ocamlc:01 ocamldsort:01 makefile:01 ocamldsort:01 -jj:01 binaries:01 modules:02 referenced:02 binary:02 external:03 external:03 Are there any tools or examples that would allow me to take a .cmo or .cmx file and produce a list of the external modules that are referenced from that file? I'm trying to sort a list of .cmo or .cmx files so that they may link successfully. ocamlc -o binary a.cmo b.cmo c.cmo I know of the "ocamldsort" tool but I'd rather have a tool that took in the binaries and sorted those (it fits much better in my Makefile that way). The ocamldsort tool only works on source files. If I could just read a list of external module references out of a .cmo file I could topologically sort them on my own (or error out if there is a cycle). Any ideas? -JJ -- << Jason J. Noakes >>