alobbs/libhpack — pull request #7 by Akrog (2014-02-24 16:15:02+00:00)
Title: Fix #6 - Several documentation generation issues

https://github.com/alobbs/libhpack/issues/6

There are several issues with the generation of the documentation:
- *make doc* is broken.
- *make all* does not generate the documentation.
- Docs not be generated if *make all* or *make debug* haven't been run.
- Options *BUILD_DOCS* and *BUILD_TESTS* don't work.

*make doc* issue is easily fixed adding *doc* to *.PHONY*.

*make all* not generating the documentation is fixed by creating a
custom target *doc* in cmake that is added to *BUILD_ALL* if
*BUILD_DOCS* is set.
**Side Effects**: Instead of using different custom targets (*docs* and
*docs2*) we now have only 1 custom target (*doc*) and everyone
generating docs needs to add to its dependencies. That way you don't
need to make changes to the *Makefile* if a new doc generator is added.

To be able to run *make doc* without having run *make all* or *make
debug* earlier I have chosen to check for the existance of
*build/Makefile* instead of adding a dependence to all to avoid having
to compile everything just to generate the documentation.

Parameters *BUILD_DOCS* and *BUILD_TESTS* were not being passed down to
cmake, now they are.