1 # ---------------------------------------------------------------------------
2 # Licensed to the Apache Software Foundation (ASF) under one or more
3 # contributor license agreements. See the NOTICE file distributed with
4 # this work for additional information regarding copyright ownership.
5 # The ASF licenses this file to You under the Apache License, Version 2.0
6 # (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ---------------------------------------------------------------------------
18 # Copyright (C) 2004 Oren Ben-Kiki
19 # This file is distributed under the same terms as the Automake macro files.
21 # Generate automatic documentation using Doxygen. Goals and variables values
22 # are controlled by the various DX_COND_??? conditionals set by autoconf.
24 # The provided goals are:
25 # doxygen-doc: Generate all doxygen documentation.
26 # doxygen-run: Run doxygen, which will generate some of the documentation
27 # (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post
28 # processing required for the rest of it (PS, PDF, and some MAN).
29 # doxygen-man: Rename some doxygen generated man pages.
30 # doxygen-ps: Generate doxygen PostScript documentation.
31 # doxygen-pdf: Generate doxygen PDF documentation.
33 # Note that by default these are not integrated into the automake goals. If
34 # doxygen is used to generate man pages, you can achieve this integration by
35 # setting man3_MANS to the list of man pages generated and then adding the
38 # $(man3_MANS): doxygen-doc
40 # This will cause make to run doxygen and generate all the documentation.
42 # The following variable is intended for use in Makefile.am:
44 # DX_CLEANFILES = everything to clean.
46 # This is usually added to MOSTLYCLEANFILES.
48 ## --------------------------------- ##
49 ## Format-independent Doxygen rules. ##
50 ## --------------------------------- ##
54 ## ------------------------------- ##
55 ## Rules specific for HTML output. ##
56 ## ------------------------------- ##
60 DX_CLEAN_HTML = @DX_DOCDIR@/html
64 ## ------------------------------ ##
65 ## Rules specific for CHM output. ##
66 ## ------------------------------ ##
70 DX_CLEAN_CHM = @DX_DOCDIR@/chm
74 DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi
80 ## ------------------------------ ##
81 ## Rules specific for MAN output. ##
82 ## ------------------------------ ##
86 DX_CLEAN_MAN = @DX_DOCDIR@/man
90 ## ------------------------------ ##
91 ## Rules specific for RTF output. ##
92 ## ------------------------------ ##
96 DX_CLEAN_RTF = @DX_DOCDIR@/rtf
100 ## ------------------------------ ##
101 ## Rules specific for XML output. ##
102 ## ------------------------------ ##
106 DX_CLEAN_XML = @DX_DOCDIR@/xml
110 ## ----------------------------- ##
111 ## Rules specific for PS output. ##
112 ## ----------------------------- ##
116 DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps
118 DX_PS_GOAL = doxygen-ps
120 doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
122 @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag
123 cd @DX_DOCDIR@/latex; \
124 rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
125 $(DX_LATEX) refman.tex; \
126 $(MAKEINDEX_PATH) refman.idx; \
127 $(DX_LATEX) refman.tex; \
129 while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
130 refman.log > /dev/null 2>&1 \
131 && test $$countdown -gt 0; do \
132 $(DX_LATEX) refman.tex; \
133 countdown=`expr $$countdown - 1`; \
135 $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi
139 ## ------------------------------ ##
140 ## Rules specific for PDF output. ##
141 ## ------------------------------ ##
145 DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf
147 DX_PDF_GOAL = doxygen-pdf
149 doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf
151 @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag
152 cd @DX_DOCDIR@/latex; \
153 rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
154 $(DX_PDFLATEX) refman.tex; \
155 $(DX_MAKEINDEX) refman.idx; \
156 $(DX_PDFLATEX) refman.tex; \
158 while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
159 refman.log > /dev/null 2>&1 \
160 && test $$countdown -gt 0; do \
161 $(DX_PDFLATEX) refman.tex; \
162 countdown=`expr $$countdown - 1`; \
164 mv refman.pdf ../@PACKAGE@.pdf
168 ## ------------------------------------------------- ##
169 ## Rules specific for LaTeX (shared for PS and PDF). ##
170 ## ------------------------------------------------- ##
174 DX_CLEAN_LATEX = @DX_DOCDIR@/latex
178 .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
180 .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
182 doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
184 doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
186 @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
188 $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
191 @DX_DOCDIR@/@PACKAGE@.tag \