Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlbuild and subdirectories
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] ocamlbuild and subdirectories

Le 25 mai 07 à 14:31, Nicolas Pouillard a écrit :

> Yes our system to move things out of the build is really partial
> (since we still don't what a good way will be). I often use a shell
> script to install things, or start it directly from the build.

Regarding executables I think the symbolic link should not be put in  
the directory in which ocamlbuild is invoked. Either put it in the  
directory in which the target ml file is or do not create links at  
all. In a case I have a directory layout conceptually similar to this :

> > ls */*
> src/a.ml                test/test.ml
> src/a.mli               testalt/test.ml

So each time I build one of the test executable with

> > ocamlbuild -I src test/test.native

or

> > ocamlbuild -I src testalt/test.native

it changes the symbolic link test.native in the root directory.  
However I would like to have both executables at hand hence I'd  
prefer the symbolic links to be respectively created in test and  
testalt. It is annoying because I never remember which test I last  
built when I invoke test.native and often end up with the wrong one.

But putting links in subdirectories means more work for ocamlbuild - 
clean. Maybe the best alternative is to not create symbolic links at  
all and force the user to hunt in _build or to use

> > ocamlbuild -quiet -I src test/test.native --
> > ocamlbuild -quiet -I src testalt/test.native --

to launch its executables. This avoids any symbolic link confusion.


Le 25 mai 07 à 14:49, Joel Reymont a écrit :

> I totally love ocamlbuild, btw, I think it's awesome!

I concur, there is something magic about it. But there are minor  
points that annoy me at the moment  (e.g. by default the _log file  
should be written in the _build/ directory, and apparently the emacs  
mode was not updated to look for .annot files in the _build directory).

Best,

Daniel