Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Toplevel - loading dependencies
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Florent Monnier <fmonnier@l...>
Subject: Re: [Caml-list] Toplevel - loading dependencies
> If I put everything into one big cma, then I have to recompile it every
> small change. It takes so long time, that it would make no sense to use
> the interpreter at all.

in case you're doing so this way:
ocamlc -o my.cma

this will recompile everything,
but you can use in your makefile:
        ocamlc.opt -c $<
my.cma: mod1.cmo mod2.cmo mod3.cmo mod4.cmo
        ocamlc.opt -a -o $@ $^

then you don't recompile everything, only the modified module

if there are dependencies between modules, just add additional rules:
modfoo.cmo: modbar.cmi