From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA09262; Fri, 31 Aug 2001 11:42:55 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA09286 for ; Fri, 31 Aug 2001 11:42:54 +0200 (MET DST) Received: from chopin.ai.univie.ac.at (chopin.ai.univie.ac.at [131.130.174.170]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f7V9gq523634 for ; Fri, 31 Aug 2001 11:42:53 +0200 (MET DST) Received: (from markus@localhost) by chopin.ai.univie.ac.at (8.9.3/8.9.3/Debian 8.9.3-21) id LAA25622; Fri, 31 Aug 2001 11:42:47 +0200 Date: Fri, 31 Aug 2001 11:42:47 +0200 From: Markus Mottl To: Michael Leary Cc: caml Subject: Re: [Caml-list] unbound value Parser.main? Message-ID: <20010831114247.A24478@chopin.ai.univie.ac.at> References: <20010830184600.A32310@ip178.usw22.rb1.bel.nwlink.com> <20010830191958.B32310@ip178.usw22.rb1.bel.nwlink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010830191958.B32310@ip178.usw22.rb1.bel.nwlink.com>; from leary@nwlink.com on Thu, Aug 30, 2001 at 19:19:58 -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 30 Aug 2001, Michael Leary wrote: > doh! the OcamlMakefile... is picky about names. > > I've got it like this now: > > SOURCES = lexer.mll parser.mly fbot.ml > RESULT = fbot > LIBS=str Simple answer: you have to put the files in the Makefile into the right order. Since the generated module 'Lexer' depends on 'Parser' and module 'Fbot' on both you should write: SOURCES = parser.mly lexer.mll fbot.ml This should get rid of the problem. (In short: people have to topologically sort the files according to their dependencies and sort them totally wrt. their linking order). Because the order of the modules also plays a role during linking (and linking order matters, too, for side-effects!), there doesn't seem to be any alternative to specifying the order manually in the general case. Making files compile and link correctly by taking into account the dependies only would make things much more complicated without really solving the problem. It only gives the user the false sense that order doesn't matter. Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr