aminclude.am 4.6 KB

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