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 EAA03850; Sun, 23 Nov 2003 04:25:40 +0100 (MET) 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 EAA03633 for ; Sun, 23 Nov 2003 04:25:38 +0100 (MET) Received: from smtp.siren.ocn.ne.jp (siren.ocn.ne.jp [211.129.13.170]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAN3Pa109060 for ; Sun, 23 Nov 2003 04:25:36 +0100 (MET) Received: from PWARP (p2007-ipad08kyoto.kyoto.ocn.ne.jp [221.189.199.7]) by smtp.siren.ocn.ne.jp (Postfix) with SMTP id 8DEFC2895; Sun, 23 Nov 2003 12:25:33 +0900 (JST) Message-ID: <003e01c3b171$71b4a1f0$0274a8c0@PWARP> From: "Nicolas Cannasse" To: "David Brown" , "skaller" Cc: , "David Brown" , "Martin Jambon" , References: <20031120195614.GB441@gallu.homelinux.org> <000f01c3afd1$30033c90$0274a8c0@PWARP> <20031121052549.GA8599@davidb.org> <008301c3aff3$1030e760$0274a8c0@PWARP> <20031121064950.GA836@gallu.homelinux.org> <1069431167.5426.45.camel@pelican> <20031122170852.GA15144@davidb.org> Subject: Re: [Caml-list] Building large and portable projects Date: Sun, 23 Nov 2003 12:25:13 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 hashes:01 hashing:01 hash:01 hashing:01 cannasse:01 ocaml:01 nicolas:01 nicolas:01 cached:01 compiling:03 compiling:03 object:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > For example .c -cc--> .o -link--> exe, we can > > use the cached .o instead of running cc on the > > .c provided the .c is older. > > Older is incorrect, as well. The program should run cc on the .c > provided that the .c is different than the one used to produce the .o. > Timestamps are useful as a cache, but a proper tool will need to use > file hashes, or something to properly detect a file changing. That's true doing a hashing is nice for C, but ocaml compilation is fast enough so maybe the time difference between making the hash and compiling is not so big. Another issue is storing the hashing in a temp file, while you can compare directly time stamps of the object with the source. Actually the only case were hashing is useful compare to timestamps is when a file is only touched ( am I wrong ? ). This is not an average case, and when it's happening juste compiling only this file (without a bunch of .h) seems fast enough. Nicolas Cannasse ------------------- 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