Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Building large and portable projects
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Cannasse <warplayer@f...>
Subject: Re: [Caml-list] Building large and portable projects
> > 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