Browse thread
ocamlbuild and subdirectories
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Nicolas Pouillard <nicolas.pouillard@g...> |
| Subject: | Re: [Caml-list] ocamlbuild and subdirectories |
On 5/25/07, Daniel Bünzli <daniel.buenzli@epfl.ch> wrote: > > 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 The link feature was made to don't loose the user and help him to understand the _build directory system. However when one become more experienced I advise to hunt directly in the _build directory. You can even forbid ocamlbuild to make these links with the flag -no-links or the option Options.make_links. > > > ocamlbuild -quiet -I src test/test.native -- > > > ocamlbuild -quiet -I src testalt/test.native -- > > to launch its executables. This avoids any symbolic link confusion. In a prototyping/scripting mode running directly them is really nice. > 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). If you want the _log to be in _build, just say it (-log _build/_log). For the emacs mode since both authors don't use emacs we don't have ported yet. Damien Doligez will do it but you can also send patches ;) Regards, -- Nicolas Pouillard