Docs.make 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # This should be "include"d from the top-level Makefile, and nowhere else
  2. # Extra commands
  3. HTML2PDF= htmldoc --footer d.1
  4. GRASS_PDFDIR= $(DOCSDIR)/pdf
  5. # generate programmer's manual as single HTML document:
  6. htmldocs-single:
  7. $(MAKE) -C . htmldox-single
  8. for dir in lib rfc gui/wxpython ; do \
  9. $(MAKE) -C $$dir htmldox-single ; \
  10. done
  11. # generate programmer's manual as multiple HTML documents:
  12. docs_dirs = \
  13. lib/db \
  14. lib/raster3d \
  15. lib/gis \
  16. lib/gmath \
  17. lib/gpde \
  18. lib/proj \
  19. lib/python \
  20. lib/ogsf \
  21. lib/segment \
  22. lib/vector \
  23. lib/vector/dglib \
  24. gui/wxpython \
  25. rfc
  26. htmldocs_dirs := $(patsubst %,%/html,$(docs_dirs))
  27. latexdocs_dirs := $(patsubst %,%/latex,$(docs_dirs))
  28. htmldocs:
  29. $(MAKE) -C . htmldox
  30. for dir in $(docs_dirs) ; do \
  31. $(MAKE) -C $$dir htmldox ; \
  32. done
  33. packagehtmldocs: htmldocs
  34. tar chvfz $(GRASS_NAME)refman_$(DATE)_html.tar.gz $(htmldocs_dirs)
  35. #alternatively, the docs can be generated as single PDF document (see doxygen FAQ for 'TeX capacity exceeded'):
  36. # (cd lib/ ; make pdfdox)
  37. pdfdocs:
  38. for dir in $(docs_dirs) ; do \
  39. $(MAKE) -C $$dir pdfdox ; \
  40. done
  41. @echo "Written PDF docs in: $(latexdocs_dirs)"
  42. cleandocs:
  43. $(MAKE) -C . cleandox
  44. for dir in $(docs_dirs) ; do \
  45. $(MAKE) -C $$dir cleandox ; \
  46. done
  47. indices = \
  48. database.html \
  49. display.html \
  50. general.html \
  51. imagery.html \
  52. misc.html \
  53. photo.html \
  54. postscript.html \
  55. raster.html \
  56. raster3D.html \
  57. vector.html
  58. html_pdf = \
  59. cd $(ARCH_DISTDIR)/docs/html && \
  60. $(HTML2PDF) --webpage $(1).html $(2).*.html -f $(GRASS_PDFDIR)/$(GRASS_NAME)$(1).pdf
  61. html2pdfdoc:
  62. @ echo "Light PDF document from modules' HTML documentation"
  63. @ # http://www.htmldoc.org
  64. @test -d $(GRASS_PDFDIR) || mkdir -p $(GRASS_PDFDIR)
  65. $(call html_pdf commands,--no-links $(indices))
  66. html2pdfdoccomplete:
  67. @ echo "Complete PDF document from modules' HTML documentation"
  68. @ # http://www.htmldoc.org
  69. @test -d $(GRASS_PDFDIR) || mkdir -p $(GRASS_PDFDIR)
  70. $(call html_pdf database,db.*.html)
  71. $(call html_pdf display,d.*.html)
  72. $(call html_pdf general,g.*.html)
  73. $(call html_pdf imagery,i.*.html)
  74. $(call html_pdf misc,m.*.html)
  75. $(call html_pdf photo,i.ortho*.html photo*.html)
  76. $(call html_pdf postscript,ps.*.html)
  77. $(call html_pdf raster,r.*.html)
  78. $(call html_pdf raster3d,r3.*.html)
  79. $(call html_pdf vector,v.*.html)
  80. changelog:
  81. @ echo "creating ChangeLog file (following 'trunk' only)..."
  82. @ # svn2cl creates a GNU style ChangeLog file:
  83. @ # http://ch.tudelft.nl/~arthur/svn2cl/
  84. @if [ ! -x "`which svn2cl`" ] ; then \
  85. echo "\"svn2cl\" is required, please install first from http://ch.tudelft.nl/~arthur/svn2cl/" ; exit 1 ; \
  86. fi
  87. sh svn2cl ./ChangeLog
  88. .PHONY: htmldocs-single htmldocs packagehtmldocs pdfdocs cleandocs html2pdfdoc
  89. .PHONY: html2pdfdoccomplete changelog