Merge trunk version 207649 into gupc branch.
[official-gcc.git] / libgupc / doxygen-include.am
blobc86cdbfba7ca70522f9c8c7e77364a683aa8807b
1 # ===========================================================================
2 #      http://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html
3 # ===========================================================================
5 # LICENSE
7 #   Copyright (c) 2009 Oren Ben-Kiki <oren@ben-kiki.org>
9 #   Copying and distribution of this file, with or without modification, are
10 #   permitted in any medium without royalty provided the copyright notice
11 #   and this notice are preserved. This file is offered as-is, without any
12 #   warranty.
14 ## --------------------------------- ##
15 ## Format-independent Doxygen rules. ##
16 ## --------------------------------- ##
18 if DX_COND_doc
19 ## ------------------------------- ##
20 ## Rules specific for HTML output. ##
21 ## ------------------------------- ##
22 if DX_COND_html
23 DX_CLEAN_HTML = @DX_DOCDIR@/html
24 endif DX_COND_html
25 ## ------------------------------ ##
26 ## Rules specific for CHM output. ##
27 ## ------------------------------ ##
28 if DX_COND_chm
29 DX_CLEAN_CHM = @DX_DOCDIR@/chm
30 if DX_COND_chi
31 DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi
32 endif DX_COND_chi
33 endif DX_COND_chm
34 ## ------------------------------ ##
35 ## Rules specific for MAN output. ##
36 ## ------------------------------ ##
37 if DX_COND_man
38 DX_CLEAN_MAN = @DX_DOCDIR@/man
39 endif DX_COND_man
40 ## ------------------------------ ##
41 ## Rules specific for RTF output. ##
42 ## ------------------------------ ##
43 if DX_COND_rtf
44 DX_CLEAN_RTF = @DX_DOCDIR@/rtf
45 endif DX_COND_rtf
46 ## ------------------------------ ##
47 ## Rules specific for XML output. ##
48 ## ------------------------------ ##
49 if DX_COND_xml
50 DX_CLEAN_XML = @DX_DOCDIR@/xml
51 endif DX_COND_xml
52 ## ----------------------------- ##
53 ## Rules specific for PS output. ##
54 ## ----------------------------- ##
55 if DX_COND_ps
56 DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps
57 DX_PS_GOAL = doxygen-ps
58 doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
59 @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag
60         cd @DX_DOCDIR@/latex; \
61         rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
62         $(DX_LATEX) refman.tex; \
63         $(MAKEINDEX_PATH) refman.idx; \
64         $(DX_LATEX) refman.tex; \
65         countdown=5; \
66         while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
67         refman.log > /dev/null 2>&1 \
68         && test $$countdown -gt 0; do \
69         $(DX_LATEX) refman.tex; \
70         countdown=`expr $$countdown - 1`; \
71         done; \
72         $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi
73 endif DX_COND_ps
74 ## ------------------------------ ##
75 ## Rules specific for PDF output. ##
76 ## ------------------------------ ##
77 if DX_COND_pdf
78 DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf
79 DX_PDF_GOAL = doxygen-pdf
80 doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf
81 @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag
82         TEXINPUTS="`pwd`:.:${TEXINPUTS}"; \
83         export  TEXINPUTS; \
84         cd @DX_DOCDIR@/latex; \
85         rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
86         $(DX_PDFLATEX) refman.tex; \
87         $(DX_MAKEINDEX) refman.idx; \
88         $(DX_PDFLATEX) refman.tex; \
89         countdown=5; \
90         while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
91                           refman.log > /dev/null 2>&1 \
92            && test $$countdown -gt 0; do \
93             $(DX_PDFLATEX) refman.tex; \
94             countdown=`expr $$countdown - 1`; \
95         done; \
96         mv refman.pdf ../@PACKAGE@.pdf
97 endif DX_COND_pdf
98 ## ------------------------------------------------- ##
99 ## Rules specific for LaTeX (shared for PS and PDF). ##
100 ## ------------------------------------------------- ##
101 if DX_COND_latex
102 DX_CLEAN_LATEX = @DX_DOCDIR@/latex
103 endif DX_COND_latex
104 .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
105 .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
106 doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
107 doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
108 @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
109         rm -rf @DX_DOCDIR@
110         $(DX_ENV) $(DX_DOXYGEN) $(DX_CONFIG)
111 DX_CLEANFILES = \
112     @DX_DOCDIR@/@PACKAGE@.tag \
113     -r \
114     $(DX_CLEAN_HTML) \
115     $(DX_CLEAN_CHM) \
116     $(DX_CLEAN_CHI) \
117     $(DX_CLEAN_MAN) \
118     $(DX_CLEAN_RTF) \
119     $(DX_CLEAN_XML) \
120     $(DX_CLEAN_PS) \
121     $(DX_CLEAN_PDF) \
122     $(DX_CLEAN_LATEX)
123 endif DX_COND_doc