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 SAA26129; Tue, 2 Dec 2003 18:57:49 +0100 (MET) 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 SAA24512 for ; Tue, 2 Dec 2003 18:57:48 +0100 (MET) Received: from avalon.ens-lsh.fr (mailhost.ens-lsh.fr [193.51.131.2]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hB2Hvl106410 for ; Tue, 2 Dec 2003 18:57:47 +0100 (MET) Received: from avalon.ens-lsh.fr (localhost [127.0.0.1]) by avalon.ens-lsh.fr (8.12.8/8.12.8) with ESMTP id hB2IvDwR021642 for ; Tue, 2 Dec 2003 18:57:13 GMT Received: from ens-notes1.ens-lsh.fr (ens-notes1.ens-lsh.fr [10.2.1.44]) by avalon.ens-lsh.fr (8.12.8/8.12.8) with ESMTP id hB2IvCPN021639 for ; Tue, 2 Dec 2003 18:57:12 GMT Received: from mostha ([10.3.20.31]) by ens-notes1.ens-lsh.fr (Lotus Domino Release 5.0.10) with SMTP id 2003120218574421:72775 ; Tue, 2 Dec 2003 18:57:44 +0100 Date: Tue, 2 Dec 2003 18:57:01 +0100 From: Damien To: caml-list@inria.fr Subject: Re: [Caml-list] Ocamldep too "gentle". Message-Id: <20031202185701.4f91c49a.Damien.Pous@ens-lyon.fr> In-Reply-To: <87y8tvxg9p.dlv@wanadoo.fr> References: <20031202162658.GC27151@davidb.org> <87y8tvxg9p.dlv@wanadoo.fr> Organization: mosthagloups X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ens-notes1/ENS-LSH(Release 5.0.10 |March 22, 2002) at 02/12/2003 18:57:44, Serialize by Router on ens-notes1/ENS-LSH(Release 5.0.10 |March 22, 2002) at 02/12/2003 18:57:46, Serialize complete at 02/12/2003 18:57:46 Content-Type: multipart/mixed; boundary="Multipart=_Tue__2_Dec_2003_18_57_01_+0100_Kb9GEuvXr8+W_kxa" X-Loop: caml-list@inria.fr X-Spam: no; 0.00; damien:01 damien:01 ens-lyon:01 caml-list:01 ocamldep:01 -pack:01 toto:01 ocamldep:01 toto:01 dependencies:01 dependencies:01 exists:01 exists:01 remi:01 vanicat:01 X-Attachments: name="ocamldep.diff" name="ocamldep.diff" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is a multi-part message in MIME format. --Multipart=_Tue__2_Dec_2003_18_57_01_+0100_Kb9GEuvXr8+W_kxa Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII On Tue, 02 Dec 2003 18:48:18 +0100 Remi Vanicat wrote: > You could try to look at what the OcamlMakefile do for ocamllex and > ocamlyacc generated ml file. I had the same problem with packages (-pack), but since there is no source file at all, one cannot do something like what does OCamlMakefile. Currently, I do "touch toto.ml; ocamldep ...; rm toto.ml" but I've also written the attached small patch to ocamldep, which add an option "-f ", allowing the user to force some dependencies to be generated even if there is no .ml[i] file. Hope this help, damien --Multipart=_Tue__2_Dec_2003_18_57_01_+0100_Kb9GEuvXr8+W_kxa Content-Transfer-Encoding: 7bit Content-Type: text/plain; name="ocamldep.diff" Content-Disposition: attachment; filename="ocamldep.diff" 26a27 > let additional_dependencies = ref ([] : string list) 41a43,48 > let add_to_dependencies file = > additional_dependencies := file :: !additional_dependencies > > let dependency_exists file = > List.mem file !additional_dependencies || Sys.file_exists file > 55c62,64 < find_in_path !load_path --- > if List.mem name !additional_dependencies then name > else if List.mem uname !additional_dependencies then uname > else find_in_path !load_path 212c221 < let usage = "Usage: ocamldep [-I ] [-native] " --- > let usage = "Usage: ocamldep [-I ] [-f ] [-native] " 219a229,230 > "-f", Arg.String add_to_dependencies, > " Generate dependencies against even if it doesn't exist"; --Multipart=_Tue__2_Dec_2003_18_57_01_+0100_Kb9GEuvXr8+W_kxa-- ------------------- 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