In my testing this version works ok with and without doxygen, and in and out of tree. But I only tested in Debian jessie (testing), so other tests would be welcome. It's a bit lame that we have to generate doxygen config file snippet on the fly just to support out of tree builds, but doxygen seems to have very limited support for options on the command line. The second two patches are essentially cosmetic, although without patch 3/3 the docs are bit eye-burningly-ugly