blob: 65f65150791420bd9b01bc86b1bb3083acaafa48 [file] [log] [blame]
Jeff Thompsonca45e552013-06-26 17:40:06 -07001# This file is copied from http://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html
2
3## --------------------------------- ##
4## Format-independent Doxygen rules. ##
5## --------------------------------- ##
6
7if DX_COND_doc
8
9## ------------------------------- ##
10## Rules specific for HTML output. ##
11## ------------------------------- ##
12
13if DX_COND_html
14
15DX_CLEAN_HTML = @DX_DOCDIR@/html
16
17endif DX_COND_html
18
19## ------------------------------ ##
20## Rules specific for CHM output. ##
21## ------------------------------ ##
22
23if DX_COND_chm
24
25DX_CLEAN_CHM = @DX_DOCDIR@/chm
26
27if DX_COND_chi
28
29DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi
30
31endif DX_COND_chi
32
33endif DX_COND_chm
34
35## ------------------------------ ##
36## Rules specific for MAN output. ##
37## ------------------------------ ##
38
39if DX_COND_man
40
41DX_CLEAN_MAN = @DX_DOCDIR@/man
42
43endif DX_COND_man
44
45## ------------------------------ ##
46## Rules specific for RTF output. ##
47## ------------------------------ ##
48
49if DX_COND_rtf
50
51DX_CLEAN_RTF = @DX_DOCDIR@/rtf
52
53endif DX_COND_rtf
54
55## ------------------------------ ##
56## Rules specific for XML output. ##
57## ------------------------------ ##
58
59if DX_COND_xml
60
61DX_CLEAN_XML = @DX_DOCDIR@/xml
62
63endif DX_COND_xml
64
65## ----------------------------- ##
66## Rules specific for PS output. ##
67## ----------------------------- ##
68
69if DX_COND_ps
70
71DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps
72
73DX_PS_GOAL = doxygen-ps
74
75doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
76
77@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag
78 cd @DX_DOCDIR@/latex; \
79 rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
80 $(DX_LATEX) refman.tex; \
81 $(MAKEINDEX_PATH) refman.idx; \
82 $(DX_LATEX) refman.tex; \
83 countdown=5; \
84 while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
85 refman.log > /dev/null 2>&1 \
86 && test $$countdown -gt 0; do \
87 $(DX_LATEX) refman.tex; \
88 countdown=`expr $$countdown - 1`; \
89 done; \
90 $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi
91
92endif DX_COND_ps
93
94## ------------------------------ ##
95## Rules specific for PDF output. ##
96## ------------------------------ ##
97
98if DX_COND_pdf
99
100DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf
101
102DX_PDF_GOAL = doxygen-pdf
103
104doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf
105
106@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag
107 cd @DX_DOCDIR@/latex; \
108 rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
109 $(DX_PDFLATEX) refman.tex; \
110 $(DX_MAKEINDEX) refman.idx; \
111 $(DX_PDFLATEX) refman.tex; \
112 countdown=5; \
113 while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
114 refman.log > /dev/null 2>&1 \
115 && test $$countdown -gt 0; do \
116 $(DX_PDFLATEX) refman.tex; \
117 countdown=`expr $$countdown - 1`; \
118 done; \
119 mv refman.pdf ../@PACKAGE@.pdf
120
121endif DX_COND_pdf
122
123## ------------------------------------------------- ##
124## Rules specific for LaTeX (shared for PS and PDF). ##
125## ------------------------------------------------- ##
126
127if DX_COND_latex
128
129DX_CLEAN_LATEX = @DX_DOCDIR@/latex
130
131endif DX_COND_latex
132
133.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
134
135.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
136
137doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
138
139doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
140
141@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
142 rm -rf @DX_DOCDIR@
143 $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
144
145DX_CLEANFILES = \
146 @DX_DOCDIR@/@PACKAGE@.tag \
147 -r \
148 $(DX_CLEAN_HTML) \
149 $(DX_CLEAN_CHM) \
150 $(DX_CLEAN_CHI) \
151 $(DX_CLEAN_MAN) \
152 $(DX_CLEAN_RTF) \
153 $(DX_CLEAN_XML) \
154 $(DX_CLEAN_PS) \
155 $(DX_CLEAN_PDF) \
156 $(DX_CLEAN_LATEX)
157
158endif DX_COND_doc