ocaml/oasis — pull request #8 by pveber (2012-12-15 19:58:05+00:00)
Title: Incorrect compilation of packed libraries

In its current state, oasis incorrectly compiles packed libraries, which leads to warnings of the form

```
Warning 31: files src/packedlib.cmo and src/packedlib.cma(Packedlib) both define a module named Packedlib
```
When a library is packed, oasis decides to create an mlpack instead of an mllib. However in the absence of an mllib file, ocamlbuild adds some spurious modules in the cma, and those modules may end up being in several cma, or uselessly added when compiling an executable.

More details can be found on the following ticket

https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=1239&group_id=54&atid=291

The proposed fix is to generate an mllib file even when the library is packed. In that case, the generated mllib file contains only the name of the pack, and the mlpack contains the list of all modules in the library. This solves the problem, at least when the project is not setup in dynamic update mode.

Thus this patch is still incomplete, but I wanted to discuss it here before going further. If the fix is accepted in its principle, I have two questions:
- how to apply the same strategy in dynamic update mode
- what is the proper way to get the capitalized names of the pack (see the use of `String.capitalize` in the commit)

Thanks!