Creating (and installing) doxygen documentation using autotools

I am writing a library (using libtools) where all the API documentation is done using doxygen.

I wonder if there is an easy way to integrate the installation of the generated oxygen documentation into autotools.

I believe that creating documentation should be fairly simple. but as soon as I started doxygen, what is the correct way to get the generated (e.g..). html files in $ (htmldir)?

the problem is that I don’t know (and don’t want to know) what doxygen files are going to create for me, so I cannot list them all in html_DATA

I am drawing something like "html_DATA = html /*.*" - the idea is bad

+3
source share
3 answers

, . , AUTOTOOLS John Calcote pg 246.

configure.ac

AC_CONFIG_FILES([Makefile

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])])

PROJECTDIR/docs

: Doxyfile.in Makefile.am

Substitution, :

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

doxygen.

LATEX_OUTPUT           = latex
PDF_HYPERLINKS         = YES
USE_PDFLATEX           = YES

pdf.

Makefile.am :

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

(, Makefile .)

, . docs. , , - .

+2

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

Add the generated help files to the * dist_doc_DATA * list in Makefile.am so that they are installed.

0
source

All Articles