Question

i'm writing a library (using libtools), where all the API documentation is done using doxygen.

i wonder whether there is an easy way to integrate the installation of the generated doxygen documentation into autotools.

i figure that building the documentation should be easy enough. but once i ran doxygen, what is the proper way to get the generated (e.g.) .html files into $(htmldir)?

the problem seems to be that i don't know (nor do i want to know) which files doxygen is going to create for me, so i cannot really enumerate them all into html_DATA

i figure something like 'html_DATA=html/*.*' is a bad idea

Was it helpful?

Solution

While I do not have much experience with autotools myself, several suggestions are made on this mail thread which may be of use: http://old.nabble.com/How-to-install-doxygen-generated-HTML-documentation--td17029178.html

OTHER TIPS

It might be more compact to use some contributed MACROs. Here I have figure out a simple method based on the examples from the AUTOTOOLS book by John Calcote pg 246.

Add the following to configure.ac just above the

AC_CONFIG_FILES([Makefile

line

AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN"; then
   AC_MSG_WARN([Doxygen not found - continue without Doxygen support])
fi
AC_CHECK_PROGS([DOT], [dot])
if test -z "$DOT"; then
   AC_MSG_ERROR([Doxygen needs dot, please install dot first])
fi
AC_CHECK_PROGS([PDFLATEX], [pdflatex])
if test -z "$PDFLATEX"; then
   AC_MSG_ERROR([Doxygen needs pdflatex program, it is part of TeX http://www.tug.org/texlive/acquire-netinstall.html])
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])])
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Makefile])])

In the PROJECTDIR/docs directory

add two files: Doxyfile.in and Makefile.am

Use Substitution variable for example:

PROJECT_NAME           = @PACKAGE_NAME@
PROJECT_NUMBER         = @PACKAGE_VERSION@
INPUT                  = @top_srcdir@

Then make proper modification to other doxygen configuration fields.

LATEX_OUTPUT           = latex
PDF_HYPERLINKS         = YES
USE_PDFLATEX           = YES

This way you will generate pdf file.

The Makefile.am should be simple:

if HAVE_DOXYGEN
directory = $(top_srcdir)/docs/man/man3

man_MANS = $(directory)

$(directory): doxyfile.stamp

doxyfile.stamp: Doxyfile
    $(DOXYGEN) $^
    cd latex && $(MAKE)
    echo Timestamp > $@

CLEANFILES = doxyfile.stamp

all-local: doxyfile.stamp
clean-local:
    -rm -rf $(top_srcdir)/docs/man

endif

(Make sure you respect Makefile indentation while copying this.)

This seemed to have worked for me. The resulting documentation is generated in the docs folder. Please let me know if I made any mistakes.

I use the macro of Oren Ben-Kiki, see http://www.ben-kiki.org/oren/doxample/ or Google it. The script creates the doxygen documentation in PDF/HTML/man (configurable) format.

Add your generated help files to the *dist_doc_DATA* list in Makefile.am, to have them installed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top