doxygen-include.am 5.5 KB

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