
currently we get DocsOk even when no documentation is created because
the package doesn't contain any buildable library,
with the following two patches "cabal install" will check and avoid
running "setup haddock" if no documentation is going to be created
returning DocsNotTried.
A possible downside is that we don't get the warning that suggests
--executables anymore from "cabal install" (it's still printed when
running "cabal haddock"),
if that has to be restored we can make hasDocsToBuild print the
warning, or make it return the String instead of Bool.
We could also make the report even more accurate by making
hadDocsToBuild return a list of the components of the package for
which it'll produce documentation.
The whole thing is a bit nasty without a specified semantic for the
Setup haddock command to be respected by Custom build systems.
Mon Jul 6 11:23:55 CEST 2009 Andrea Vezzosi