Jeff Thompson | ca45e55 | 2013-06-26 17:40:06 -0700 | [diff] [blame^] | 1 | # 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 | |
| 7 | if DX_COND_doc |
| 8 | |
| 9 | ## ------------------------------- ## |
| 10 | ## Rules specific for HTML output. ## |
| 11 | ## ------------------------------- ## |
| 12 | |
| 13 | if DX_COND_html |
| 14 | |
| 15 | DX_CLEAN_HTML = @DX_DOCDIR@/html |
| 16 | |
| 17 | endif DX_COND_html |
| 18 | |
| 19 | ## ------------------------------ ## |
| 20 | ## Rules specific for CHM output. ## |
| 21 | ## ------------------------------ ## |
| 22 | |
| 23 | if DX_COND_chm |
| 24 | |
| 25 | DX_CLEAN_CHM = @DX_DOCDIR@/chm |
| 26 | |
| 27 | if DX_COND_chi |
| 28 | |
| 29 | DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi |
| 30 | |
| 31 | endif DX_COND_chi |
| 32 | |
| 33 | endif DX_COND_chm |
| 34 | |
| 35 | ## ------------------------------ ## |
| 36 | ## Rules specific for MAN output. ## |
| 37 | ## ------------------------------ ## |
| 38 | |
| 39 | if DX_COND_man |
| 40 | |
| 41 | DX_CLEAN_MAN = @DX_DOCDIR@/man |
| 42 | |
| 43 | endif DX_COND_man |
| 44 | |
| 45 | ## ------------------------------ ## |
| 46 | ## Rules specific for RTF output. ## |
| 47 | ## ------------------------------ ## |
| 48 | |
| 49 | if DX_COND_rtf |
| 50 | |
| 51 | DX_CLEAN_RTF = @DX_DOCDIR@/rtf |
| 52 | |
| 53 | endif DX_COND_rtf |
| 54 | |
| 55 | ## ------------------------------ ## |
| 56 | ## Rules specific for XML output. ## |
| 57 | ## ------------------------------ ## |
| 58 | |
| 59 | if DX_COND_xml |
| 60 | |
| 61 | DX_CLEAN_XML = @DX_DOCDIR@/xml |
| 62 | |
| 63 | endif DX_COND_xml |
| 64 | |
| 65 | ## ----------------------------- ## |
| 66 | ## Rules specific for PS output. ## |
| 67 | ## ----------------------------- ## |
| 68 | |
| 69 | if DX_COND_ps |
| 70 | |
| 71 | DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps |
| 72 | |
| 73 | DX_PS_GOAL = doxygen-ps |
| 74 | |
| 75 | doxygen-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 | |
| 92 | endif DX_COND_ps |
| 93 | |
| 94 | ## ------------------------------ ## |
| 95 | ## Rules specific for PDF output. ## |
| 96 | ## ------------------------------ ## |
| 97 | |
| 98 | if DX_COND_pdf |
| 99 | |
| 100 | DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf |
| 101 | |
| 102 | DX_PDF_GOAL = doxygen-pdf |
| 103 | |
| 104 | doxygen-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 | |
| 121 | endif DX_COND_pdf |
| 122 | |
| 123 | ## ------------------------------------------------- ## |
| 124 | ## Rules specific for LaTeX (shared for PS and PDF). ## |
| 125 | ## ------------------------------------------------- ## |
| 126 | |
| 127 | if DX_COND_latex |
| 128 | |
| 129 | DX_CLEAN_LATEX = @DX_DOCDIR@/latex |
| 130 | |
| 131 | endif 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 | |
| 137 | doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag |
| 138 | |
| 139 | doxygen-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 | |
| 145 | DX_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 | |
| 158 | endif DX_COND_doc |