OCamlPro/typerex — pull request #93 by AltGr (2013-04-09 17:26:05+00:00)
Title: Warning vs Fatal Error for packages that can't be built

This patch fixes the issue with color-mode (!) that failed with fatal error when some packages couldn't be built, even if those weren't needed to compile the demanded targets.

*However*, it still changes the behaviour regarding broken packages, and still **breaks bootstrap for 3.12** at the moment. We need to figure out what we want to do with warnings/errors, and possibly fix the Makefile, before merging (I removed the -no-color option so that the problem doesn't stay hidden).

* Previous behaviour: warnings are printed (at the beginning of compilation) and broken packages are ignored: what is possible is still built, but the warnings may be lost if there is a long build log.
* Behaviour with this patch (and color mode, to keep the backwards compatibility of the no-color mode: this is of course transitional): we don't issue errors *nor warnings* about unrelated packages anymore. But it is a fatal error when a package that is in the current targets can't be built.

The latter is better in my opinion, since warnings should'nt be hidden, but causes problems when the target projects aren't specified, because in that case it will fail if any of them is broken. In particular, some projects in typerex use compiler-libs, which is not available on 3.12 : since the Makefile runs ocp-build without specifying the targets, it will try to build all of them, and completely fail instead of building what it can.

A clean, but maybe somewhat heavy solution would be to have an old-school `./configure` that detects what projects are available, and to always specify the list of projects to ocp-build. Or to choose a different behaviour for failures, for example when the `-k` option is specified.