You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

180 lines
6.5KB

  1. #
  2. # "$Id: Makefile 8195 2011-01-05 23:00:33Z AlbrechtS $"
  3. #
  4. # Documentation makefile for the Fast Light Tool Kit (NTK).
  5. #
  6. # Copyright 1998-2010 by Bill Spitzak and others.
  7. #
  8. # This library is free software; you can redistribute it and/or
  9. # modify it under the terms of the GNU Library General Public
  10. # License as published by the Free Software Foundation; either
  11. # version 2 of the License, or (at your option) any later version.
  12. #
  13. # This library is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. # Library General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU Library General Public
  19. # License along with this library; if not, write to the Free Software
  20. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  21. # USA.
  22. #
  23. # Please report all bugs and problems on the following page:
  24. #
  25. # http://www.ntk.org/str.php
  26. #
  27. # Get configuration stuff...
  28. include ../makeinclude
  29. # make sure that all docs are (re-)created independent of missing deps
  30. .PHONY: pdf html refman.pdf
  31. SRC_DOCDIR = ./src
  32. # These are the HTML "source" files...
  33. HTMLFILES = \
  34. $(SRC_DOCDIR)/index.dox \
  35. $(SRC_DOCDIR)/preface.dox \
  36. $(SRC_DOCDIR)/intro.dox \
  37. $(SRC_DOCDIR)/basics.dox \
  38. $(SRC_DOCDIR)/common.dox \
  39. $(SRC_DOCDIR)/editor.dox \
  40. $(SRC_DOCDIR)/drawing.dox \
  41. $(SRC_DOCDIR)/events.dox \
  42. $(SRC_DOCDIR)/subclassing.dox \
  43. $(SRC_DOCDIR)/opengl.dox \
  44. $(SRC_DOCDIR)/fluid.dox \
  45. $(SRC_DOCDIR)/advanced.dox \
  46. $(SRC_DOCDIR)/unicode.dox \
  47. $(SRC_DOCDIR)/enumerations.dox \
  48. $(SRC_DOCDIR)/glut.dox \
  49. $(SRC_DOCDIR)/forms.dox \
  50. $(SRC_DOCDIR)/osissues.dox \
  51. $(SRC_DOCDIR)/migration_1_1.dox \
  52. $(SRC_DOCDIR)/migration_1_3.dox \
  53. $(SRC_DOCDIR)/development.dox \
  54. $(SRC_DOCDIR)/license.dox \
  55. $(SRC_DOCDIR)/examples.dox
  56. MANPAGES = $(SRC_DOCDIR)/ntk.$(CAT3EXT) $(SRC_DOCDIR)/ntk-config.$(CAT1EXT) \
  57. $(SRC_DOCDIR)/fluid.$(CAT1EXT) $(SRC_DOCDIR)/blocks.$(CAT6EXT) \
  58. $(SRC_DOCDIR)/checkers.$(CAT6EXT) $(SRC_DOCDIR)/sudoku.$(CAT6EXT)
  59. all: $(MANPAGES)
  60. # use make dist to create all docs for distribution files
  61. # you need an installed version of doxygen for this
  62. dist: all html pdf
  63. # synonym for dist
  64. alldocs: dist
  65. clean:
  66. $(RM) ntk.pdf refman.pdf
  67. $(RMDIR) html latex
  68. $(RM) *~ *.bck *.bak *.log
  69. $(RM) $(MANPAGES) $(SRC_DOCDIR)/*.0
  70. depend:
  71. install: $(MANPAGES)
  72. echo "Installing documentation files in $(DESTDIR)$(docdir) ..."
  73. -$(INSTALL_DIR) $(DESTDIR)$(docdir)
  74. if test -f html/index.html ; then \
  75. for file in html/* ; do \
  76. $(INSTALL_DATA) $$file $(DESTDIR)$(docdir); \
  77. done \
  78. fi
  79. if test -f ntk.pdf ; then \
  80. echo "Installing ntk.pdf in $(DESTDIR)$(docdir) ..."; \
  81. $(INSTALL_DATA) ntk.pdf $(DESTDIR)$(docdir); \
  82. fi
  83. echo "Installing man pages in $(DESTDIR)$(mandir) ..."
  84. -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat1
  85. $(INSTALL_MAN) $(SRC_DOCDIR)/fluid.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
  86. $(INSTALL_MAN) $(SRC_DOCDIR)/ntk-config.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
  87. -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat3
  88. $(INSTALL_MAN) $(SRC_DOCDIR)/ntk.$(CAT3EXT) $(DESTDIR)$(mandir)/cat3
  89. -$(INSTALL_DIR) $(DESTDIR)$(mandir)/man1
  90. $(INSTALL_MAN) $(SRC_DOCDIR)/fluid.man $(DESTDIR)$(mandir)/man1/fluid.1
  91. $(INSTALL_MAN) $(SRC_DOCDIR)/ntk-config.man $(DESTDIR)$(mandir)/man1/ntk-config.1
  92. -$(INSTALL_DIR) $(DESTDIR)$(mandir)/man3
  93. $(INSTALL_MAN) $(SRC_DOCDIR)/ntk.man $(DESTDIR)$(mandir)/man3/ntk.3
  94. install-linux install-osx:
  95. -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat6
  96. $(INSTALL_MAN) $(SRC_DOCDIR)/blocks.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
  97. $(INSTALL_MAN) $(SRC_DOCDIR)/checkers.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
  98. $(INSTALL_MAN) $(SRC_DOCDIR)/sudoku.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
  99. -$(INSTALL_DIR) $(DESTDIR)$(mandir)/man6
  100. $(INSTALL_MAN) $(SRC_DOCDIR)/blocks.man $(DESTDIR)$(mandir)/man6/blocks.6
  101. $(INSTALL_MAN) $(SRC_DOCDIR)/checkers.man $(DESTDIR)$(mandir)/man6/checkers.6
  102. $(INSTALL_MAN) $(SRC_DOCDIR)/sudoku.man $(DESTDIR)$(mandir)/man6/sudoku.6
  103. uninstall:
  104. $(RMDIR) $(DESTDIR)$(docdir)
  105. $(RM) $(DESTDIR)$(mandir)/cat1/fluid.$(CAT1EXT)
  106. $(RM) $(DESTDIR)$(mandir)/man1/fluid.1
  107. $(RM) $(DESTDIR)$(mandir)/cat1/ntk-config.$(CAT1EXT)
  108. $(RM) $(DESTDIR)$(mandir)/man1/ntk-config.1
  109. $(RM) $(DESTDIR)$(mandir)/cat3/ntk.$(CAT3EXT)
  110. $(RM) $(DESTDIR)$(mandir)/man3/ntk.3
  111. uninstall-linux uninstall-osx:
  112. $(RM) $(DESTDIR)$(mandir)/cat6/blocks.$(CAT6EXT)
  113. $(RM) $(DESTDIR)$(mandir)/cat6/checkers.$(CAT6EXT)
  114. $(RM) $(DESTDIR)$(mandir)/cat6/sudoku.$(CAT6EXT)
  115. $(RM) $(DESTDIR)$(mandir)/man6/blocks.6
  116. $(RM) $(DESTDIR)$(mandir)/man6/checkers.6
  117. $(RM) $(DESTDIR)$(mandir)/man6/sudoku.6
  118. # The HTML files are now generated using doxygen, and this needs
  119. # an installed doxygen version and may take some time, so this target
  120. # is not made by default.
  121. # Use `make html' or `make dist' to create the html docs
  122. html: $(HTMLFILES) Doxyfile
  123. echo "Generating HTML documentation..."
  124. -$(RMDIR) html
  125. -$(INSTALL_DIR) html
  126. -$(DOXYDOC)
  127. if test "x$(DOXYDOC)" = "x" ; then \
  128. echo "Sorry - doxygen not found. Please install doxygen and run configure."; \
  129. fi
  130. test -d html && cp src/tiny.png html/
  131. # this is only used to minimize subversion updates of the online docs
  132. html-online: html
  133. echo "*** Warning: re-create HTML files if you want to build distribution files."
  134. echo "*** Warning: Use 'make html' to re-create the correct HTML files."
  135. echo "Stripping HTML files for online documentation upload..."
  136. ./strip_tags
  137. pdf: refman.pdf
  138. cp -f latex/refman.pdf ntk.pdf
  139. refman.pdf: $(HTMLFILES) Doxybook
  140. -$(RMDIR) latex
  141. echo "Generating PDF documentation ..."
  142. $(DOXYDOC) Doxybook ;\
  143. (cd latex ;\
  144. pdflatex --interaction=nonstopmode refman.tex ;\
  145. makeindex refman.idx ;\
  146. pdflatex --interaction=nonstopmode refman.tex ;\
  147. latex_count=5;\
  148. while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log \
  149. && [ $$latex_count -gt 0 ] ;\
  150. do \
  151. echo "Rerunning latex ..." ;\
  152. pdflatex --interaction=nonstopmode refman.tex ;\
  153. latex_count=`expr $$latex_count - 1` ;\
  154. done ; \
  155. cd ..) > pdfall.log 2>&1
  156. #
  157. # End of "$Id: Makefile 8195 2011-01-05 23:00:33Z AlbrechtS $".
  158. #