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
[Caml-list] CMA depend
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-02-16 (19:23)
From: Warp <warplayer@f...>
Subject: [Caml-list] CMA depend
Usually, dependencies are between cmo / cmi, but you can also build a cma by
using :
> ocamlc -a -o file.cma
What about dependencies between this cma file and others ?
The problems here are that :
- a cma can be obtained from more than one ml
- target dependencies can be either cmo cmi OR other cma's ( when using
dynlink ).

I'm actually running a project where I have lots of modules - all dynlinked
and built with a single ML file. Thus are called 'plugins'.
I could have first compile ml to cmo and then cmo to cma , but that does not
sound very reasonable.
So I patched the ocamldep tool, adding :
+    print_dependencies (basename ^ ".cma") byt_deps;
on line 405.
Now it works fine, but I'm not sure that's the best way to do it.
Any other idea ?

BTW, the "-native" ocamldep flag can have some use, but what about a
"-bytecode" flag ?


Bug reports:  FAQ:
To unsubscribe, mail  Archives: