author | morphbr |
Mon Jun 04 12:30:07 2007 +0100 (2007-06-04) | |
branch | trunk |
changeset 742 | fe8ddffd7f5c |
permissions | -rw-r--r-- |
leo_sobral@1 | 1 |
# Copyright (C) 2004 Oren Ben-Kiki |
leo_sobral@1 | 2 |
# This file is distributed under the same terms as the Automake macro files. |
leo_sobral@1 | 3 |
|
leo_sobral@1 | 4 |
# Generate automatic documentation using Doxygen. Goals and variables values |
leo_sobral@1 | 5 |
# are controlled by the various DX_COND_??? conditionals set by autoconf. |
leo_sobral@1 | 6 |
# |
leo_sobral@1 | 7 |
# The provided goals are: |
leo_sobral@1 | 8 |
# doxygen-doc: Generate all doxygen documentation. |
leo_sobral@1 | 9 |
# doxygen-run: Run doxygen, which will generate some of the documentation |
leo_sobral@1 | 10 |
# (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post |
leo_sobral@1 | 11 |
# processing required for the rest of it (PS, PDF, and some MAN). |
leo_sobral@1 | 12 |
# doxygen-man: Rename some doxygen generated man pages. |
leo_sobral@1 | 13 |
# doxygen-ps: Generate doxygen PostScript documentation. |
leo_sobral@1 | 14 |
# doxygen-pdf: Generate doxygen PDF documentation. |
leo_sobral@1 | 15 |
# |
leo_sobral@1 | 16 |
# Note that by default these are not integrated into the automake goals. If |
leo_sobral@1 | 17 |
# doxygen is used to generate man pages, you can achieve this integration by |
leo_sobral@1 | 18 |
# setting man3_MANS to the list of man pages generated and then adding the |
leo_sobral@1 | 19 |
# dependency: |
leo_sobral@1 | 20 |
# |
leo_sobral@1 | 21 |
# $(man3_MANS): doxygen-doc |
leo_sobral@1 | 22 |
# |
leo_sobral@1 | 23 |
# This will cause make to run doxygen and generate all the documentation. |
leo_sobral@1 | 24 |
# |
leo_sobral@1 | 25 |
# The following variable is intended for use in Makefile.am: |
leo_sobral@1 | 26 |
# |
leo_sobral@1 | 27 |
# DX_CLEANFILES = everything to clean. |
leo_sobral@1 | 28 |
# |
leo_sobral@1 | 29 |
# This is usually added to MOSTLYCLEANFILES. |
leo_sobral@1 | 30 |
|
leo_sobral@1 | 31 |
## --------------------------------- ## |
leo_sobral@1 | 32 |
## Format-independent Doxygen rules. ## |
leo_sobral@1 | 33 |
## --------------------------------- ## |
leo_sobral@1 | 34 |
|
leo_sobral@1 | 35 |
if DX_COND_doc |
leo_sobral@1 | 36 |
|
leo_sobral@1 | 37 |
## ------------------------------- ## |
leo_sobral@1 | 38 |
## Rules specific for HTML output. ## |
leo_sobral@1 | 39 |
## ------------------------------- ## |
leo_sobral@1 | 40 |
|
leo_sobral@1 | 41 |
if DX_COND_html |
leo_sobral@1 | 42 |
|
leo_sobral@1 | 43 |
DX_CLEAN_HTML = @DX_DOCDIR@/html |
leo_sobral@1 | 44 |
|
leo_sobral@1 | 45 |
endif DX_COND_html |
leo_sobral@1 | 46 |
|
leo_sobral@1 | 47 |
## ------------------------------ ## |
leo_sobral@1 | 48 |
## Rules specific for CHM output. ## |
leo_sobral@1 | 49 |
## ------------------------------ ## |
leo_sobral@1 | 50 |
|
leo_sobral@1 | 51 |
if DX_COND_chm |
leo_sobral@1 | 52 |
|
leo_sobral@1 | 53 |
DX_CLEAN_CHM = @DX_DOCDIR@/chm |
leo_sobral@1 | 54 |
|
leo_sobral@1 | 55 |
if DX_COND_chi |
leo_sobral@1 | 56 |
|
leo_sobral@1 | 57 |
DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi |
leo_sobral@1 | 58 |
|
leo_sobral@1 | 59 |
endif DX_COND_chi |
leo_sobral@1 | 60 |
|
leo_sobral@1 | 61 |
endif DX_COND_chm |
leo_sobral@1 | 62 |
|
leo_sobral@1 | 63 |
## ------------------------------ ## |
leo_sobral@1 | 64 |
## Rules specific for MAN output. ## |
leo_sobral@1 | 65 |
## ------------------------------ ## |
leo_sobral@1 | 66 |
|
leo_sobral@1 | 67 |
if DX_COND_man |
leo_sobral@1 | 68 |
|
leo_sobral@1 | 69 |
DX_CLEAN_MAN = @DX_DOCDIR@/man |
leo_sobral@1 | 70 |
|
leo_sobral@1 | 71 |
endif DX_COND_man |
leo_sobral@1 | 72 |
|
leo_sobral@1 | 73 |
## ------------------------------ ## |
leo_sobral@1 | 74 |
## Rules specific for RTF output. ## |
leo_sobral@1 | 75 |
## ------------------------------ ## |
leo_sobral@1 | 76 |
|
leo_sobral@1 | 77 |
if DX_COND_rtf |
leo_sobral@1 | 78 |
|
leo_sobral@1 | 79 |
DX_CLEAN_RTF = @DX_DOCDIR@/rtf |
leo_sobral@1 | 80 |
|
leo_sobral@1 | 81 |
endif DX_COND_rtf |
leo_sobral@1 | 82 |
|
leo_sobral@1 | 83 |
## ------------------------------ ## |
leo_sobral@1 | 84 |
## Rules specific for XML output. ## |
leo_sobral@1 | 85 |
## ------------------------------ ## |
leo_sobral@1 | 86 |
|
leo_sobral@1 | 87 |
if DX_COND_xml |
leo_sobral@1 | 88 |
|
leo_sobral@1 | 89 |
DX_CLEAN_XML = @DX_DOCDIR@/xml |
leo_sobral@1 | 90 |
|
leo_sobral@1 | 91 |
endif DX_COND_xml |
leo_sobral@1 | 92 |
|
leo_sobral@1 | 93 |
## ----------------------------- ## |
leo_sobral@1 | 94 |
## Rules specific for PS output. ## |
leo_sobral@1 | 95 |
## ----------------------------- ## |
leo_sobral@1 | 96 |
|
leo_sobral@1 | 97 |
if DX_COND_ps |
leo_sobral@1 | 98 |
|
leo_sobral@1 | 99 |
DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps |
leo_sobral@1 | 100 |
|
leo_sobral@1 | 101 |
DX_PS_GOAL = doxygen-ps |
leo_sobral@1 | 102 |
|
leo_sobral@1 | 103 |
doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps |
leo_sobral@1 | 104 |
|
leo_sobral@1 | 105 |
@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag |
leo_sobral@1 | 106 |
cd @DX_DOCDIR@/latex; \ |
leo_sobral@1 | 107 |
rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ |
leo_sobral@1 | 108 |
$(DX_LATEX) refman.tex; \ |
leo_sobral@1 | 109 |
$(MAKEINDEX_PATH) refman.idx; \ |
leo_sobral@1 | 110 |
$(DX_LATEX) refman.tex; \ |
leo_sobral@1 | 111 |
countdown=5; \ |
leo_sobral@1 | 112 |
while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ |
leo_sobral@1 | 113 |
refman.log > /dev/null 2>&1 \ |
leo_sobral@1 | 114 |
&& test $$countdown -gt 0; do \ |
leo_sobral@1 | 115 |
$(DX_LATEX) refman.tex; \ |
leo_sobral@1 | 116 |
countdown=`expr $$countdown - 1`; \ |
leo_sobral@1 | 117 |
done; \ |
leo_sobral@1 | 118 |
$(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi |
leo_sobral@1 | 119 |
|
leo_sobral@1 | 120 |
endif DX_COND_ps |
leo_sobral@1 | 121 |
|
leo_sobral@1 | 122 |
## ------------------------------ ## |
leo_sobral@1 | 123 |
## Rules specific for PDF output. ## |
leo_sobral@1 | 124 |
## ------------------------------ ## |
leo_sobral@1 | 125 |
|
leo_sobral@1 | 126 |
if DX_COND_pdf |
leo_sobral@1 | 127 |
|
leo_sobral@1 | 128 |
DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf |
leo_sobral@1 | 129 |
|
leo_sobral@1 | 130 |
DX_PDF_GOAL = doxygen-pdf |
leo_sobral@1 | 131 |
|
leo_sobral@1 | 132 |
doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf |
leo_sobral@1 | 133 |
|
leo_sobral@1 | 134 |
@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag |
leo_sobral@1 | 135 |
cd @DX_DOCDIR@/latex; \ |
leo_sobral@1 | 136 |
rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ |
leo_sobral@1 | 137 |
$(DX_PDFLATEX) refman.tex; \ |
leo_sobral@1 | 138 |
$(DX_MAKEINDEX) refman.idx; \ |
leo_sobral@1 | 139 |
$(DX_PDFLATEX) refman.tex; \ |
leo_sobral@1 | 140 |
countdown=5; \ |
leo_sobral@1 | 141 |
while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ |
leo_sobral@1 | 142 |
refman.log > /dev/null 2>&1 \ |
leo_sobral@1 | 143 |
&& test $$countdown -gt 0; do \ |
leo_sobral@1 | 144 |
$(DX_PDFLATEX) refman.tex; \ |
leo_sobral@1 | 145 |
countdown=`expr $$countdown - 1`; \ |
leo_sobral@1 | 146 |
done; \ |
leo_sobral@1 | 147 |
mv refman.pdf ../@PACKAGE@.pdf |
leo_sobral@1 | 148 |
|
leo_sobral@1 | 149 |
endif DX_COND_pdf |
leo_sobral@1 | 150 |
|
leo_sobral@1 | 151 |
## ------------------------------------------------- ## |
leo_sobral@1 | 152 |
## Rules specific for LaTeX (shared for PS and PDF). ## |
leo_sobral@1 | 153 |
## ------------------------------------------------- ## |
leo_sobral@1 | 154 |
|
leo_sobral@1 | 155 |
if DX_COND_latex |
leo_sobral@1 | 156 |
|
leo_sobral@1 | 157 |
DX_CLEAN_LATEX = @DX_DOCDIR@/latex |
leo_sobral@1 | 158 |
|
leo_sobral@1 | 159 |
endif DX_COND_latex |
leo_sobral@1 | 160 |
|
leo_sobral@1 | 161 |
.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) |
leo_sobral@1 | 162 |
|
leo_sobral@1 | 163 |
.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) |
leo_sobral@1 | 164 |
|
leo_sobral@1 | 165 |
doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag |
leo_sobral@1 | 166 |
|
leo_sobral@1 | 167 |
doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) |
leo_sobral@1 | 168 |
|
leo_sobral@1 | 169 |
@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) |
leo_sobral@1 | 170 |
rm -rf @DX_DOCDIR@ |
leo_sobral@1 | 171 |
$(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) |
leo_sobral@1 | 172 |
|
leo_sobral@1 | 173 |
DX_CLEANFILES = \ |
leo_sobral@1 | 174 |
@DX_DOCDIR@/@PACKAGE@.tag \ |
leo_sobral@1 | 175 |
-r \ |
leo_sobral@1 | 176 |
$(DX_CLEAN_HTML) \ |
leo_sobral@1 | 177 |
$(DX_CLEAN_CHM) \ |
leo_sobral@1 | 178 |
$(DX_CLEAN_CHI) \ |
leo_sobral@1 | 179 |
$(DX_CLEAN_MAN) \ |
leo_sobral@1 | 180 |
$(DX_CLEAN_RTF) \ |
leo_sobral@1 | 181 |
$(DX_CLEAN_XML) \ |
leo_sobral@1 | 182 |
$(DX_CLEAN_PS) \ |
leo_sobral@1 | 183 |
$(DX_CLEAN_PDF) \ |
leo_sobral@1 | 184 |
$(DX_CLEAN_LATEX) |
leo_sobral@1 | 185 |
|
leo_sobral@1 | 186 |
endif DX_COND_doc |