On Tue, Jun 05, 2007 at 12:49:25AM +0200, Vincent Aravantinos wrote:
>
> Le 5 juin 07 à 00:06, Richard Jones a écrit :
>
> > On Sun, Jun 03, 2007 at 11:34:40PM +0100, Luke McCarthy wrote:
> >> Problem 1: ocamlc insists on the source and object files being in
> >> the same
> >> directory. I like to keep all the object files in a parallel
> >> directory
> >> structure separate from the source files. But I cannot get ocamlc to
> >> compile modules whose cmi files are in another directory even when
> >> specified with -I
> >
> > As Mathias said, I don't think there's a good solution to this. Is it
> > really necessary?
> >
> >> Problem 2: Object files must be specified in dependency order to
> >> build the
> >> final binary (unlike GCC). This means I have to manually list the
> >> files in
> >> proper order instead of simply $(wildcard *.cmo). How can I get the
> >> dependency information automatically?
> >
> > For libraries, definitely install findlib (the command is called
> > 'ocamlfind') and use something like 'ocamlfind ocamlc -package
> > unix,str,netstring ...' when building. For your own files, just list
> > them in the right order, and use ocamldep to make sure that everything
> > is built.
> >
> > You might want to grab one or more of my projects from
> > http://merjis.com/developers/ and take a look at the Makefile. I have
> > a pretty consistent system of standard rules which I found works well.
>
> Something I didn't understood : aren't those 2 points solved by
> ocamlbuild ? Or maybe I did not understood the question ?
I haven't really looked at ocamlbuild, but possibly it is.
Rich.
--
Richard Jones
Red Hat
.