Expand Haddock to run over test files as well
authorIustin Pop <iustin@google.com>
Tue, 5 Mar 2013 13:07:50 +0000 (14:07 +0100)
committerIustin Pop <iustin@google.com>
Tue, 5 Mar 2013 15:53:21 +0000 (16:53 +0100)
commit7ddd8e4cb911e62f72c0505a0f21c0e13b2a2d35
tree802ca5fc0d0d6113c5509f959032214f164f0b39
parentdde85e1ee1c4baa6f9d182e9456ecae9a2e19738
Expand Haddock to run over test files as well

This patch does multiple enhancements to the way we build the Haddock
docs, motivated by the fact that if we don't run Haddock over test
files as well, bad formatting can be submitted and will accumulate
over time (without any checks).

The patch does:

- replace manual built ALL_APIDOC_HS_DIRS with automatically built one
  (from HS_DIRS)
- change Haddock so that it runs from the top directory (instead of
  from src/)
- change HsColour target file to be built via bash parameter
  substitution, rather than sed (I don't know how to do it in one go,
  so I use 2 intermediate variables)
- change 'hs-apidoc' target so that it depends on the real target
  file; in case no source file has been modified, running 'make
  hs-apidoc' twice will not result in two runs
- run HsColour/Haddock under en_US.UTF-8 locale, otherwise they can't
  parse correctly the Unicode chars in the test files

Additionally, wrong formatting (oops) in a test file has been
corrected.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Makefile.am
test/hs/Test/Ganeti/BasicTypes.hs