Autotools and doxygen

Short one this time:

I needed to integrate doxygen with my current code source. Turns out it is pretty easy.

Use doxygen to generate a config file (OK I copied one from another project)

doxygen -g project-dox.conf.in

Note the .in at the end. autoconf/automake will generate the correct code to convert something ending in .in to the correct file.

Add this config file to configure.ac

AC_CONFIG_FILES([Makefile project-dox.conf]

along with whatever other files get listed there for your project.

Our build system builds in the $project/build directory, but leave the source back in the original directory. To get this in sync, I modified my project-dox.conf.in

INPUT = @srcdir@

Assuming doxygen is installed, of course.

2 thoughts on “Autotools and doxygen

  1. and what about the installation of generated documentation?
    Because I read on mailing lists that it’s not trivial to integrate doxygen and autotools…

  2. Been about a year and a half since I dealt with this, but what do you mean by “installation”? You shouldn’t treat the docs any different than any other generated file. As it is HTML, you can just read them in place. For a more polished end product, you would make a doc .deb file.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.