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 BAA01046; Wed, 15 Sep 2004 01:47:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA00846 for ; Wed, 15 Sep 2004 01:47:03 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mta07-svc.ntlworld.com (mta07-svc.ntlworld.com [62.253.162.47]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i8ENl2Ze032548 for ; Wed, 15 Sep 2004 01:47:02 +0200 Received: from [80.4.70.84] by mta07-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20040914234728.BWMA19539.mta07-svc.ntlworld.com@[80.4.70.84]> for ; Wed, 15 Sep 2004 00:47:28 +0100 Message-ID: <414782F5.4060708@ntlworld.com> Date: Wed, 15 Sep 2004 00:47:01 +0100 From: "chris.danx" User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Caml Mailing List Subject: [Caml-list] OcamlConf 0.8 - Compiling Sources in Sub-directories Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 414782F6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; ntlworld:99 automake:01 usr:01 ocamlfind:01 ocamlc:01 mli:01 automake:01 usr:01 ocamlfind:01 ocamlc:01 mli:01 -linkpkg:01 clone:01 2004:99 util:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, Does anyone else here use OCamlConf? Is this an appropriate place to post a problem involving OCamlConf? I'm in the process of developing a simple configure.ml file for a game. However I ran into a problem with OcamlConf (configure.ml at bottom of email). It does not compile sources in sub directories unless they are included using the optional 'include' parameter in the Automake.package function. For example, it fails to find fbaCell.cmi necessary for src/logic/fbaCells.ml. When compiled fbaCell.cmi is compiled into src/logic, but src/logic is not supplied to the compiler. danx@trunk$ ocamlconf configure.ml && ./configure ------------ Configuration Summary ------------ prefix: /usr/local danx@trunk$ make ocamlfind ocamlc -c -o src/logic/fbaCells.cmo src/logic/fbaCells.ml File "src/logic/fbaCells.ml", line 1, characters -1--1: Could not find the .cmi file for interface src/logic/fbaCells.mli. make: *** [src/logic/fbaCells.cmo] Error 2 Providing ~includes: ["src/logic"] to AutoMake.package works. ocamlconf configure.ml && ./configure ------------ Configuration Summary ------------ prefix: /usr/local danx@trunk$ make ocamlfind ocamlc -c -I src/logic -o src/logic/fbaCells.cmi src/logic/fbaCells.mli ocamlfind ocamlc -c -I src/logic -o src/logic/fbaCells.cmo src/logic/fbaCells.ml ocamlfind ocamlc -linkpkg -a -I src/logic -o fbaglogic.cma src/logic/fbaCells.cmo Is this the intended behaviour? My expectation would be that it would provide src/logic only when necessary. Perhaps I'm being dense and missing something? Cheers, Chris p.s. if anyone can suggest a better name than "Falling Block Addict" for a tetris clone, don't hold back! :) (* configure.ml * * An ocamlconf configuration program for 'Falling Block Addict'. * * by Christopher Campbell (c) 2004 *) open Conf open Util let game_logic_files = "fbaCells.mli fbaCells.ml" let game_logic_library_name = "fbaglogic" let game_logic_library src_dir = AutoMake.library ~sources: (prefix src_dir (split game_logic_files)) ~dest: `lib ~shared: true game_logic_library_name (* *) let conf_spec = [ ] let configuration = configure conf_spec let _ = print_newline (); print_endline "------------ Configuration Summary ------------"; print_string (configuration#summarize); print_newline () (* * *) open AutoMake let _ = output_makefile ~configuration:(configuration :> AutoMake.configuration) (package ~package: "sg-fbaddict" ~findlib_package: "fbaddict" ~version: "0.1" ~includes: ["src/logic"] ~flags: [ [`compile; `native], []; ] (* *) [ game_logic_library "src/logic" ] ) ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners